Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/coleam00/Archon/llms.txt

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.

Configuration priority

Settings are resolved in this order, with later sources overriding earlier ones:
  1. Built-in defaults — Archon’s compiled-in sensible defaults
  2. Global config~/.archon/config.yaml (applies to every project)
  3. Repo config.archon/config.yaml in the repository root
  4. Environment variables — always the highest priority

.archon/config.yaml reference

Global config (~/.archon/config.yaml)

User-wide preferences that apply to every project on the machine.
# Default AI assistant (must match a registered provider: claude, codex, pi)
defaultAssistant: claude

assistants:
  claude:
    # Model string passed verbatim to the Claude SDK.
    # Accepts: 'sonnet', 'opus', 'haiku', or any 'claude-*' identifier.
    # Use 'inherit' to keep whatever the SDK resolves as its default.
    model: sonnet

    # Which Claude SDK config sources to load (CLAUDE.md, skills, commands, agents).
    # Default: ['project', 'user']
    settingSources:
      - project   # <cwd>/.claude/
      - user      # ~/.claude/

    # Absolute path to the Claude Code executable.
    # Required in compiled Archon binaries when CLAUDE_BIN_PATH is not set.
    # Accepts the native ~/.local/bin/claude or the npm cli.js.
    # claudeBinaryPath: /absolute/path/to/claude

  codex:
    model: gpt-5.3-codex
    # Reasoning effort: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
    modelReasoningEffort: medium
    # Web search mode: 'disabled' | 'cached' | 'live'
    webSearchMode: disabled
    # Additional directories Codex can read (absolute paths)
    additionalDirectories:
      - /absolute/path/to/other/repo
    # codexBinaryPath: /absolute/path/to/codex

# Per-platform streaming preferences
streaming:
  telegram: stream  # 'stream' | 'batch'
  discord: batch
  slack: batch
  github: batch

# Concurrency limits
concurrency:
  maxConversations: 10

Repo config (.archon/config.yaml)

Project-specific settings that override the global config for a single repository.
# AI assistant for this project (used as default provider for workflows)
assistant: claude

assistants:
  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 configuration
commands:
  folder: .archon/commands
  autoLoad: true

# Worktree settings
worktree:
  # 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 control
defaults:
  loadDefaultCommands: true
  loadDefaultWorkflows: true

assistants.claude.settingSources

Controls which configuration sources the Claude Agent SDK loads during sessions — CLAUDE.md, skills, commands, agents, and hooks.
ValueDescription
projectLoad project-level <cwd>/.claude/
userLoad user-level ~/.claude/
Default: ['project', 'user']. To restrict to project-only sources (useful in CI or shared environments):
assistants:
  claude:
    settingSources:
      - project

worktree.copyFiles

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

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.

Core

VariableDescriptionDefault
ARCHON_HOMEBase directory for all Archon-managed files. Ignored in Docker — container always uses /.archon.~/.archon
PORTHTTP server listen port. Auto-allocated in worktrees (3190–4089).3090
HOSTBind address for the HTTP server. Set to 127.0.0.1 to restrict to localhost.0.0.0.0
LOG_LEVELLogging verbosity: fatal, error, warn, info, debug, traceinfo
BOT_DISPLAY_NAMEBot name shown in batch-mode “starting” messagesArchon
DEFAULT_AI_ASSISTANTDefault AI assistant (must match a registered provider: claude, codex, pi)claude
MAX_CONCURRENT_CONVERSATIONSMaximum concurrent AI conversations10
SESSION_RETENTION_DAYSDelete inactive sessions older than N days30
ARCHON_SUPPRESS_NESTED_CLAUDE_WARNINGSet to 1 to suppress the stderr warning emitted when archon runs inside a Claude Code session
ARCHON_VERBOSE_BOOTSet to 1 to print [archon] loaded N keys from … lines at boot. Also enabled by LOG_LEVEL=debug or trace.

AI providers — Claude

