OpenAI Agents SDK with AgentFox
what gets checked, and where
The Agents SDK calls the model through the Responses API, which the one line patches. Nothing else is needed; a second line hands a refusal back to the model as the tool's answer, so the run carries on.
Three lines
Everything starts in Watch: nothing is stopped until you switch a library to Block.
pip install "agentfox[openai-agents]" && agentfox init import agentfox; agentfox.auto(agent="support-bot", intent="triage support requests") # optional: govern(fox, triage_agent) returns a refusal to the model instead of raising
What gets checked
Each row is a check that runs in your process, before the thing it checks happens.
| Checked | How |
|---|---|
| Model calls | responses.create, parse and stream, sync and async: instructions and input before, the message items after |
| Each function_call item | Authorised before the SDK runs the tool; a refused call raises Blocked out of Runner.run, or with govern() goes back to the model as the tool's answer |
| Each function_call_output | Checked as tool output, and anything copied from it keeps that taint |
| transfer_to_* and agent.as_tool() | Recorded as hand-offs and delegation; after a hand-off the calls belong to the agent handed to |
| Input, output and tool guardrails | Native InputGuardrail, OutputGuardrail and ToolInputGuardrail objects backed by the AgentFox SDK, for apps that want them explicit |
Found in the code by agentfox scan: Agent(name=..., tools=[...], handoffs=[...]), agent.as_tool(...). The scan reads the repository and runs nothing, so it works before any of the lines above are added.
- Tools OpenAI hosts (web search, file search, code interpreter, hosted MCP) have run before the response arrives: recorded, not stopped.
- A request that continues a conversation held on OpenAI's servers (previous_response_id) carries only the new turn, so provenance for earlier turns is recorded as unknown.
Where to go from here
Python apps: the Agents SDK note and govern() 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