Use this file to discover all available pages before exploring further.
Archon uses a layered configuration system that combines sensible built-in defaults, optional YAML config files at both user and repo level, and environment variable overrides. This page documents every supported field in .archon/config.yaml and every environment variable recognized by Archon.
Project-specific settings that override the global config for a single repository.
# AI assistant for this project (used as default provider for workflows)assistant: claudeassistants: claude: model: sonnet settingSources: - project # Restrict to project-level sources only (e.g., for CI or shared envs) codex: model: gpt-5.3-codex webSearchMode: live# Commands configurationcommands: folder: .archon/commands autoLoad: true# Worktree settingsworktree: # Optional: auto-detected from git when not set. Fails with an error if set # but the branch doesn't exist on remote. baseBranch: main # Gitignored files/dirs to copy into new worktrees after creation. # .archon/ is always copied automatically — don't list it here. copyFiles: - .env - .vscode/ - .claude/ - plans/ # Initialize git submodules in new worktrees (default: true). # Set false to opt out. initSubmodules: true # Co-locate worktrees inside the repo instead of ~/.archon/workspaces/. # Must be relative, no absolute paths, no '..' segments. # path: .worktrees# Documentation directory (controls $DOCS_DIR variable)docs: path: docs # Default: docs/# Bundled defaults controldefaults: loadDefaultCommands: true loadDefaultWorkflows: true
git worktree add copies only tracked files. worktree.copyFiles bridges that gap by copying gitignored content into each new worktree after creation.Semantics:
Each entry is a path relative to the repo root (file or directory)
Missing files are silently skipped (ENOENT at debug level)
Directories are copied recursively
Per-entry failures are isolated — one bad entry won’t abort the rest
Path-traversal attempts are rejected and logged
.archon/ is always copied automatically regardless of what you list here.
Environment variables override all other configuration. They are loaded from ~/.archon/.env (user scope) and <cwd>/.archon/.env (project scope) at startup, with project scope overriding user scope.
Pi provides access to ~20 LLM backends through a single provider. Set provider: pi and model: <backend>/<model> in your workflow YAML (e.g., model: google/gemini-2.5-pro).
Variable
Description
ANTHROPIC_API_KEY
Pi backend: anthropic
OPENAI_API_KEY
Pi backend: openai
GEMINI_API_KEY
Pi backend: google
GROQ_API_KEY
Pi backend: groq
MISTRAL_API_KEY
Pi backend: mistral
OPENROUTER_API_KEY
Pi backend: openrouter
XAI_API_KEY
Pi backend: xai
PI_CODING_AGENT_DIR
Override Pi data directory (useful in Docker to persist on the Archon volume)
Archon keys env loading on directory ownership, not filename. .archon/ directories at ~/ or <cwd>/ are archon-owned. Anything else is yours.
Path
Stripped at boot?
Archon loads?
archon setup writes?
<cwd>/.env
Yes (safety guard)
Never
Never
<cwd>/.archon/.env
No
Yes (repo scope, overrides user)
Yes, if --scope project
~/.archon/.env
No
Yes (user scope)
Yes, if --scope home (default)
Boot load order:
Strip keys Bun auto-loaded from <cwd>/.env, .env.local, .env.development, .env.production (prevents the target repo’s env from leaking into Archon)
Load ~/.archon/.env with override: true (user scope)
Load <cwd>/.archon/.env with override: true (repo scope wins over user scope)
# Set up user-wide credentialsmkdir -p ~/.archoncp .env.example ~/.archon/.env# Per-project override (e.g., a different Slack webhook for this repo)mkdir -p /path/to/repo/.archonprintf 'SLACK_BOT_TOKEN=xoxb-...\n' > /path/to/repo/.archon/.env
Pros: Real-time feedback, engaging, progress visible as work happens.Cons: More API calls, may hit rate limits with very long responses.Best for: Interactive chat platforms like Telegram.
Only the final summary message is sent after the AI completes processing.
Pros: Single coherent message, fewer API calls, no clutter.Cons: No progress indication, longer wait for first response.Best for: Issue trackers and async platforms like GitHub.
Platform defaults:
Platform
Default mode
Telegram
stream
Discord
batch
Slack
batch
GitHub
batch
Web UI
SSE streaming (always real-time, not configurable)
If your config file has invalid YAML syntax, Archon logs an error and falls back to defaults:
[Config] Failed to parse global config at ~/.archon/config.yaml: <error details>[Config] Using default configuration. Please fix the YAML syntax in your config file.
Common YAML pitfalls:
Indentation with tabs instead of spaces
Missing colons after keys
Unquoted values containing special characters (:, {, }, [, ])
CLI Reference
All CLI commands including the setup and doctor commands.
Troubleshooting
Common issues and their solutions including auth problems and port conflicts.