VariableDescriptionDefault
CLAUDE_USE_GLOBAL_AUTHUse global auth from claude /login (true/false)Auto-detect
CLAUDE_CODE_OAUTH_TOKENExplicit OAuth token (alternative to global auth)
CLAUDE_API_KEYExplicit API key (alternative to global auth)
CLAUDE_BIN_PATHAbsolute path to the Claude Code executable. Required for compiled binaries when claudeBinaryPath is not set in config.
TITLE_GENERATION_MODELLightweight model for generating conversation titlesSDK default
ARCHON_CLAUDE_FIRST_EVENT_TIMEOUT_MSTimeout (ms) before Claude subprocess is considered hung60000
When CLAUDE_USE_GLOBAL_AUTH is unset, Archon auto-detects: it uses explicit tokens if present, otherwise falls back to global auth.

AI providers — Codex

VariableDescriptionDefault
CODEX_ID_TOKENCodex ID token (from ~/.codex/auth.json)
CODEX_ACCESS_TOKENCodex access token
CODEX_REFRESH_TOKENCodex refresh token
CODEX_ACCOUNT_IDCodex account ID
CODEX_BIN_PATHPath to Codex native binary (binary builds only)

AI providers — Pi (community)

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).
VariableDescription
ANTHROPIC_API_KEYPi backend: anthropic
OPENAI_API_KEYPi backend: openai
GEMINI_API_KEYPi backend: google
GROQ_API_KEYPi backend: groq
MISTRAL_API_KEYPi backend: mistral
OPENROUTER_API_KEYPi backend: openrouter
XAI_API_KEYPi backend: xai
PI_CODING_AGENT_DIROverride Pi data directory (useful in Docker to persist on the Archon volume)~/.pi/agent/

Platform adapters — Slack

VariableDescriptionDefault
SLACK_BOT_TOKENSlack bot token (xoxb-...)
SLACK_APP_TOKENSlack app-level token for Socket Mode (xapp-...)
SLACK_ALLOWED_USER_IDSComma-separated Slack user IDs for allowlistOpen access
SLACK_STREAMING_MODEstream or batchbatch

Platform adapters — Telegram

VariableDescriptionDefault
TELEGRAM_BOT_TOKENTelegram bot token from @BotFather
TELEGRAM_ALLOWED_USER_IDSComma-separated Telegram user IDs for allowlistOpen access
TELEGRAM_STREAMING_MODEstream or batchstream

Platform adapters — Discord

VariableDescriptionDefault
DISCORD_BOT_TOKENDiscord bot token from Developer Portal
DISCORD_ALLOWED_USER_IDSComma-separated Discord user IDs for allowlistOpen access
DISCORD_STREAMING_MODEstream or batchbatch

Platform adapters — GitHub

VariableDescriptionDefault
GH_TOKENGitHub personal access token (also used by gh CLI)
GITHUB_TOKENAlias for GH_TOKEN (used by the GitHub adapter)
WEBHOOK_SECRETHMAC SHA-256 secret for GitHub webhook signature verification
GITHUB_ALLOWED_USERSComma-separated GitHub usernames for allowlist (case-insensitive)Open access
GITHUB_BOT_MENTION@mention name the bot responds to in issues/PRsFalls back to BOT_DISPLAY_NAME

Platform adapters — GitLab (community)

