Skip to content

fox-agent

A light coding harness with agent-controlled context: the agent edits its own
context window natively, so nothing about what the model sees is hidden behind
host-level hacks.

Full machine control, zero permission prompts. A production turn loop with step
caps, retry/backoff, parallel tool execution, abort-safe partial persistence, and
agent-driven context management with harness-enforced rails. SQLite event-sourced
sessions. An OpenAI-compatible gateway first, plus native Anthropic and Google
providers. TUI and headless modes. ACP in both directions. A plugin system.

curl -fsSL https://github.com/QQSHI13/fox-agent/raw/main/install.sh | bash
fox

No API key? The TUI opens anyway and /login walks you through provider, key,
endpoint and model — then writes the global config and takes effect without a
restart.

What makes it different

  •   The agent owns its context


    Every message carries a stable [N] marker, and the ctx tool lets the model
    search, hide and rewrite what it sees — as a view over an append-only log, so
    /undo can walk any of it back. No background summarizer deciding what the
    model gets to remember.

  •   No permission prompts


    exec, pty, write, edit and MCP tools run with your full privileges in
    your cwd. A deliberate choice with a matching
    security model — read it before pointing
    fox-agent at code you did not write.

  •   One turn loop, every surface


    The TUI, -p/fox json and ACP all run through the same runTurnCore.
    Compaction, hooks and budget behave identically whichever surface drives a
    session.

  •   Extensions are plugins, not forks


    Tools, lifecycle hooks, providers, themes, MCP servers and delegation targets
    are one module with a default export. The built-ins ship as plugins through
    the same merge path, so they can be shadowed or switched off exactly like
    third-party ones.

  •   Sessions are files, not a service


    One SQLite database per session, event-sourced: an append-only message log
    plus a view-ops log. Copy it, delete it, export it as a .zip, or render it
    as one offline HTML file to show someone.

  •   A compiled binary


    Straight from source to a single executable, no dist intermediates. Bun
    bytecode and minification are for startup, not for shaving a number off a
    benchmark.

  •   ACP in both directions


    Be driven by an editor over fox --acp, and delegate to a child agent through
    the task tool. The sessions are the same SQLite databases either way, so a
    session started in Zed resumes in the TUI.

Start here

  •   Install


    Prebuilt binary for Linux and macOS, or from source with Bun. Optional extras
    are listed with what each one costs when it is missing.

  •   Quickstart


    A provider, a first prompt, and where to go next — including the headless
    modes that make it scriptable.

  •   Configuration


    The cascade from defaults to CLI flags, every key, and the trust rules that
    decide what a project file may set.

  •   Tools


    What the model can do, and the exact contract of each tool: caps, cwd rules,
    and failure modes.

  •   Plugins


    One module, one default export. Hooks are additive by design, and a plugin can
    wrap a built-in tool instead of replacing it.

  •   Troubleshooting


    Grouped by how loud the failure is — won't start, warns and continues, or
    quietly slower than you expected.

The documentation map

SectionFor
Getting StartedInstall, first run, headless use
CLI and slash commandsEvery flag, subcommand and /command
ConfigurationThe config cascade, every key, env vars
ToolsWhat the model can do, and the contract of each tool
The TUIKeybindings, mouse, steering, themes
PluginsWriting and managing a plugin
SessionsWhere state lives, forks, prune, delete, export
ProtocolsACP (server and client)
ArchitectureLayout, the event contract, the turn loop
Security modelWhat "no sandbox" actually means
TroubleshootingDiagnosing a failure from its symptom

Performance

Harness startup, footprint and idle memory, measured against the field by the
bench workflow
and committed to bench/.

Each run splices its results into the top of the README, so the numbers there are
the latest run rather than figures typed by hand; the method and the honest
caveats are documented in the README's Benchmarks section.

License

Apache-2.0.