Skip to main content
Configuration layers: defaults → global config → project config → env vars → CLI flags. Secrets (API keys) are always environment variables, never config files.

Config file

Meerkat loads config from TOML files in two locations:
LocationScopeExample path
.rkat/config.tomlProject (checked into repo or gitignored)./my-project/.rkat/config.toml
~/.rkat/config.tomlGlobal (user-wide defaults)~/.rkat/config.toml
Precedence: defaults → global config → project config → env vars → CLI flags.

Minimal example

.rkat/config.toml
[agent]
model = "claude-opus-4-6"
max_tokens_per_turn = 16384

[shell]
program = "bash"
timeout_secs = 30

Generating a config file

rkat config init          # Creates .rkat/config.toml with defaults
rkat config init --global # Creates ~/.rkat/config.toml

Budget controls

Budget limits cap resource usage per agent run. When a limit is reached the agent completes its current turn, then stops.
max_tokens
integer
Total input + output tokens across all turns.
max_duration
string
Maximum wall-clock runtime. Accepts "30s", "5m", "2h".
max_tool_calls
integer
Maximum total tool invocations.
.rkat/config.toml
[budget]
max_tokens = 50000
max_duration = "5m"
max_tool_calls = 50

Retry policy

Failed LLM calls are retried automatically with exponential backoff and jitter.
.rkat/config.toml
[retry]
max_retries = 3
initial_delay_ms = 500
max_delay_ms = 10000
multiplier = 2.0
ErrorRetried?
RateLimitedYes (uses retry-after header when available)
ServerOverloadedYes
NetworkTimeoutYes
ConnectionResetYes
ServerError (5xx)Yes
InvalidRequestNo
AuthenticationFailedNo
ContentFilteredNo

Session persistence

Sessions record conversation history so agents can resume where they left off.
Sessions are stored as JSONL files, one per session.
.rkat/config.toml
[store]
sessions_path = "/custom/path/to/sessions"
Requires the jsonl-store feature flag (enabled by default).

Managing sessions

rkat sessions list [--limit N]
rkat sessions show <SESSION_ID>

Logging

Meerkat uses the tracing crate. Configure via RUST_LOG:
export RUST_LOG=info                    # Session lifecycle, turns, completions
export RUST_LOG=meerkat=debug,info      # Debug Meerkat, info for dependencies
export RUST_LOG=trace                   # Wire-level protocol details

Advanced configuration

These features have their own dedicated guides:
FeatureConfig sectionGuide
Hooks[hooks]Hooks guide
Memory and compaction[compaction]Memory guide
Sub-agents[sub_agents]Sub-agents guide
Inter-agent comms[comms]Comms guide
MCP servers.rkat/mcp.tomlMCP reference
Shell security[shell]Built-in tools

See also