Environment Variables
This page is grounded in:
crates/core/src/config/loader.rscrates/cli/src/cmd/server.rscrates/cli/src/cmd/mod.rscrates/core/src/agent/runner.rs
User-set SWARMIE_* variables
These variables are read directly by Swarmie runtime code.
| Variable | Used by | Config mapping / effect |
|---|---|---|
SWARMIE_MODEL | Config loader | Maps to defaults.model |
SWARMIE_PROVIDER | Config loader | Maps to defaults.provider |
SWARMIE_TRUST | Config loader | Maps to permissions.trust_level |
SWARMIE_SERVER_PORT | Config loader | Maps to server.port |
SWARMIE_SERVER_PASSWORD | Config loader + swarmie web | Maps to server.password; also used as fallback when swarmie web --password is not set |
SWARMIE_LOG_LEVEL | CLI logging init | Controls log level written under ~/.swarmie/logs/ |
Internal agent-session variables
These are injected by the runtime for spawned agents/tools. They are not normally set manually.
| Variable | Producer | Purpose |
|---|---|---|
SWARMIE_AGENT_ID | Agent runner | Current agent name |
SWARMIE_SESSION_ID | Agent runner | Current session ID |
SWARMIE_DB_PATH | Agent runner | Mailbox/session DB path for orchestration tools |
SWARMIE_AGENTS | Agent runner | Comma-separated agent names for orchestration tools |
Example
export SWARMIE_MODEL=sonnet
export SWARMIE_PROVIDER=default
export SWARMIE_LOG_LEVEL=info
export SWARMIE_SERVER_PASSWORD='change-me'
swarmie
# or
swarmie web --port 4200Notes
- Env overrides are string-based and applied during config layer resolution.
- Unknown
SWARMIE_*names are ignored by the config loader.