Skip to content

Configuration

The cascade

Later wins:

defaults  <-  ~/.config/fox-agent/config.toml  <-  project fox-agent.toml  <-  env (FOX_AGENT_*)  <-  CLI flags

TOML is the only config format. A malformed file fails loudly, naming the
file and the parser error, rather than being silently ignored — a typo in a
config used to make it indistinguishable from no config at all. Unknown keys and
non-URL baseUrl values surface as warnings, not silent ignores.

The relative paths inside either file (plugin and LSP commands, say) resolve
against the file that named them, not against your cwd.

Editing without a file

/settings lists the scalar knobs with their current values.

/settings                     # list everything
/settings compactWarnAt=0.7   # validated, saved to the global config, applied live
/settings compactWarnAt=      # reset to the default

Covers maxSteps, retryLimit, compactWarnAt, compactCtxOnlyAt,
requestTimeoutMs, toolOutputCap, readCap, toolPresentationCap, sessionListLimit,
tuiCollapsedChars, tuiKeptChars, tuiScrollStep, statusBar, tuiFrameMs,
contextMarkers and acpHistory.

Model, theme and reasoning effort have their own commands (/model, /theme,
/thinking) because each opens a chooser and saves globally.

The keys

Provider and model

KeyMeaning
providerThe active provider slot — a profile name, or a bare wire format (openai-compatible, openai-responses, anthropic, google, or a plugin-registered name)
modelThe active model id
baseUrl, apiKeyFallback credentials for the flat slot; a profile's own values win
reasoningEffortoff / minimal / low / medium / high / xhigh, mapped per provider. off is an explicit "do not reason"; unset lets the provider default rule
[providers.<name>]Named profiles, side by side. See Providers

Turn loop

KeyDefaultMeaning
maxSteps0Tool-call steps per turn; 0 = unlimited
retryLimit3Retries on 429/5xx, with backoff
requestTimeoutMs120000Bound on time without progress, not total duration (see below)
compactWarnAt0.8Context fraction at which the runtime header tells the agent to compact
compactCtxOnlyAt0.9Context fraction at which every tool except ctx is disabled
toolOutputCap30000Per-tool-result character cap
readCap50000read ceiling before it refuses and asks for offset/limit
toolPresentationCap60000Chars of one tool result the view shows; 0 = never truncate. The stored row is always whole — exceeding this appends a reversible replace op carrying a head+tail excerpt
autoBackgroundMs3000How long a step waits on one tool call before it stops waiting for it and lets the rest of the step continue. The call keeps running and its result still lands in the transcript. 0 = always wait. See slow calls
searchLimit500Default result cap for glob and grep when the call does not pass limit
searchHiddenfalseInclude dotfiles in glob/grep results

Sessions

KeyDefaultMeaning
sessionListLimit0Rows fox ls, /sessions and the fox -c picker list; 0 = every session on disk. A positive value caps the page, and the same number defines what fox -c <n> means

TUI

KeyDefaultMeaning
theme"default"Preset name, or a plugin-registered theme
tuiScrollbartrueDedicated scrollbar column
tuiScrollStep2Rows per wheel notch
tuiFrameMs16Frame budget (ms per frame-loop interval)
tuiCollapsedChars240Folded tool output keeps this much
tuiKeptChars4000Total character budget kept per collapsed block
statusBar"cwd provider model ctx cost"Space-separated segment template; plugin names from statusSegments work here too. Narrow terminals drop whole segments left-to-right
contextMarkerstrueShow [N] node markers in the transcript

Protocols and delegation

KeyDefaultMeaning
acpHistory"full"How much history session/load replays: "full", "last" (latest exchange only), or a trailing-node count
[agents.<name>]—task delegation targets: command (+ args, env) spawns an ACP child. default is fox-agent itself and is always available
[mcpServers.<name>]—MCP servers to spawn; their tools join the registry
mcpSharedPooltrueShare one long-lived MCP pool across turns instead of re-spawning servers per turn
[lsp.<name>]—Extra language servers beyond the three built in

Extensions

KeyMeaning
pluginsPlugin file paths. Global config only — see below
disabledPluginsNames switched off entirely, bundled or user ("pty", "bundled:pty", "mcp", "anthropic", …)
skillsDirectories to discover SKILL.md skills in. See Skills

Diagnostics

KeyDefaultMeaning
diagnosticstrueReport type errors in edit/write results

Request timeout

