Skip to main content

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:

  1. Command line flags on the worker process.
  2. Exported shell environment values.
  3. Values in .env.
  4. 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.

OwnerVariables it reads
Launch scriptsAA_BIND_HOST
BrainUnprefixed chat, embedding, memory, content, and voice variables
Forge CentralSE_MANAGER_*
WorkerFORGE_*, BRAIN_API_URL, AA_API_TOKEN, SE_MANAGER_CLI_RUN_TIMEOUT_SECONDS, and engine variables
CortexNothing 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​

VariableDefaultMeaning
LLM_PROVIDERollamaOne of ollama, openai, anthropic, google
LLM_MODELllama3.1:8bDefault chat model. The chat agent dispatches work through tool calls, so choose a tool calling model
OLLAMA_BASE_URLhttp://localhost:11434Ollama service address
OLLAMA_NUM_CTX32768Ollama context window. It must hold the system prompt plus every tool schema, or tool calling truncates and dispatch fails
OLLAMA_LOCAL_HOSTSemptyComma separated bootstrap list of exact LAN hosts treated as local processing. Hostnames or IP addresses only, no URLs, ports, wildcards, or subnets
OPENAI_API_KEYemptyOpenAI chat and optional embeddings
OPENAI_BASE_URLemptyOptional compatible base URL used by legacy worker paths and key distribution
ANTHROPIC_API_KEYemptyAnthropic chat
GOOGLE_API_KEYemptyGoogle chat
GROQ_API_KEYemptyLegacy worker key distribution value, not a current Brain chat provider
TOGETHER_API_KEYemptyLegacy 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.

VariableDefaultMeaning
TEMPERATUREunsetSampling temperature
TOP_PunsetNucleus sampling. Do not set with temperature
FREQUENCY_PENALTYunsetRepetition penalty where supported
GENERATION_SEEDunsetDeterministic seed where supported
STOP_SEQUENCESemptyJSON list of stop strings, for example ["END"]
REASONING_EFFORTunsetReasoning 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​

VariableDefaultMeaning
EMBEDDING_PROVIDERollamaollama or openai
EMBEDDING_MODELnomic-embed-textPersisted collection embedding identity
KNOWLEDGE_DIR~/Documents/brainSource documents available for ingestion
DATA_DIR~/.agent_asianBrain 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.

VariableDefaultMeaning
INFLUENCE_LIBRARY_DIRnone, requiredBooks, notes, and rule documents used as retrieved evidence. Create it with agent influences init "<path>"
VOICE_PACK_DIRnone, requiredThe voice pack holding lenses, registers, and exemplars. Create it with agent voice-pack init "<path>"
INFLUENCE_PACK<INFLUENCE_LIBRARY_DIR>/influence_pack.tomlThe manifest declaring how library files are tagged. A tag is what lets a lens retrieve from a source
VOICE_PACKSemptyExtra 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.

  1. No folder in the influence library path may begin with a dot. Ingestion skips such paths entirely.
  2. Keep both outside DATA_DIR, outside KNOWLEDGE_DIR, and outside the repository worktree. Git does not track your library, so git clean -xdf inside the repository deletes it.
  3. On Windows use an explicit path, not a tilde.
  4. 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​

VariableDefaultMeaning
USER_NAMEUserName supplied to Brain for personalization
USER_PROFILEemptyOptional private profile text added to the system prompt
AGENT_NAMEAsianAssistant name
REASONING_LENSemptyIndependent default reasoning lens
VOICE_REGISTERemptyIndependent default delivery register
INFLUENCE_PROFILEnoneLegacy paired default retained for existing API clients
VOICE_LINT_ENABLEDtrueNormalize safe mechanical voice issues after generation. Protected code, URLs, citations, and quotations are never rewritten
VOICE_EXAMPLE_RETRIEVAL_ENABLEDtrueRetrieve approved topic relevant style examples
VOICE_EXAMPLE_LIMIT3Retrieval cap, validated from 0 to 3
VOICE_REVISION_MODEoffOptional second local model polish pass: off, auto, or always
VOICE_REVISION_MODELqwen3-coderLocal Ollama polish model
VOICE_REVISION_MIN_SCORE85Deterministic threshold used by auto mode
VOICE_REVISION_TEMPERATURE0.2Polish only temperature
VOICE_VERIFIER_MODEadvisoryLocal meaning check after polish: off, advisory, or required
VOICE_VERIFIER_MODELemptyOptional verifier model. Blank uses the polish model
DEBUGfalseVerbose 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​

