Configuration
Agent Relay has three configuration surfaces:
- REPL user config at
~/.config/relay/config.toml. - Daemon config at
~/.relay/config.toml. - Repo alert rules at
.agent-relay/config/alerts.toml.
There is no general-purpose .agent-relay/config.toml command config in the
current CLI, and there is no agent-relay config check command.
REPL user config
The interactive shell reads:
~/.config/relay/config.tomlor, when XDG_CONFIG_HOME is set:
$XDG_CONFIG_HOME/relay/config.tomlThe first-run wizard and /setup write this file. relay install may also
update the [handoff] order.
[repl]
default_agent = "claude"
tmux_auto = false
history_size = 1000
theme = "default"
transcript_lines = 5000
auto_compact_chars = 200000
auto_compact_keep_turns = 3
auto_compact_mode = "auto"
last_used_agent = "codex"
[repl.env]
extra_forwarded_keys = []
[handoff]
order = ["claude", "codex", "gemini", "opencode"]Important fields:
| Key | Meaning |
|---|---|
repl.default_agent | Agent selected when the REPL starts. |
repl.last_used_agent | Remembered automatically after /use or auto-handoff. |
repl.tmux_auto | Whether the REPL should launch inside tmux by default. |
repl.history_size | Number of prompt-history entries to retain. |
repl.transcript_lines | Max lines kept in the in-memory REPL transcript. |
repl.auto_compact_chars | Approximate saved-context size that triggers auto-compaction; 0 disables it. |
repl.auto_compact_keep_turns | Number of recent turns kept verbatim during compaction. |
repl.auto_compact_mode | auto, llm, or heuristic. |
repl.env.extra_forwarded_keys | Additional environment variables allowed into child agents. |
handoff.order | Automatic fallback chain used after rate limits. |
relay install tries to infer handoff.order from detected Claude, Codex,
Gemini, and OpenCode CLIs. Override it explicitly when needed:
relay install --handoff-order claude codex gemini opencodeDaemon config
relay install ensures the daemon config exists at:
~/.relay/config.tomlIt controls machine-wide daemon behavior:
# agent-relay daemon configuration
version = 1
[adapters]
claude_code = true
vscode = true
warp = true
pty = true
[handoff]
auto = true
notify = true
fallback_chain = []
[privacy]
redact_secrets = true
capture_tool_args = false
capture_file_diffs = false
[telemetry]
enabled = false
endpoint = "https://telemetry.agent-relay.dev/v1/ingest"
[proxy]
enabled = false
listen_port = 9089
confdir = "~/.relay/proxy"The v0.7 automatic handoff path uses the REPL [handoff].order for live
handoff execution. The daemon [handoff].fallback_chain remains part of the
daemon schema for daemon-side behavior and compatibility.
Alert rules
Metrics alerts are repo-local and live at:
.agent-relay/config/alerts.tomlCreate this file when you want alert thresholds for the current repository.
The alerts, metrics-tail, and dashboard alert views read from it.
Environment
Child agent environments are filtered. Relay forwards a small base allowlist,
RELAY_*, and provider-specific keys for the target agent. Add extra keys
under [repl.env] only when an agent truly needs them.
RELAY_LOG_LEVEL controls REPL log verbosity. NO_COLOR is honored by CLI
rendering where supported.
Commands that write config
| Command | Effect |
|---|---|
relay first launch | Runs onboarding and writes REPL config. |
/setup | Re-runs onboarding from inside the REPL. |
relay install | Writes daemon defaults, installs hooks, and may persist [handoff].order. |
relay install --handoff-order ... | Explicitly sets the REPL handoff order. |
relay install --no-handoff-order | Leaves the REPL handoff order alone. |