Skip to content

Quickstart without an account

Find the agents in your repository, watch every call your app makes, and read what AgentFox found. Nothing leaves your machine. You need Python 3.11 or newer.

Steps

  1. Scan the repository

    bash
    pip install agentfox
    agentfox scan

    scan reads your code without running it. It names each agent, the tools it can reach, and any agent that reads private data, reads untrusted content and can send data out.

    Terminal output of agentfox scan: the agents it found by name, the tools they can reach, and a Next box that says agentfox up.
  2. Set up

    bash
    agentfox up

    Every question has a recommended answer; press Enter to take it. up registers your agents under the names your code uses and adds agentfox.auto("<agent>") to the file that starts one: a script in pyproject.toml, the graph langgraph.json loads, or the file that runs it (Runner.run, crew.kickoff(), graph.invoke()), under src/ too. It starts in watch mode, so nothing is blocked yet.

    In a Python agent's repository it changes nothing else by default: no coding-agent hooks, no GitHub workflow, no background processes. Add them with --with coding-agents, --with ci or --with view.

    Besides the repository, up reads (never changes) the MCP and skill settings of the AI tools on this machine, such as ~/.claude and ~/.cursor, and says so. --skip-machine leaves them out. agentfox.auto() governs Google ADK (through google-genai, including the functions it calls for the model) and smolagents (its huggingface_hub model calls, and each tool where it runs), as it does the OpenAI, Anthropic, LiteLLM, LangChain and CrewAI routes.

  3. Run your app

    Run it as you always do. Each model and tool call is checked and recorded in a database on this machine. When the app exits, it prints how many calls it checked.

  4. Read what it found

    bash
    agentfox findings

    Each row is something a person should look at. "Would have been" means a rule caught it and watch mode let it through.

  5. Start blocking, one library at a time

    bash
    agentfox policy enforce tool-containment   # tool calls
    agentfox policy enforce baseline           # prompt attacks, personal data, secrets

    When what it would have stopped is what you want stopped, turn that library to blocking. Your app picks it up on its next call, with no code change. Running up again never turns it back. agentfox policy observe <library> goes back to watching.

  6. Attack-test it

    bash
    agentfox test redteam <agent>

    Writes attacks from the agent's own tools and the ones it reaches by handing off (unsafe tool use, prompt injection, data leaks, jailbreaks) and checks each one the way live traffic checks it: the message, then the tool call it is after. No model runs, so it measures your rules, not how your model answers; the dashboard's attack test sends the same attacks to the real agent. up prints the command with your agent's name filled in.

Connect to an account later

Sign in (that creates your workspace), press Create a key on Get started, and run the init command from the card in the same repository, or agentfox login from the terminal. Either saves the key in .agentfox/agentfox.env, and from then on your app's calls go to your account and show up on the dashboard. The CLI uses the same account: findings, agents list, permit, declare, policy, report and test suites read and write it, and each prints which it uses. agentfox doctor checks the key. The Quickstart walks through it. To set the key another way, see where auto() finds the key.

bash
agentfox login --server <gateway address from Get started>

If something goes wrong

You seeDo this
The scan finds no agentRun it in the repository where the agent is defined. It reads Python, TypeScript and JavaScript.
agentfox findings is emptyCheck that your app starts with agentfox.auto() and that you ran it from the folder where you ran up.