VariableDefaultMeaning
AA_BIND_HOST127.0.0.1Bind address used by the standard launchers
AA_API_TOKENemptyShared bearer token required for non-loopback access
AA_OPERATOR_TOKENemptyAdditional token required only for HTTP retrieval with scope=all
AA_ALLOWED_ORIGINSlocal Cortex originsComma separated browser origins allowed to call the APIs
AA_ALLOW_KEY_DISTRIBUTIONfalseAllow Brain to return provider keys to legacy workers
AA_ATTACHMENT_ROOTSemptyComma 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.

VariableDefaultMeaning
SE_MANAGER_DATA_DIR~/.agent_asianForge database and operational files
SE_MANAGER_PROJECTS_DIR~/projectsDefault project root, and the authenticated fallback allowlist
SE_MANAGER_ALLOWED_PROJECT_ROOTSemptyComma separated roots remote clients may register
SE_MANAGER_WORKER_TIMEOUT120Seconds of missed heartbeat before a worker is marked offline
SE_MANAGER_WORKER_HEARTBEAT_INTERVAL30Seconds between worker heartbeats
SE_MANAGER_PINNED_WORKER_OFFLINE_GRACE_SECONDS3600Seconds a pinned worker may be offline before its pending tasks are reported as stranded
SE_MANAGER_LEASE_TTL_SECONDS60Server owned task lease TTL
SE_MANAGER_RUN_MAX_WALLCLOCK_SECONDS7200Absolute run lease cap enforced by Central
SE_MANAGER_CLI_RUN_TIMEOUT_SECONDS1800Per run CLI timeout, enforced by the worker
SE_MANAGER_DEFAULT_SUPERVISIONcheckpointSystem default supervision mode
SE_MANAGER_MAX_CONCURRENT_TASKS5Maximum tasks per worker
SE_MANAGER_VERBOSE_TASK_LOGStrueShip 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.

  1. 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.
  2. SE_MANAGER_CLI_RUN_TIMEOUT_SECONDS, enforced by the worker running the CLI. Set it on the worker.
  3. 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.

FlagVariableDefaultMeaning
--central-urlFORGE_CENTRAL_URLhttp://localhost:8080Forge API
--brain-urlBRAIN_API_URLhttp://localhost:8081Brain rules and learnings API
--api-tokenAA_API_TOKENemptyShared API bearer token
--nameFORGE_WORKER_NAMEengine nameStable instance identity, combined with hostname
--capabilitiesFORGE_WORKER_CAPABILITIESpython,javascriptComma separated routing tags
--poll-intervalFORGE_WORKER_POLL_INTERVAL10Seconds between empty polls
--engineFORGE_WORKER_ENGINEclaude-codeDefault execution backend
--permissionFORGE_WORKER_PERMISSIONwriteDefault task authority
--max-permissionFORGE_WORKER_MAX_PERMISSIONwriteMachine authority ceiling
--shared-pathFORGE_SHARED_PATHemptyLegacy engine shared filesystem root
VariableDefaultMeaning
FORGE_WORKER_PIN_ENGINEfalseTake work for this engine only, instead of every CLI installed on the machine
FORGE_WORKER_AGENTICfalseLegacy alias that selects the agentic engine
FORGE_WORKER_DANGEROUSfalseDeprecated alias that sets default and maximum permission to yolo
FORGE_LEGACY_ALLOW_SHELLfalseEnable the legacy ReAct shell tool. It has no process sandbox
SE_MANAGER_USAGE_CAPTURE_INTERVAL_SECONDS300Seconds 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​

EngineRequirement
Claude CodeInstall and log in to the claude CLI on the worker. No provider key in .env
CodexInstall and log in to the codex CLI on the worker. No OPENAI_API_KEY needed for CLI execution
Codex OSSSet CODEX_OSS_BASE_URL=http://localhost:11434/v1. The /v1 suffix is required. The adapter forwards only gpt-oss model names
AntigravityInstall 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.