VariableDescriptionDefault
GITLAB_URLGitLab instance URL (default: https://gitlab.com; set for self-hosted)https://gitlab.com
GITLAB_TOKENPersonal or project access token with api scope
GITLAB_WEBHOOK_SECRETSecret token set in GitLab webhook configuration
GITLAB_ALLOWED_USERSComma-separated GitLab usernames for allowlist (case-insensitive)Open access
GITLAB_BOT_MENTION@mention name for detection in issues/MRsFalls back to BOT_DISPLAY_NAME

Platform adapters — Gitea (community)

VariableDescriptionDefault
GITEA_URLSelf-hosted Gitea instance URL (e.g., https://gitea.example.com)
GITEA_TOKENGitea personal access token or bot account token
GITEA_WEBHOOK_SECRETHMAC SHA-256 secret for Gitea webhook signature verification
GITEA_ALLOWED_USERSComma-separated Gitea usernames for allowlist (case-insensitive)Open access
GITEA_BOT_MENTION@mention name for detection in issues/PRsFalls back to BOT_DISPLAY_NAME

Database

VariableDescriptionDefault
DATABASE_URLPostgreSQL connection string. Omit to use SQLite.SQLite at ~/.archon/archon.db

Web UI

VariableDescriptionDefault
WEB_UI_ORIGINCORS origin for API routes (restrict when exposing publicly)* (allow all)
WEB_UI_DEVWhen set, skip serving static frontend (Vite dev server used instead)

Worktree management

VariableDescriptionDefault
STALE_THRESHOLD_DAYSDays before an inactive worktree is considered stale14
MAX_WORKTREES_PER_CODEBASEMax worktrees per codebase before auto-cleanup25
CLEANUP_INTERVAL_HOURSHow often the background cleanup service runs6

Docker / deployment

VariableDescriptionDefault
ARCHON_DATAHost path for Archon data. Compose-only — sets the bind-mount source for /.archon. Not read by Archon source code.Docker-managed volume
ARCHON_USER_HOMEHost path for /home/appuser. Compose-only — sets the bind-mount source.Docker-managed volume
DOMAINPublic domain for Caddy reverse proxy (TLS auto-provisioned)
CADDY_BASIC_AUTHCaddy basicauth directive to protect the Web UI and APIDisabled
AUTH_USERNAMEUsername for form-based auth (Caddy forward_auth)
AUTH_PASSWORD_HASHBcrypt hash for form-based auth password (escape $ as $$ in Compose)
COOKIE_SECRET64-hex-char secret for auth session cookies
AUTH_SERVICE_PORTPort for the auth service container9000
COOKIE_MAX_AGEAuth cookie lifetime in seconds86400

Telemetry

VariableDescription
ARCHON_TELEMETRY_DISABLEDSet to 1 to disable anonymous telemetry
DO_NOT_TRACKSet to 1 to disable telemetry (de facto standard)
POSTHOG_API_KEYAPI key for a self-hosted PostHog instance
POSTHOG_HOSTPostHog host URL (default: https://us.i.posthog.com)

.env file locations

Archon keys env loading on directory ownership, not filename. .archon/ directories at ~/ or <cwd>/ are archon-owned. Anything else is yours.
PathStripped at boot?Archon loads?archon setup writes?
<cwd>/.envYes (safety guard)NeverNever
<cwd>/.archon/.envNoYes (repo scope, overrides user)Yes, if --scope project
~/.archon/.envNoYes (user scope)Yes, if --scope home (default)
Boot load order:
  1. Strip keys Bun auto-loaded from <cwd>/.env, .env.local, .env.development, .env.production (prevents the target repo’s env from leaking into Archon)
  2. Load ~/.archon/.env with override: true (user scope)
  3. Load <cwd>/.archon/.env with override: true (repo scope wins over user scope)
# Set up user-wide credentials
mkdir -p ~/.archon
cp .env.example ~/.archon/.env

# Per-project override (e.g., a different Slack webhook for this repo)
mkdir -p /path/to/repo/.archon
printf 'SLACK_BOT_TOKEN=xoxb-...\n' > /path/to/repo/.archon/.env

Streaming modes

Each platform adapter supports two streaming modes, configurable via environment variable or ~/.archon/config.yaml.
Messages are sent in real-time as the AI generates responses.
TELEGRAM_STREAMING_MODE=stream
SLACK_STREAMING_MODE=stream
DISCORD_STREAMING_MODE=stream
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.
Platform defaults:
PlatformDefault mode
Telegramstream
Discordbatch
Slackbatch
GitHubbatch
Web UISSE streaming (always real-time, not configurable)

Troubleshooting config issues

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.

Build docs developers (and LLMs) love