Skip to content

Map your agents

See every agent in your code, what it can reach, and which ones need care first. Then keep the map current with rescans and a CI check.

Steps

  1. Open the agent map

    Open Agents. Each agent is drawn with its user, its model, its tools and the documents it reads. Click any node or line for its details on the right.

    The Agents page: the project map with the user, each agent, its model, tools and data sources, and the guardrail on each line.
  2. Read the lines and labels

    A line is a place where a guardrail can run: the user's message, the reply, a tool call, a tool's result. A line with our mark has guardrails on it; a + means none yet. Each tool carries its impact: Read only, Writes, High impact or Irreversible.

  3. Connect a GitHub repository

    In Settings → Connections, press Connect GitHub, then Scan next to a repository. The code is read, never run. New agents arrive on Agents as drafts until you add them.

    Settings, Connections: the gateway, GitHub, a hosted API, the SDK, coding agents and OpenTelemetry, each with its status and a setup button.

    A scanned repository is rescanned every six hours. A new tool, a model call that lost its guardrails, or a new risky combination of tools becomes an Issue.

  4. Scan in CI

    Run the scan in any CI job. --fail fails the job when a model call has no guardrails. Nothing is sent anywhere.

    bash
    pip install agentfox
    agentfox scan --fail --no-submit

The pattern to fix first

An agent is at risk when it holds all three of these at once: a tool that reads private data, a tool that reads content an outsider can write (a web page, an email, an issue comment), and a tool that can send data out. An instruction hidden in that content can then make it send your data somewhere. The scan names the three tools and the fix. Usually the fix is to require approval on the tool that sends out (see Tool access).

What the scan reads

  • Python, TypeScript and JavaScript. Agents in the OpenAI and Anthropic SDKs, LangGraph, LangChain, CrewAI, AutoGen and Google ADK, and who hands work to whom.
  • Agents a class builds (self.tools = [...], then create_react_agent(tools=self.tools)), an Agents SDK agent.clone(tools=[other.as_tool()]), a hierarchical crew's manager_llm, and an agent built on your own Agent class, labelled by the SDK it calls rather than by the package name.
  • Tools written as Tool subclasses that name themselves, and MCP servers your repository serves (FastMCP("name")).
  • MCP servers from .mcp.json, Cursor, Claude Code and Claude Desktop configs.
  • Not tools built at runtime, for example loaded from a database. Agents that send traffic show up anyway, marked unregistered.

Keep re-checking connected sources (Enterprise)

A scan is a snapshot. With AgentFox Enterprise (Cloud, or the self-hosted Enterprise stack), a GitHub repository, a hosted API's OpenAPI document or an MCP server you connect in Settings → Connections is re-checked every few hours, and on every push once the GitHub webhook is registered. What changed since the last run becomes an issue (a new lethal trifecta, a model call that lost its governance, a new tool or destructive endpoint, an MCP server whose tools drifted), and the issue closes itself when the condition clears. Settings → Alerts lists what is watched, with Run now and Pause.

bash
agentfox scan monitors list                      # what is watched, last outcome, next run
agentfox scan monitors add github_repo acme/bot  # or created for you when you connect one
agentfox admin jobs run-due                      # self-hosted: put this on cron

With the open-source package alone, agentfox scan monitors says it is not installed. Run the scan on every pull request instead, with the GitHub Action above.

If something goes wrong

You seeDo this
The scan proposes nothingThe agent sits behind a wrapper the scan does not know. Connect it with one line in Python instead.
A tool has the wrong impactChange it on the agent's Access page. Your choice always wins over the guess.
Connecting GitHub fails with 503A self-hosted gateway needs AGENTFOX_TOKEN_ENCRYPTION_KEY to store the GitHub token.