Documentation &
Wild Examples
ARF is the Audit Record Foundry. Every example below produces a cryptographically signed, tamper-evident proof bundle. You aren't running agents; you're building a permanent record of every decision they made.
Quick Start
ARF requires PostgreSQL 16 with the pgvector extension for its task and provenance database. If you skip the database, ARF falls back to JSONL for offline use. Start that first, then install the ARF binary.
ARF requires: Rust 1.78+, git 2.40+. PostgreSQL is optional (JSONL fallback available). Supports macOS 13+ and Linux (kernel 5.15+). Windows support is planned.
Your First Governance Policy
ARF generates a default config on arf config init. The main config lives at .arf/config.toml. Customize it:
Your First Governed Session
Wild Example 1: Approve Reads, Block Network
Auto-approve all read operations. Require human sign-off on any network call. Block writes to files outside the src/ directory.
The result: the agent can freely read and explore the codebase, but every write and shell command requires human approval, and any attempt to touch production config or .env files is blocked at the filesystem level. The approval decisions are visible in the proof chain.
Wild Example 2: 12 Agents in Parallel, Merge Only Passing Ones
Decompose a large refactor into 12 subtasks, run them in parallel using isolated git worktrees, and merge only branches that pass quality gates.
Wild Example 3: Fully Auditable AI-Assisted Code Review Pipeline
Run three agents in sequence: Producer writes code in an isolated worktree, Reviewer audits it, Archivist exports the proof. Every decision is in the provenance chain.
Wild Example 4: Route by Task Type. Claude for Architecture, Ollama for Boilerplate
Expensive creative work goes to Claude. Mechanical transforms (boilerplate, format conversion, test generation from spec) route to a local Ollama model for free.
Wild Example 5: Air-Gapped Session. Zero Cloud API Calls
Run an entire agent session with no network access to cloud APIs. Everything stays local. Still fully governed, still fully audited.
Configuration Reference
Config is discovered and merged in order: compiled defaults, then ~/.config/arf/config.toml, then .arf/config.toml in the project directory. Pass --config <path> to arf start to bypass auto-discovery and use only the specified file.
Engine vs. backend: engine is the user-facing term. It's what you pass to arf launch --engine and set in [routing] default_engine. backend is the config term used inside [routes.aliases] and [routes.default.*] to name the destination provider. Both refer to the same set of providers (anthropic, openai, ollama, etc.) but in different contexts.
[proxy]
listen_addrBind address for the proxy. Default:"127.0.0.1:4554". Override withARF_PROXY_ADDRenv var orarf start --port.
[routing]
default_runnerRunner binary:"claude","codex","gemini","antigravity"default_engineProvider backend name:"anthropic","openai","gemini","ollama", or any[providers.*]keydefault_modelOptional model override; omit to let the runner choose
[routes.default.<facade>] and [routes.aliases]
Routes map incoming facades (the protocol a runner speaks) to a backend + model pair.
[providers.<name>]
Add additional backends (OAI-compatible endpoints, self-hosted, OpenRouter, etc.). The provider key becomes the backend name in routes and --engine.
[governance]
require_approval_for_toolsTool names that require human approval (e.g.["Write","Bash"])blocked_commandsShell command patterns that are always deniedblocked_pathsFilesystem paths the agent cannot access
[governance.sandbox]
default_levelIsolation level:"jailed","sandbox","workspace","full"project_dirProject root for path validation
[circuit_breakers]
consecutive_failuresFailures before trip (integer)error_rate_thresholdError rate (0.0–1.0) before tripcooldown_secondsCooldown before half-open probeidle_trip_secondsDead man's switch: seconds of inactivity before trip
[task_db]
connection_stringPostgreSQL connection URI. Required. Example:"postgres://arf:arf@localhost/arf"
[[governance.rules]]: Rule Language
Custom rules live in .arf/governance/rules.toml. A rule with the same name as a built-in replaces it; new names extend the rule set.
Severity values: block rejects the request outright. warn logs and continues. rewrite mutates streamed output (requires replacement). modify patches request parameters (requires condition and modification).
Trigger values: request evaluates on the inbound request body. stream_text_match evaluates on each streamed text chunk from the model.
Run arf governance rules to list all active rules. Run arf config validate to verify your rules file before starting.
Governance Policy Reference
Governance rules live in .arf/governance/rules.toml. Each rule is a TOML array entry under [[rules]].
Rule Actions
deny— Reject the request. Return an error to the runner. Record the denial.require_approval— Hold the request. Show an approval toast in the TUI / IDE. Proceed if approved, deny if rejected or timed out.warn— Log the match. Continue the request. Record a warning event.rewrite— Mutate a streaming response chunk. Replace the matched text withreplacement.modify— Patch a request parameter. Used to clamp model parameters (e.g. temperature) to safe values.
Condition Types
tool_call— Matches when the agent calls a specific tool. Fields:tool,pattern(regex on tool args),path_pattern(regex on file path arg).request_text— Matches text in the inbound prompt. Field:pattern(RE2 regex).stream_text— Matches text in the model's streaming response. Field:pattern.session_tokens— Matches when session token count exceeds a threshold. Field:gt(integer).request_tokens— Matches when a single request exceeds a token count. Field:gt.request_param— Matches a model parameter value. Fields:field,gt/lt/eq.all— All nested conditions must match. Field:conditions(array).
Three Built-in Profiles
strict— All tool calls require approval. 50k token budget. 1-failure circuit break. Network calls blocked by default.standard— Reads auto-approve. Writes and shell require approval. 100k token budget. 3-failure circuit break.minimal— Most ops auto-approved. 500k token budget. 5-failure circuit break. Audit stays active.
Shell Integration
ARF ships shell integration for bash, fish, and zsh. The integration creates aliases that auto-start the proxy and route the runner through ARF.
The shell integration is idempotent. Running arf shell install twice doesn't duplicate entries. The proxy check uses a PID file at ~/.arf/proxy.pid.
MCP Integration
ARF exposes its governance, knowledge, and orchestration surface as an MCP server. Any MCP-aware client can connect.
See the MCP page for the full tool list and usage examples.
IDE Integration
ARF has extensions for VS Code and JetBrains IDEs. Both connect to the proxy over HTTP and show governance status, allow approve/deny of HITL requests, and open the audit trail inline.
See the IDE Plugins page for full setup instructions.
Environment Variables
ARF_PROXY_PORT— Proxy listen port. Default:4554.ARF_PROXY_ADDR— Proxy bind address. Default:127.0.0.1:4554.ARF_DATABASE_URL— PostgreSQL connection URI. Example:postgres://arf:arf@localhost/arf. If unset, ARF falls back to JSONL.ARF_CONFIG— Path to the config file. Overrides auto-discovery.ARF_PROFILE— Governance profile override:strict,standard, orminimal.ARF_TUI_DEMO— Set to1to run the TUI in demo mode with synthetic traffic. No proxy needed.ANTHROPIC_API_KEY— Injected just-in-time into Anthropic API requests. Never logged.OPENAI_API_KEY— Injected just-in-time into OpenAI API requests. Never logged.ANTHROPIC_BASE_URL— Set by shell integration tohttp://localhost:4554to route Claude Code through ARF.OPENAI_BASE_URL— Set by shell integration tohttp://localhost:4554to route Codex through ARF.
Keyboard Shortcuts Reference
See the full Terminal UI page for keyboard shortcuts. Quick reference:
y/nApprove/deny pending actiong/t/p/d/bSwitch pane: governance/traffic/provenance/diff/boardctrl+rHot-reload policy without restartingctrl+sSeal current sessionxExport proof bundle
Frequently Asked Questions
ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.) and injects them just-in-time into outbound requests. The keys are never written to disk in plaintext and never visible in the TUI or logs. The vault subsystem (arf vault) manages session-scoped secrets that agents can check out and return during a task. That's separate from your own API keys.
arf start runs headless by default; it backgrounds the proxy without opening a TUI. In CI, set your governance policy to auto-approve the actions the agent needs, then use arf launch <PROMPT> to drive the agent. Use arf provenance export at the end of the job to capture the full proof bundle as a build artifact.