Configuration reference
Status: Ready
Truth label: Limited
Audience: New builder, Fleet operator
Reader outcome: Set any AGENTASIAN variable knowing which process reads it, what it defaults to, and what breaks if it is wrong.
Last verified: 2026-09-12
Full guides: Configuration, System manual
This page is the catalog: what each setting is, its default, and what breaks if it is wrong. For how to pick a value, read the effective one, and check the result, see Advanced configuration.
Where configuration comes from
Configuration is read from environment variables and from a .env file at the
application repository root.
cp .env.example .env
Never commit .env, provider keys, API tokens, worker credentials, or raw
trace artifacts.
Precedence, strongest first:
- Command line flags on the worker process.
- Exported shell environment values.
- Values in
.env. - Built-in defaults.
Who reads what
Four prefixes exist because four processes read different settings. Setting a value on the wrong machine is the most common configuration failure.
| Owner | Variables it reads |
|---|---|
| Launch scripts | AA_BIND_HOST |
| Brain | Unprefixed chat, embedding, memory, content, and voice variables |
| Forge Central | SE_MANAGER_* |
| Worker | FORGE_*, BRAIN_API_URL, AA_API_TOKEN, SE_MANAGER_CLI_RUN_TIMEOUT_SECONDS, and engine variables |
| Cortex | Nothing from .env. It uses the page hostname plus a bearer token in browser local storage |
SE_MANAGER_CLI_RUN_TIMEOUT_SECONDS carries the SE_MANAGER_ prefix but is
enforced by the worker process. Set it on every machine that runs a worker, not
only on Central.
Legacy prefix
Settings named AA_* were COMMANDBRO_* before the rename. The old spellings
are still read as a fallback, so an existing .env keeps working. Rename them
at your convenience.
Minimal single host configuration
LLM_PROVIDER=ollama
LLM_MODEL=llama3.1:8b
OLLAMA_BASE_URL=http://localhost:11434
EMBEDDING_PROVIDER=ollama
EMBEDDING_MODEL=nomic-embed-text
DATA_DIR=~/.agent_asian
SE_MANAGER_DATA_DIR=~/.agent_asian
INFLUENCE_LIBRARY_DIR=~/agentasian/influences
VOICE_PACK_DIR=~/agentasian/voice
AA_BIND_HOST=127.0.0.1
AA_API_TOKEN=
AA_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
FORGE_WORKER_ENGINE=claude-code
FORGE_WORKER_PERMISSION=write
FORGE_WORKER_MAX_PERMISSION=write
Chat provider settings
| Variable | Default | Meaning |
|---|---|---|
LLM_PROVIDER | ollama | One of ollama, openai, anthropic, google |
LLM_MODEL | llama3.1:8b | Default chat model. The chat agent dispatches work through tool calls, so choose a tool calling model |
OLLAMA_BASE_URL | http://localhost:11434 | Ollama service address |
OLLAMA_NUM_CTX | 32768 | Ollama context window. It must hold the system prompt plus every tool schema, or tool calling truncates and dispatch fails |
OLLAMA_LOCAL_HOSTS | empty | Comma separated bootstrap list of exact LAN hosts treated as local processing. Hostnames or IP addresses only, no URLs, ports, wildcards, or subnets |
OPENAI_API_KEY | empty | OpenAI chat and optional embeddings |
OPENAI_BASE_URL | empty | Optional compatible base URL used by legacy worker paths and key distribution |
ANTHROPIC_API_KEY | empty | Anthropic chat |
GOOGLE_API_KEY | empty | Google chat |
GROQ_API_KEY | empty | Legacy worker key distribution value, not a current Brain chat provider |
TOGETHER_API_KEY | empty | Legacy worker key distribution value, not a current Brain chat provider |
Workers running claude-code, codex, or antigravity need no provider key
here. Those CLIs carry their own login.
OLLAMA_LOCAL_HOSTS is a bootstrap only. After the first save in Cortex
Local models, the saved declarations take
precedence and clearing them does not reactivate the environment value.
Generation defaults
Unset controls delegate to the provider or adapter.
| Variable | Default | Meaning |
|---|---|---|
TEMPERATURE | unset | Sampling temperature |
TOP_P | unset | Nucleus sampling. Do not set with temperature |
FREQUENCY_PENALTY | unset | Repetition penalty where supported |
GENERATION_SEED | unset | Deterministic seed where supported |
STOP_SEQUENCES | empty | JSON list of stop strings, for example ["END"] |
REASONING_EFFORT | unset | Reasoning depth where the model exposes it |
Brain validates controls per provider and per model before a request is sent.
Accepted reasoning effort levels differ: OpenAI none through xhigh,
Anthropic low through max, Gemini minimal through high, Ollama none.
Current Claude models reject temperature and top-p outright.
Reasoning effort is offered only where the installed provider package can carry it. Older provider packages lose the control rather than sending a parameter the adapter would mishandle.
Embeddings and data roots
| Variable | Default | Meaning |
|---|---|---|
EMBEDDING_PROVIDER | ollama | ollama or openai |
EMBEDDING_MODEL | nomic-embed-text | Persisted collection embedding identity |
KNOWLEDGE_DIR | ~/Documents/brain | Source documents available for ingestion |
DATA_DIR | ~/.agent_asian | Brain data root: Chroma, canonical project memory, conversations, traces, and the Brain SQLite databases |
Keep the embedding provider and model stable after indexing. Each persistent collection records the identity that wrote its vectors and rejects a mismatch. Changing either value strands the existing store. To change them, use a new data root or rebuild the affected collections.
Content directories
These name the content Brain runs on. Nothing is discovered by scanning, so a directory does nothing until one of these settings names it.
| Variable | Default | Meaning |
|---|---|---|
INFLUENCE_LIBRARY_DIR | none, required | Books, notes, and rule documents used as retrieved evidence. Create it with agent influences init "<path>" |
VOICE_PACK_DIR | none, required | The voice pack holding lenses, registers, and exemplars. Create it with agent voice-pack init "<path>" |
INFLUENCE_PACK | <INFLUENCE_LIBRARY_DIR>/influence_pack.toml | The manifest declaring how library files are tagged. A tag is what lets a lens retrieve from a source |
VOICE_PACKS | empty | Extra packs loaded after VOICE_PACK_DIR, comma separated absolute paths. A later pack shadows an earlier one by id |
Four rules apply to both content directories.
- No folder in the influence library path may begin with a dot. Ingestion skips such paths entirely.
- Keep both outside
DATA_DIR, outsideKNOWLEDGE_DIR, and outside the repository worktree. Git does not track your library, sogit clean -xdfinside the repository deletes it. - On Windows use an explicit path, not a tilde.
- Preflight requires each directory to exist and to contain at least one supported file.
Required means required by preflight, which the run-all scripts execute
before starting Brain, Central, and Cortex. A worker is different: it never
runs preflight, so a worker with neither setting starts normally and silently
uses the built-in lens and register definitions. That is deliberate, because a
fatal error here would stop every worker over a voice pack problem. If a worker
should reason from your library, set both on the worker too and confirm through
GET /chat/influences that your ids resolved.
After the first Cortex pack configuration save, voice-pack-settings.json in
the Brain data root is authoritative for that host. Changing the environment
paths afterward does not silently replace saved Cortex choices. See
Voice packs.
Agent identity and voice behavior
| Variable | Default | Meaning |
|---|---|---|
USER_NAME | User | Name supplied to Brain for personalization |
USER_PROFILE | empty | Optional private profile text added to the system prompt |
AGENT_NAME | Asian | Assistant name |
REASONING_LENS | empty | Independent default reasoning lens |
VOICE_REGISTER | empty | Independent default delivery register |
INFLUENCE_PROFILE | none | Legacy paired default retained for existing API clients |
VOICE_LINT_ENABLED | true | Normalize safe mechanical voice issues after generation. Protected code, URLs, citations, and quotations are never rewritten |
VOICE_EXAMPLE_RETRIEVAL_ENABLED | true | Retrieve approved topic relevant style examples |
VOICE_EXAMPLE_LIMIT | 3 | Retrieval cap, validated from 0 to 3 |
VOICE_REVISION_MODE | off | Optional second local model polish pass: off, auto, or always |
VOICE_REVISION_MODEL | qwen3-coder | Local Ollama polish model |
VOICE_REVISION_MIN_SCORE | 85 | Deterministic threshold used by auto mode |
VOICE_REVISION_TEMPERATURE | 0.2 | Polish only temperature |
VOICE_VERIFIER_MODE | advisory | Local meaning check after polish: off, advisory, or required |
VOICE_VERIFIER_MODEL | empty | Optional verifier model. Blank uses the polish model |
DEBUG | false | Verbose Brain logging |
Leave REASONING_LENS and VOICE_REGISTER blank to preserve the legacy
INFLUENCE_PROFILE migration behavior.
Built-in reasoning lenses are none, strategic-council, sun-tzu,
machiavelli, negotiation, and power. Built-in delivery registers are
default, measured, plainspoken, tactical-calm, realistic-direct, and
strategic-direct. Your pack adds its own or shadows these by id.
GET /chat/influences lists whatever actually resolved.
The four VOICE_REVISION_* settings were renamed once and the old spellings
are no longer read. A surviving old key is accepted and ignored, so the setting
silently stops applying. Preflight prints a warning on standard error naming
the stale key. That warning is the whole safety net, so read startup output
after editing a voice variable.
Most of these have a Cortex equivalent that supersedes them per operator. See Chat defaults.
API access
| Variable | Default | Meaning |
|---|---|---|
AA_BIND_HOST | 127.0.0.1 | Bind address used by the standard launchers |
AA_API_TOKEN | empty | Shared bearer token required for non-loopback access |
AA_OPERATOR_TOKEN | empty | Additional token required only for HTTP retrieval with scope=all |
AA_ALLOWED_ORIGINS | local Cortex origins | Comma separated browser origins allowed to call the APIs |
AA_ALLOW_KEY_DISTRIBUTION | false | Allow Brain to return provider keys to legacy workers |
AA_ATTACHMENT_ROOTS | empty | Comma separated directories chat attachments may be picked from |
With no bearer token, Brain and Forge reject non-loopback clients even when they are accidentally bound to a LAN address. Health routes stay public by design, so a healthy response is not proof that protected routes are closed.
For LAN use:
AA_BIND_HOST=0.0.0.0
AA_API_TOKEN=<long-random-token>
AA_OPERATOR_TOKEN=<different-long-random-token>
AA_ALLOWED_ORIGINS=http://192.168.1.10:3000
SE_MANAGER_ALLOWED_PROJECT_ROOTS=/srv/projects
Paste the same bearer into Cortex and configure it on each worker. Restrict ports 3000, 8080, and 8081 to the trusted LAN. Do not expose them to the public internet.
Two limits belong beside these settings. AA_OPERATOR_TOKEN currently protects
only explicit scope=all retrieval and does not separately authorize other
operator routes. The worker loads the repository .env and copies that
environment into CLI and verification child processes, so a shared .env puts
the operator token on the worker. Until process specific secrets exist, supply
that token only to the Brain process or leave all-scope search disabled.
Leaving AA_ATTACHMENT_ROOTS unset means the act of picking a file is the only
gate, so a holder of AA_API_TOKEN can read any file the Brain process can
read. Set it whenever Brain is reachable off loopback.
Forge Central settings
Forge reads the SE_MANAGER_ prefix. DATA_DIR does not configure Forge.
| Variable | Default | Meaning |
|---|---|---|
SE_MANAGER_DATA_DIR | ~/.agent_asian | Forge database and operational files |
SE_MANAGER_PROJECTS_DIR | ~/projects | Default project root, and the authenticated fallback allowlist |
SE_MANAGER_ALLOWED_PROJECT_ROOTS | empty | Comma separated roots remote clients may register |
SE_MANAGER_WORKER_TIMEOUT | 120 | Seconds of missed heartbeat before a worker is marked offline |
SE_MANAGER_WORKER_HEARTBEAT_INTERVAL | 30 | Seconds between worker heartbeats |
SE_MANAGER_PINNED_WORKER_OFFLINE_GRACE_SECONDS | 3600 | Seconds a pinned worker may be offline before its pending tasks are reported as stranded |
SE_MANAGER_LEASE_TTL_SECONDS | 60 | Server owned task lease TTL |
SE_MANAGER_RUN_MAX_WALLCLOCK_SECONDS | 7200 | Absolute run lease cap enforced by Central |
SE_MANAGER_CLI_RUN_TIMEOUT_SECONDS | 1800 | Per run CLI timeout, enforced by the worker |
SE_MANAGER_DEFAULT_SUPERVISION | checkpoint | System default supervision mode |
SE_MANAGER_MAX_CONCURRENT_TASKS | 5 | Maximum tasks per worker |
SE_MANAGER_VERBOSE_TASK_LOGS | true | Ship detail tier worker log lines that Cortex can hide behind a toggle |
When a bearer token is set and SE_MANAGER_ALLOWED_PROJECT_ROOTS is blank,
Forge permits only SE_MANAGER_PROJECTS_DIR.
SE_MANAGER_HOST and SE_MANAGER_PORT exist on the settings object, but the
standard launchers pass host and ports directly to Uvicorn. Use AA_BIND_HOST
with the provided launchers.
How long a run may take
Three ceilings bound one run and the smallest one ends it.
- The CLI's own print mode wall. The Antigravity adapter sets that flag from the worker ceiling below, so it is not a separate number to configure.
SE_MANAGER_CLI_RUN_TIMEOUT_SECONDS, enforced by the worker running the CLI. Set it on the worker.SE_MANAGER_RUN_MAX_WALLCLOCK_SECONDS, enforced by Central, which expires the lease past the cap. The worker treats lease loss as a cancel and stops.
For runs measured in hours, raise 2 on every worker and 3 on Central, then restart both. Raising one alone has no effect past the other.
Worker settings
Every worker setting has a command line flag that overrides the variable.
| Flag | Variable | Default | Meaning |
|---|---|---|---|
--central-url | FORGE_CENTRAL_URL | http://localhost:8080 | Forge API |
--brain-url | BRAIN_API_URL | http://localhost:8081 | Brain rules and learnings API |
--api-token | AA_API_TOKEN | empty | Shared API bearer token |
--name | FORGE_WORKER_NAME | engine name | Stable instance identity, combined with hostname |
--capabilities | FORGE_WORKER_CAPABILITIES | python,javascript | Comma separated routing tags |
--poll-interval | FORGE_WORKER_POLL_INTERVAL | 10 | Seconds between empty polls |
--engine | FORGE_WORKER_ENGINE | claude-code | Default execution backend |
--permission | FORGE_WORKER_PERMISSION | write | Default task authority |
--max-permission | FORGE_WORKER_MAX_PERMISSION | write | Machine authority ceiling |
--shared-path | FORGE_SHARED_PATH | empty | Legacy engine shared filesystem root |
| Variable | Default | Meaning |
|---|---|---|
FORGE_WORKER_PIN_ENGINE | false | Take work for this engine only, instead of every CLI installed on the machine |
FORGE_WORKER_AGENTIC | false | Legacy alias that selects the agentic engine |
FORGE_WORKER_DANGEROUS | false | Deprecated alias that sets default and maximum permission to yolo |
FORGE_LEGACY_ALLOW_SHELL | false | Enable the legacy ReAct shell tool. It has no process sandbox |
SE_MANAGER_USAGE_CAPTURE_INTERVAL_SECONDS | 300 | Seconds between native Claude usage scans on this worker, 0 to 86,400; 0 disables collection |
SE_MANAGER_USAGE_TRANSCRIPT_ROOTS | [] | JSON list of Claude transcript roots on this host; empty means the worker's own ~/.claude/projects |
The two usage variables are read by Central as well, as its starting values; Central then uses the host-specific roots and interval saved from Analytics > Usage and savings measurement, and an empty saved root list on Central scans nothing. See Quality and feedback.
Registered backend names are claude-code, codex, codex-oss, and
antigravity. Legacy values agentic and legacy remain available.
Turn FORGE_WORKER_PIN_ENGINE on when running one worker per engine on one
box, so they divide the queue rather than compete for it:
FORGE_WORKER_ENGINE=codex FORGE_WORKER_NAME=codex \
FORGE_WORKER_PIN_ENGINE=true ./run-worker.sh
The legacy in-process knowledge tools also read BRAIN_URL. Prefer
BRAIN_API_URL and set both only when a legacy engine must target a
non-default Brain host.
WSL_DISTRO_NAME is supplied by WSL, not by the operator. AGENTASIAN reads it
to translate Windows style paths and choose a compatible SQLite journal mode.
Worker credentials
Per worker and per run credentials are automatic. Do not add them to .env.
The first registration saves a token under:
<SE_MANAGER_DATA_DIR>/worker-credentials/<hostname>-<instance>.token
Central stores only the hash. If the file is lost, remove the idle worker
registration from Cortex or with DELETE /workers/{id}, then restart the
worker.
Engine specific settings
| Engine | Requirement |
|---|---|
| Claude Code | Install and log in to the claude CLI on the worker. No provider key in .env |
| Codex | Install and log in to the codex CLI on the worker. No OPENAI_API_KEY needed for CLI execution |
| Codex OSS | Set CODEX_OSS_BASE_URL=http://localhost:11434/v1. The /v1 suffix is required. The adapter forwards only gpt-oss model names |
| Antigravity | Install agy, log in once interactively, and make its credential store available to the worker process. No GOOGLE_API_KEY needed for task execution |
Explicit Antigravity model ids reach the CLI unchanged, including its Claude and GPT-OSS choices. Invalid ids fail through native validation. An omitted model uses the CLI default.
Container configuration
Compose reads the repository .env twice. Once as the container environment,
which supplies the token, provider keys, and every non-path setting. Then the
environment: block overrides all six path settings, because host desktop
paths mean nothing inside a container:
DATA_DIR=/data INFLUENCE_LIBRARY_DIR=/content/influences
SE_MANAGER_DATA_DIR=/data VOICE_PACK_DIR=/content/voice
AA_BIND_HOST=0.0.0.0 KNOWLEDGE_DIR=/content/brain
Compose also reads four host side variables from the same file. They are ignored by the application:
AA_HOST_INFLUENCES=/srv/agentasian/influences
AA_HOST_VOICE=/srv/agentasian/voice
AA_HOST_KNOWLEDGE=/srv/agentasian/brain
AA_HOST_BACKUPS=/srv/agentasian/backups
Then set two values that name the host rather than the container:
AA_ALLOWED_ORIGINS=http://<host>:3000
OLLAMA_BASE_URL=http://<ollama-host>:11434
If Ollama runs on the Docker host itself, use
http://host.docker.internal:11434 and add
extra_hosts: ["host.docker.internal:host-gateway"] on Linux.
Mounting a content directory under /data is the tidy looking layout and the
one layout preflight rejects.
Portable paths and WSL
Windows absolute paths in .env are translated to /mnt/<drive>/... when the
process runs in WSL. Foreign worker paths are validated as pure paths and
stored verbatim. Do not run Central's live forge.sqlite3 through a WSL drvfs
or 9P mount. Run Central on the filesystem's native side. Workers may run on
another operating system and connect over HTTP.
Scratch instances
Use SE_MANAGER_DATA_DIR, not DATA_DIR, for a scratch Forge Central:
SE_MANAGER_DATA_DIR=/tmp/agentasian-forge-test \
python -m uvicorn forge.central.api:app --host 127.0.0.1 --port 18080
A fresh Forge root can copy legacy files from an older data location before its JSON to SQLite import. Inspect scratch state before treating it as empty.