Skip to content

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.

Install
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.

CheckedHow
@guard.retrieval_nodeRetrieved text is checked for planted instructions before the model reads it
@guard.model_nodeThe 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-offsRecorded 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.

Limits
  • 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