requestTimeoutMs bounds time without progress, not total request duration:
the clock re-arms on every streamed chunk. A model that reasons or writes for ten
minutes is fine; one that goes quiet past the window fails with a retriable
provider timed out after Ns with no response. Lower it if you point fox-agent
at a flaky gateway.

plugins is global-only

A plugins entry in a project fox-agent.toml is ignored, with a warning
saying so
. Every other extension point ([mcpServers.*], [agents.*],
[lsp.*]) spawns a child process; a plugin is imported into fox-agent's own
process and gets your whole environment, API key included. So "clone a repo, cd
in, run fox" must not be able to execute that repo's code. Naming a plugin is a
decision about your machine, and it lives in the file only you write.

Project instructions

AGENTS.md and CLAUDE.md are loaded from every directory on the path from
the filesystem root down to your cwd, each labeled with its own path so relative
paths inside it resolve against the right directory. /init analyzes the repo
and writes or updates an AGENTS.md for you.

Skills

skills is an array of directories searched for SKILL.md. Two layouts work:

<dir>/SKILL.md          the directory IS one skill
<dir>/<name>/SKILL.md   a collection of skills

Only two frontmatter fields are read, name and description:

---
name: scrapling
description: Adaptive web scraping with anti-bot bypass.
---

# Scrapling
… the body …

No frontmatter is fine — the name falls back to the directory name and the
description to the first prose line. Other frontmatter fields (version,
metadata, …) are ignored. ~ expands; a relative entry resolves against the
config file that named it.

What reaches the model is a routing table — one line per skill with its name,
description and path — never the body. The agent reads a SKILL.md with its
ordinary read tool when a task matches, so an unused skill costs one line
instead of a whole document. The section only appears when read is in the live
tool registry.

A project fox-agent.toml may set skills only in a trusted directory — a
SKILL.md is instructions the model is told to follow, the same injection
surface [mcpServers.*] is gated for. Elsewhere the entry is ignored with a
warning.

Malformed YAML, an unreadable file, a missing directory, and two skills sharing
one name are warnings, never fatal.

Trusted vs untrusted directories

On interactive TUI start, fox-agent shows the working directory and asks whether
the folder is trusted (y / n / c, one keypress). Trusted directories are
recorded in $FOX_AGENT_HOME/trusted_dirs; --trust skips the prompt.

In an untrusted directory, the project config's executable sections —
[mcpServers.*], [agents.*], [lsp.*], [providers.*] (including !cmd
values) — plus skills and project baseUrl/apiKey are ignored with warnings. Safe keys
(model, theme, caps) still apply. Headless and ACP runs never prompt; they run
restricted instead. FOX_AGENT_NO_TRUST_CHECK=1 skips the check for scripts.

Full example

model = "kimi-k2"
provider = "openrouter"      # a [providers.*] profile name, or a bare wire format
maxSteps = 0                 # 0 = unlimited
sessionListLimit = 0         # 0 = list every session
compactWarnAt = 0.8          # header says: compact now
compactCtxOnlyAt = 0.9       # only ctx stays callable past this
retryLimit = 3
requestTimeoutMs = 120000
diagnostics = true

# Plugins are read from the GLOBAL config only (see above). In
# ~/.config/fox-agent/config.toml; ignored with a warning here.
# plugins = ["~/my-fox-plugin.ts"]

# Skill directories. Discovered once at config load; /reload re-reads them.
skills = ["~/.openclaw/workspace/skills"]

[providers.openrouter]
format = "openai-compatible"
baseUrl = "https://openrouter.ai/api/v1"
apiKey = "$OPENROUTER_API_KEY"       # "$ENV" / "${ENV}" / "!cmd"
headers = { "x-title" = "fox-agent" }
defaultModel = "moonshotai/kimi-k2"

[[providers.openrouter.models]]      # describe a model no endpoint or catalog knows
id = "moonshotai/kimi-k2"
name = "Kimi K2"
contextWindow = 262144
maxOutput = 16384
reasoning = false
input = ["text", "image"]
costIn = 0.6
costOut = 2.5
sampling = { temperature = 1.0, top_p = 0.95 }

[mcpServers.fs]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-fs", "/tmp"]

# Agents the `task` tool may delegate to. "default" (fox-agent itself) is always available.
[agents.reviewer]
command = "some-other-acp-agent"
args = ["--acp"]
# env = { REVIEW_MODE = "strict" }   # extra vars for the child's environment

[lsp.gopls]
command = "gopls"
extensions = [".go"]
rootMarkers = ["go.mod"]