LangGraph with AgentFox
what gets checked, and where
The one line covers the model calls. Three decorators add checks on what a node retrieves, says and does, and a grant that needs approval pauses the graph at that node.
Three lines
Everything starts in Watch: nothing is stopped until you switch a library to Block.
pip install "agentfox[langgraph]" && agentfox init from agentfox.frameworks.langgraph import AgentFoxGuard guard = AgentFoxGuard(agent="research-bot", intent="Answer from the knowledge base.")
What gets checked
Each row is a check that runs in your process, before the thing it checks happens.
| Checked | How |
|---|---|
| @guard.retrieval_node | Retrieved text is checked for planted instructions before the model reads it |
| @guard.model_node | The messages going in and the reply coming out |
| @guard.tool_node(tool=...) | The call is authorised before the node's body runs; a grant with --requires-approval pauses the graph, and Command(resume=...) continues it once a person approves |
| Supervisor and swarm hand-offs | Recorded as a hand-off, not refused as an unknown tool; each member's calls are credited to that member |
Found in the code by agentfox scan: create_react_agent and create_agent, create_supervisor, create_swarm, StateGraph. The scan reads the repository and runs nothing, so it works before any of the lines above are added.
- The guard keeps its trace under the __agentfox__ key of the state; declare it, or LangGraph drops it between nodes.
- Pausing for approval needs the graph compiled with a checkpointer.
Where to go from here
LangGraph: wrap the nodes, declare the state key, pause for approval 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