Skip to content

LangChain with AgentFox
what gets checked, and where

Add one line at startup. Every chat model call and every tool call in the codebase is checked, with no change to the chains that make them.

Three lines

Everything starts in Watch: nothing is stopped until you switch a library to Block.

Install
pip install agentfox && agentfox init
# at startup, before any model call:
import agentfox; agentfox.auto(agent="support-triage", intent="answer questions about orders")

What gets checked

Each row is a check that runs in your process, before the thing it checks happens.

CheckedHow
The messages going into a chat modelChecked before the call, on BaseChatModel.invoke and ainvoke, buffered or streamed
The model's replyChecked after; a redaction rule rewrites AIMessage.content before your code reads it
Each tool call in AIMessage.tool_callsAuthorised against the agent's grants, with where each argument came from; a refused call raises Blocked so nothing runs it
Tools where they runBaseTool.invoke and ainvoke are checked before the body runs, and the result is checked as tool output before the model reads it

Found in the code by agentfox scan: @tool, create_tool_calling_agent and initialize_agent, AgentExecutor. The scan reads the repository and runs nothing, so it works before any of the lines above are added.

Limits
  • LangChain.js is not patched. From TypeScript, check messages and tool calls with @agentfox/sdk.
  • Another process, or a model called outside LangChain's chat models, is not seen by this line; the proxy covers those.

Where to go from here

Python apps: the one line, and where it finds the account key Tool access: which tools the agent may call What the checks catch, with their limits Every framework

Try AgentFox on your own agent

One command finds your agents. It starts in watch mode, so nothing is blocked until you say so.

uvx agentfox scan