Skip to main content

Environment Variables

Generated by make docs-env from internal/config (229 variables). Do not edit; edit the Var beside the getter and regenerate.

Precedence, everywhere: a command-line flag beats the environment, the environment beats ~/.ailang/config.yaml, and the file beats the default. A getter in internal/config returns what the environment says (or the default); the command that owns a flag applies it above, and the package that owns a config-file section reads it below.

An empty Default means the variable is unset by default: the feature is off, or the value comes from the fallback the description names. The DEBUG_* compiler knobs are documented in Debugging, not here.

Cloud identity

VariableDefaultWhat it does
AILANG_CLOUD_PROJECTGCP project this process acts on; first of AILANG_CLOUD_PROJECT, GOOGLE_CLOUD_PROJECT, pubsub.project_id in the config file, then the GCE metadata server. No default: unresolved is an error.
AILANG_CLOUD_REGIONeurope-west1Cloud region; falls through GOOGLE_CLOUD_REGION to a deprecated default that warns once and is refused under AILANG_STRICT_CONFIG=1.
AILANG_CONFIG~/.ailang/config.yamlPath of the user config file that Load parses; every section reader goes through it.
AILANG_NO_METADATASet to anything to skip the GCE metadata server when resolving the project (a laptop pays the 500ms timeout once per process otherwise).
AILANG_STRICT_CONFIG01 or true makes every deprecated production default a hard error instead of a one-time warning — the v1.0.0 behaviour, rehearsable today.
GOOGLE_CLOUD_PROJECTProject set by Cloud Run, GKE and App Engine; second source for CloudProject and, with OTLP_GOOGLE_CLOUD_PROJECT, the switch that enables Cloud Trace export.
GOOGLE_CLOUD_REGIONRegion alias read after AILANG_CLOUD_REGION.
OTLP_GOOGLE_CLOUD_PROJECTProject Cloud Trace export targets. Setting it (or GOOGLE_CLOUD_PROJECT) is what turns export on; the config file and metadata server are deliberately not consulted.

Storage plane

VariableDefaultWhat it does
AILANG_STORAGElocalThe one plane switch: local (SQLite under the state dir), gcp (Firestore in the cloud project) or hybrid (SQLite stores that join the shared Pub/Sub plane).
AILANG_STORAGE_COORDINATORlocal or gcp; moves the coordinator store alone.
AILANG_STORAGE_MESSAGINGlocal or gcp; moves the messaging store alone, reported as its Source.
AILANG_STORAGE_OBSERVATORYlocal or gcp; moves the observatory store alone.
COORDINATOR_MODElocalCoordinator execution mode, local (worktrees on this host) or cloud (Cloud Run Jobs fed by Pub/Sub push); cloud is refused unless the coordinator and messaging stores are in Firestore.

Compiler and runtime

VariableDefaultWhat it does
AILANG_DTREE01 compiles match expressions through the experimental decision-tree compiler (no guards, no list/record/tuple patterns).
AILANG_DUMP_SMTSet to anything to keep the SMT-LIB file handed to Z3 instead of deleting it.
AILANG_FS_MAX_BYTESCap on every FS read (a byte count or K/M/G/T-suffixed size); unset or 0 is unbounded, --fs-max-bytes overrides it, and a malformed value is an error. serve-api uses its upload cap instead.
AILANG_FS_SANDBOXDirectory the FS effect is confined to; empty means no sandbox.
AILANG_FS_SANDBOX_DEBUG01 logs every sandbox rejection to stderr.
AILANG_HUB_URLCollaboration-hub URL the metrics collector POSTs to; unset sends nothing.
AILANG_MEMLIMITGo soft memory limit for run and serve-api: a size (256MB, 1GB) or the literal cgroup (the container's cgroup limit x 0.9); unset applies none, --max-memory overrides it, and a malformed value is an error. Best-effort GC tuning, not a hard bound.
AILANG_METRICS01 collects pipeline phase timings and memory for each compile.
AILANG_METRICS_DEBUG01 prints the raw phase-timing map to stderr.
AILANG_METRICS_VERBOSE01 prints a metrics summary to stderr at the end of the run.
AILANG_NO_CACHE01 disables the compile cache for this run.
AILANG_NO_PRELUDE01 starts the type checker with an empty instance environment instead of auto-importing std/prelude's Eq, Ord, Num and Show instances.
AILANG_NO_VERSION_WARNINGSSet to anything to suppress the stdlib version-mismatch warning.
AILANG_QUIET_WARNINGSSet by the CLI in JSON and quiet modes to suppress the stdlib version warning.
AILANG_RECORDS_V201 enables the records-v2 type-checker path.
AILANG_REDACT_ENVonoff disables redaction of sensitive environment values in traces and errors.
AILANG_RELAX_MODULES1, true or yes relaxes module checking, the same as --relax-modules; the flag and the variable are OR-ed.
AILANG_SEEDInteger seed for the effect runtime; when present, seeded mode may draw from Rand.
GOGCGo's GC percent; when unset the run and exec commands raise it to 500 for a faster compile.
GOMEMLIMITGo's own soft memory limit, applied by the Go runtime itself; ailang only reports it (doctor memory). Prefer AILANG_MEMLIMIT, which also understands cgroup.
LANGCLocale the effect runtime reports.
TZUTCTime zone the Clock effect reports.

Paths

VariableDefaultWhat it does
AILANG_BROWSER_PROFILE_DIRRoot for browser profiles used by the browser commands; unset derives one under the state dir.
AILANG_CACHE_DIRRoot of the compile cache (<dir>/compile) and the prompt cache; unset means <project>/.ailang/cache and $XDG_CACHE_HOME/ailang (else ~/.cache/ailang) respectively.
AILANG_EXAMPLESDirectory ailang examples reads instead of searching upward from the binary.
AILANG_PATHPath-list (OS separator) of extra module search roots, after the working directory and before ~/.ailang/modules.
AILANG_PROJECT_ROOTRoot the embed engine resolves module paths against; must contain the requested module or Load fails.
AILANG_STATE_DIR~/.ailangDirectory for every local store (SQLite databases, ledgers, locks). Read by internal/statedir itself — a stdlib-only leaf that cannot import this package — and registered here so the reference lists it.
AILANG_STDLIBOne stdlib directory the module loader and resolver use first; unset searches ../stdlib from the binary, then the working directory.
AILANG_STDLIB_PATHPath-list (OS separator) of stdlib roots searched before the bundled and installed copies; the embed engine sets it for child processes when unset.
AILANG_Z3_PATHPath of the z3 binary, tried before PATH and the usual install locations.
APPDATAWindows application-data base; the installed stdlib lives under it.
GOPATHGo workspace; the eval harness looks for $GOPATH/bin/ailang after PATH and ./bin.
HOMEThe user's home directory as the shell set it; used where a plist or a data-dir convention needs the literal value rather than os.UserHomeDir.
XDG_CACHE_HOMEXDG cache base; the prompt cache lives at $XDG_CACHE_HOME/ailang when AILANG_CACHE_DIR is unset.
XDG_DATA_HOMEXDG data base on Linux/BSD; the installed stdlib lives under it (else ~/.local/share).

Tracing

VariableDefaultWhat it does
AILANG_NO_TRACE01 selects the off tier when AILANG_TRACE is unset.
AILANG_TRACEstandardTracing tier: off, standard or deep (~2x overhead); an unknown value is an error.
AILANG_TRACE_MAX_SPANS500Cap on spans kept per trace; a non-integer or negative value keeps the default.
AILANG_TRACE_RECORDING01 records span names into the TraceRegistry at start-up.
AILANG_TRACE_VALUESValue-recording mode when the --trace-values flag is empty; an unknown value is an error, never a widening.

Telemetry export

VariableDefaultWhat it does
AILANG_OBSERVATORY_WAL_CHECKPOINT_MB1024Observatory SQLite WAL size in MB that triggers a checkpoint; non-positive or malformed keeps the default.
AILANG_OTLP_INGEST_TOKENShared secret the observatory's OTLP receiver requires from callers; empty disables ingest auth.
AILANG_PARENT_TASK_IDTask id of the parent that spawned this ailang process; inherited by check, run and exec for hierarchy linking.
AILANG_SESSION_IDSession id of this process, recorded on spans.
AILANG_SPAN_FILTER_ALLOWComma-separated span-name patterns the observatory keeps.
AILANG_SPAN_FILTER_DENYComma-separated span-name patterns the observatory drops.
AILANG_SPAN_FILTER_DISABLEfalsetrue disables the observatory's span filter entirely.
AILANG_TASK_IDCoordinator task id of this process, recorded on spans for cross-trace correlation.
GEMINI_TELEMETRY_TARGETWhere the Gemini CLI sends telemetry; when unset an executor with a cloud project sets gcp.
GOOGLE_CLOUD_LOCATIONGCP location handed to executors (Vertex / managed agents); empty means the executor's own default.
OTEL_ENVIRONMENTdevelopmentdeployment.environment resource attribute.
OTEL_EXPORTER_OTLP_ENDPOINTOTLP collector URL; setting it enables OTLP export, and executors default their children to http://localhost:1957 (the local observatory) when it is unset.
OTEL_EXPORTER_OTLP_METRICS_ENDPOINTPer-signal override of the metrics endpoint; validated as a URL when OTLP export is on.
OTEL_EXPORTER_OTLP_PROTOCOLOTLP transport (grpc, http/protobuf) passed through to executor children when set.
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTPer-signal override of the traces endpoint; validated as a URL when OTLP export is on.
OTEL_RESOURCE_ATTRIBUTESComma-separated key=value resource attributes merged into every span; executors extend it with task ids for their children.

Coordinator daemon

VariableDefaultWhat it does
AILANG_AGENT_CHECK_REPO_CONFIGPath of the repo config coordinator agent check and agent set validate against when --repo-config is not given.
AILANG_APPROVAL_AUTHORITY_MODELSfable,astra,opusComma-separated models allowed to rule on approvals.
AILANG_APPROVAL_BASE_URLPublic base URL for the secret-approval action links pushed to ntfy; unset skips the push.
AILANG_APPROVAL_CONTROLLER01 grants an attended session approval authority.
AILANG_APPROVAL_POLICYApproval policy override (evaluated, manual, ...); unset reads the coordinator config.
AILANG_APPROVAL_TIMEOUTHow long an approval request waits for a human, as a positive Go duration (e.g. 24h); unset serves the built-in wait as a deprecated default (D3).
AILANG_APPROVAL_TOKENBearer token the cloud secret approver authenticates its requests with.
AILANG_APPROVAL_URLService that serves /api/approvals (the dashboard), which secret() on the shared storage plane POSTs approval requests to; falls back to AILANG_COORDINATOR_URL, and unset leaves secret() un-gated as a deprecated default (D3).
AILANG_BACKSTOP_SWEEPreportBackstop sweep mode: dispatch runs stranded work, off disables the sweep, report (and any other value) only reports.
AILANG_BUDGET_UNLIMITED01 acknowledges that a task may run with NO spend cap when no budget resolves; unset serves that as a deprecated default (D3), refused under AILANG_STRICT_CONFIG=1.
AILANG_CONFIG_BUCKETGCS bucket holding the fleet's config.yaml; unset derives <project>-ailang-config from CloudProject.
AILANG_CONFIG_OBJECTconfig.yamlObject name of the fleet config inside AILANG_CONFIG_BUCKET.
AILANG_COORDINATOR_SERVICEailang-coordinatorCloud Run service name coordinator config roll restarts.
AILANG_COORDINATOR_URLCompatibility fallback for AILANG_APPROVAL_URL.
AILANG_COORD_HTTP_PORTPort the coordinator's HTTP API is on, for commands that must reach a running daemon; falls back to PORT.
AILANG_DEFAULT_PROVIDERProvider a task is attributed to for budgeting when neither the task nor its agent names one; unset serves claude as a deprecated default (D3).
AILANG_FEEDBACK_GATE_DRY_RUN1, true, yes or on forces the feedback gate into dry-run.
AILANG_FEEDBACK_GATE_MODEOverrides the feedback gate's configured mode (operator kill-switch).
AILANG_FEEDBACK_GATE_SHADOWoff | openrouter | direct: runs a System One decision model (sunholo/decisions, TypeSafe Jev) beside the feedback-gate classifier and records both verdicts in the audit row; never changes the action. Enabling it sends the submission body to TypeSafe — the operator's data-boundary ruling. Overrides coordinator.feedback_gate.shadow.
AILANG_KMS_KEYCloud KMS key resource that encrypts stored secrets and decrypts an ENC:-prefixed ANTHROPIC_API_KEY; unset means plaintext passthrough.
AILANG_MESSAGES_PROJECTPins the messaging store's Firestore project without moving anything else to the cloud project.
AILANG_REPO_URLRepository URL for task worktrees when the task's workspace does not name one.
AILANG_TOKEN_SECRETHMAC secret for approval tokens; unset generates one per process.
AILANG_WORKSPACEWorkspace a cloud process partitions its data under: the daemon's broadcast events and the execute-job's completion; unset serves default as a deprecated default (D3), refused under AILANG_STRICT_CONFIG=1.
COORDINATOR_API_KEYShared secret for the coordinator's HTTP API and the dashboard's WebSocket; the daemon rejects every request while it is unset (fail-closed since S3 M5) and ailang coordinator commands discover it from here first.
COORDINATOR_BIND_ADDRHost the daemon's HTTP server binds; unset is 127.0.0.1 locally and 0.0.0.0 in cloud mode.
GITHUB_WEBHOOK_SECRETHMAC secret for the /github/webhook route; unset means the route is not served.
PORTCloud Run's port convention: when set, the daemon starts its HTTP server on it, ailang server binds it on 0.0.0.0, and the registry validator listens on it (default 8080 there).
RESIDENT_LIFECYCLE_ALLOWED_CALLERSComma-separated principals allowed to call the lifecycle routes; unset means nobody.
RESIDENT_LIFECYCLE_AUDIENCEID-token audience the lifecycle routes verify; unset means nobody may call them.
RESIDENT_LIFECYCLE_PROJECTProject of the resident Cloud Run instances the lifecycle routes start and stop.
RESIDENT_LIFECYCLE_REGIONRegion of the resident instances.

Cloud Run job (execute-job)

VariableDefaultWhat it does
AILANG_ACKNOWLEDGE_ONLYfalseExactly true declares the task acknowledge-only (no file changes expected); anything else means changes were expected, so an older dispatcher fails loud rather than lenient.
AILANG_AGENT_IDAgent the job runs as; recorded on spans and completions.
AILANG_AGENT_POLICY_TOMLProgram policy (agent-policy.toml CONTENT) an ailang_only job's ailang_run is gated by; materialised read-only by execute-job. Unset = ailang_run refuses (default-deny).
AILANG_ARTIFACT_PATTERNSNewline-separated path patterns the dispatcher declared as the task's artifacts; the auto-merge scope guard.
AILANG_AUTO_MERGE01 lets the job enable GitHub auto-merge on a docs-only PR that matches the artifact patterns.
AILANG_BRANCHdevBranch the job clones and branches from.
AILANG_BRIEF_IDBrief id appended to the structured commit subject when AILANG_SITE_SLUG is set.
AILANG_CASCADE_CHANGE_CLASSChange class of the cascade (A content-only, B additive, ...); decides whether the deterministic path applies.
AILANG_CASCADE_ROOT_PACKAGERoot package of a package cascade; when set the job tries the deterministic bump first and the PR is labelled and titled as a cascade.
AILANG_CASCADE_TO_VERSIONVersion the cascade bumps the dependency to.
AILANG_DIRECTIVEThe task directive text handed to the executor and used to derive the PR title and body; unset derives one from the task and agent ids.
AILANG_GIT_AUTHOR_EMAILgit user.email for the job's commits; see AILANG_GIT_AUTHOR_NAME.
AILANG_GIT_AUTHOR_NAMEgit user.name for the job's commits; applied only together with AILANG_GIT_AUTHOR_EMAIL, since a half-configured identity is worse than the container default.
AILANG_GIT_MODEGit mode the executor's children run under; unset, the job exports guardrails before starting the executor.
AILANG_IMAGE_PROVIDERWhich provider image the job believes it runs in; verified against AILANG_PROVIDER and printed by preflight diagnostics.
AILANG_MAX_COST_USDPer-task cost budget in USD; unset or malformed means no cap (malformed is logged and ignored).
AILANG_MODELModel the executor runs; there is no default (an empty value fails at the point of use), and it names the commit co-author.
AILANG_PLUGIN_REPORepository of shared skills cloned into the job's plugin directory.
AILANG_PROVIDERProvider the dispatcher requested for the task; deliberately not defaulted, the job resolves and verifies it against the image.
AILANG_PUSH_BRANCHBranch the job commits to and pushes directly (skip_approval agents); set, it also replaces the clone branch.
AILANG_SITE_SLUGSite slug that turns the job's commit into a structured Build: <slug> message.
AILANG_SSH_HOST_ALIASagent-repoSSH host alias the deploy key is installed under.
AILANG_SSH_KEY_SECRETSecret Manager secret NAME holding a deploy key (never the key itself); set means the job installs it.
AILANG_SUBDIRECTORYMonorepo subdirectory the executor is scoped to, relative to the clone.
AILANG_TASK_TITLEHuman-written task title used as the message subject; unset derives one from the directive.
AILANG_TIMEOUTExecutor wall-clock as a Go duration; unset means the coordinator's default task timeout (2h).
AILANG_TOOL_POLICYTool-policy profile for the executor (full | ailang_only | canonical list); unset = the CLI's own defaults. Banked as tool_policy on the row.

Dashboard server

VariableDefaultWhat it does
AILANG_APPROVAL_SIGNING_KEYHMAC key that signs the secret-approval action links, so ntfy buttons can POST without IAM; unset disables those endpoints.
AILANG_DASHBOARD_URLDashboard base URL for commands that print or open links, after the --dashboard flag.
AILANG_FIREBASE_PROJECTFirebase / Firestore project for the dashboard's auth, workspaces and access control when --firebase-project is not given.
AILANG_HUB_TOKENBearer token the hub's /api/hooks/* routes require; unset leaves them open (local use).
BENCHMARKS_BUCKETailang-multivac-dev-benchmarksGCS bucket the benchmarks API reads through.

Executors

VariableDefaultWhat it does
AILANG_AUTH_MODEapikey makes the claude executor use ANTHROPIC_API_KEY (billed); anything else writes the OAuth credentials file from CLAUDE_CODE_OAUTH_TOKEN (subscription).
AILANG_EXECUTORExecutor name that overrides the config file's default_executor.
AILANG_MOTOKO_AGENT_SYSTEM_FILEFile whose content becomes motoko's system-role prompt for an A/B, keeping the teaching in the user message.
AILANG_MOTOKO_SYSTEM_ROLE10 stops motoko receiving the teaching prompt in the system role (the default sends it there; reverting to gated is a known regression).
CLAUDE_CONFIG_DIRClaude Code's config dir; when set the executor also writes credentials there, and the cloud job reads session JSONL from it.
MOTOKO_REPOmotoko_agent checkout whose .motoko/logfile holds session JSONL; MOTOKO.md says which one evals use.

Provider credentials

VariableDefaultWhat it does
ANTHROPIC_API_KEYAnthropic API key (METERED); the in-process client resolves it first, and the claude executor requires it under AILANG_AUTH_MODE=apikey and decrypts an ENC:-prefixed value with AILANG_KMS_KEY.
ANTHROPIC_AUTH_TOKENAnthropic OAuth access token from a Claude subscription profile (SUBSCRIPTION QUOTA); the in-process client resolves it after ANTHROPIC_API_KEY, matching the official SDKs.
CLAUDE_CODE_OAUTH_TOKENClaude Code subscription token: a JSON credential blob in cloud containers, which the in-process client resolves third; the claude executor writes it to the credentials file, and the mission loop's Anthropic quota reader uses it (an empty-but-set value deliberately bypasses the keychain).
GEMINI_API_KEYGemini API key the factory falls back to when GOOGLE_API_KEY is unset, Vertex ADC is unavailable and no key was given.
GITHUB_TOKENGitHub token for PR creation, docs search and read-only API calls; falls back to gh auth token where a command can shell out.
GOOGLE_API_KEYGoogle API key: the Gemini provider's credential variable and the Gemini embedder's key.
OLLAMA_API_KEYOllama Cloud API key; the mission admission policy observes quota with it.
OPENAI_API_KEYOpenAI API key; the codex executor bootstraps auth.json from it when the file is missing.
OPENROUTER_API_KEYOpenRouter API key; required by motoko smoke runs and the OpenRouter quota observer.
TYPESAFE_API_KEYTypeSafe direct API key (System One decision model, Jev): read by the sunholo/decisions package's TypeSafeDirect transport via std/env; the OpenRouter transport uses OPENROUTER_API_KEY instead. No Go code reads it — the row exists so the variable is documented and gated like every other provider key.

AI clients

VariableDefaultWhat it does
AILANG_AI_HTTP_LOGPath the OpenAI-compatible clients append their raw HTTP wire log to; unset falls back to the ai-http-log sentinel file under the state dir, and no sentinel means logging off.
BROWSERBASE_API_KEYBrowserbase API key for browser eval sessions when the benchmark's browser config does not name another variable (read through Raw, since the name is configurable).
BROWSERBASE_PROJECT_IDBrowserbase project id for browser eval sessions; same rule as the API key.
LYCEUM_BASE_URLhttps://api.lyceum.technology/openai/v1Overrides the Lyceum OpenAI-compatible endpoint, for tests and proxies.
OPENAI_BASE_URLBase URL for the OpenAI provider when the caller gives none; set alone it allows an unauthenticated custom endpoint.
OPENROUTER_CATEGORIESX-OpenRouter-Categories header sent to OpenRouter; same precedence as the referer.
OPENROUTER_HTTP_REFERERHTTP-Referer attribution header sent to OpenRouter; unset uses the built-in default, and a per-request Attribution overrides both.
OPENROUTER_X_TITLEX-Title attribution header sent to OpenRouter; same precedence as the referer.
ZAI_BASE_URLhttps://api.z.ai/api/paas/v4Overrides z.ai's PAYG OpenAI-compatible endpoint, for tests and proxies; pointing it at the coding-plan endpoint is a usage-policy violation.

Ollama

VariableDefaultWhat it does
AILANG_OLLAMA_HTTP_TIMEOUT_SECTotal budget for one /v1 call in seconds, with two meanings: buffered (flag off) it is the HTTP client timeout, default 300, where 0 or negative means no timeout; streaming (flag on) it is the mandatory hard deadline, default 3600, where 0, negative or unparseable is rejected at client construction.
AILANG_OLLAMA_IDLE_TIMEOUT_SEC120Streaming only: max silence between bytes in seconds before the typed idle-timeout trips; non-positive or malformed keeps the default.
AILANG_OLLAMA_LOG_REQUESTSJSONL path each logical request (and every streaming stream_metrics record) is appended to; unset falls back to the ollama-log-requests sentinel file under the state dir, whose contents are the path.
AILANG_OLLAMA_MAX_TOKENSOutput budget for the agentic path; a positive integer overrides both the request's value and the built-in floor.
AILANG_OLLAMA_NATIVE_TOOLS01 forces tool-calling turns down the legacy native /api/chat path instead of /v1.
AILANG_OLLAMA_NUM_CTXPins ollama's num_ctx on the non-tool paths; unset sends none so ollama sizes the context from the model. Raise or lower only for VRAM.
AILANG_OLLAMA_TEMPERATURESampling temperature for the agentic path when the request sets none; a value that is not a float > 0 sends no temperature, leaving the model default.
AILANG_OLLAMA_TTFT_TIMEOUT_SEC600Streaming only: max silence before the first byte in seconds (long on purpose: a cold 35B load takes minutes); non-positive or malformed keeps the default.
AILANG_OLLAMA_V1_STREAM0Exactly 1 opts the tool-calling /v1 path into streaming with the three watchdog windows; anything else keeps the buffered path with byte-identical requests.
OLLAMA_HOSTOllama server every client in the process talks to; set, it wins even over an explicit endpoint option, and unset means http://127.0.0.1:11434 (IPv4-pinned so the harness cannot reach an uncapped listener over ::1).

Embeddings

VariableDefaultWhat it does
AILANG_EMBED_GEMINI_MODELGemini embedding model over the config file; unset serves text-embedding-004 as a deprecated default (768 dimensions).
AILANG_EMBED_OPENAI_MODELOpenAI embedding model over the config file; unset serves text-embedding-3-small as a deprecated default (1536 dimensions).
AILANG_EMBED_PROVIDEREmbedding provider (ollama, openai, gemini, none) over the config file's embeddings.provider.
AILANG_OLLAMA_ENDPOINTOllama endpoint the embedder uses over the config file's embeddings.ollama.endpoint; set, it is exported as OLLAMA_HOST for the ollama client library.
AILANG_OLLAMA_MODELOllama embedding model over the config file's embeddings.ollama.model.

Eval harness

VariableDefaultWhat it does
AILANG_AGENT_OUTPUT_DELIVERY10 drops the agent-mode output-delivery override from the system prompt (a clean A/B control arm).
AILANG_AVERPath of the aver binary; unset looks on PATH, then $CARGO_HOME/bin/aver.
AILANG_BINThe ailang binary the agent-mode grade probe runs; unset resolves ailang on PATH and serves it as a deprecated default (the stale-binary trap), refused under AILANG_STRICT_CONFIG=1.
AILANG_EVAL_MAX_RSS8GResident-memory cap per generated-code run: a byte count or an integer with a K/M/G/T suffix; 0 or off disables the watchdog, and a malformed value is an error.
AILANG_EVAL_PERSIST_PROMPT01, true, on or yes delivers the full teaching prompt through a persistent system-prompt channel re-injected every turn (measured worse; for A/B only).
AILANG_EVAL_TRAPS_CARDPath of the traps card prepended to every agent-mode directive; unset loads the built-in card, and off (or 0/false/no/none) disables it.
AILANG_MOONPath of the moon (MoonBit) binary; unset looks on PATH, then $MOON_HOME/bin/moon.
AILANG_UVPath of the uv binary for Python benchmarks; unset looks it up on PATH.
CARGO_HOMECargo home searched for aver when it is not on PATH; unset means ~/.cargo.
MOON_HOMEMoonBit home searched for moon when it is not on PATH; unset means ~/.moon.
OBSERVATORY_ENDPOINThttp://localhost:1957Observatory API the eval suite creates and completes its task in.

Mission loop

VariableDefaultWhat it does
AILANG_ANTHROPIC_RATION10 turns off Anthropic subscription rationing for one attended process; unset means rationed.
AILANG_MISSION_REGISTRYAbsolute directory holding mission definitions, instead of the built-in registry.
CLAUDECODESet to 1 by Claude Code in the sessions it runs; used only to label an attended identity.
CLAUDE_CODE_SESSION_IDClaude Code session id, appended to the attended identity label.
CODEX_HOMECodex CLI home whose auth and quota files are observed; unset means ~/.codex.
CONTROLLER_IDIdentity of the mission controller acting in this process; used as the approval identity label.
MISSION_CONTROL_ACTIVE01 marks the process as running inside a mission-control iteration.
MISSION_GH_ISSUEGitHub issue number that overrides the mission's directive channel, so a cutover can be rehearsed against a scratch issue.
MISSION_METERED_BUDGET_USDMetered spend budget in USD for the mission's chain statistics; unset means no budget line.
MISSION_ROLERole the mission loop pinned this process to (controller, designer, executor, ...).
USERThe login user, the last-resort identity label and operator principal.

Rig lock

VariableDefaultWhat it does
AILANG_RIG_LOCK_HELD0Set to 1 by a lock holder for its children, which then skip their own acquire.
RIG_HANDOFF_FILEPath of the yield hand-off file; unset derives rig.handoff beside the lock directory.
RIG_LOCK_DIRLock directory; unset derives <RIG_SHARED_DIR>/rig.lock.d when that shared directory exists, else rig.lock.d under the state dir.
RIG_LOCK_STALE_MIN360Minutes without a heartbeat before a holder is presumed dead; a non-positive or malformed value keeps the default.
RIG_SHARED_DIR/Users/Shared/ailangMachine-wide parent for the lock so agents under different OS users contend for one; used only when an operator has created it.

Pub/Sub

VariableDefaultWhat it does
AILANG_TOPIC_PREFIXailangPrefix of every Pub/Sub topic name (<prefix>-messages, <prefix>-tasks, ...); terraform sets it per environment.

Package registry

VariableDefaultWhat it does
AILANG_REGISTRYhttps://storage.googleapis.com/ailang-registryBase URL of the package registry index the pkg commands read.
AILANG_REGISTRY_APIDeprecated alias of AILANG_REGISTRY_VALIDATOR, read after it.
AILANG_REGISTRY_API_KEYAPI key sent as X-API-Key to the validator for publish, unpublish and key management.
AILANG_REGISTRY_OBJECTregistry.ymlObject name models publish writes the model registry to.
AILANG_REGISTRY_VALIDATORhttps://registry.ailang.sunholo.comRegistry validator base URL (trailing slash trimmed).
FIRESTORE_DATABASEFirestore database holding scoped registry keys; unset runs the validator superuser-only.
FIRESTORE_KEYS_COLLECTIONailang_registry_keysFirestore collection of scoped registry keys.
REGISTRY_API_KEYSuperuser API key the registry validator accepts.
REGISTRY_BUCKETGCS bucket the registry validator serves; required, the service refuses to start without it.

Model registry

VariableDefaultWhat it does
AILANG_MODELS_PATHExplicit models.yml to load; a file named here that fails to parse is a hard error, and models publish publishes it (default internal/modelreg/models.yml).
AILANG_MODELS_PUBLISHED_DIR/registryDirectory of the published registry (the gcsfuse mount); a broken file there degrades to the embedded floor, loudly.

Prompt and MCP

VariableDefaultWhat it does
AILANG_MCP_QUIETSet to anything to silence the prompt-source note ailang prompt prints on a terminal.
AILANG_MCP_URLMCP endpoint ailang prompt and mcp status fetch the canonical prompt from; unset means the production endpoint.
AILANG_MCP_VERBOSESet to anything to print the prompt-source note even when stdout is not a terminal.
AILANG_NO_GITHUB_SEARCHSet to anything to stop ailang docs search falling back to the GitHub backend when local docs are missing.

MicroRAG

VariableDefaultWhat it does
AILANG_MICRORAG_DRYRUNfalse1 or true retrieves and logs without injecting.
AILANG_MICRORAG_ENABLEDtrue0 or false turns the engine off; anything else (including an invalid value) leaves it on — it does not fail closed.
AILANG_MICRORAG_ROUTESComma-separated allowlist of routes the engine serves; unset allows all.
AILANG_MICRORAG_SESSIONSession id that names the ledger directory; unset uses pid-<pid> so concurrent sessions do not share one.
AILANG_MICRORAG_USERPROMPT_FLOOR0.70Relevance floor in (0, 1] for the user-prompt path; out of range or malformed keeps the default rather than widening the gate.

serve-api

VariableDefaultWhat it does
AILANG_RATELIMIT_BURST3submit_feedback burst allowance per client.
AILANG_RATELIMIT_RPM5submit_feedback requests per minute per client.
AILANG_SERVE_API_ALLOW_DROPS01 lets serve-api start with @route-bearing modules dropped for lying outside its base path (not for production).

Notifications

VariableDefaultWhat it does
AILANG_DISCORD_WEBHOOK_URLDiscord webhook the notify daemon posts to; unset falls back to the macOS login keychain, then to no Discord channel.
AILANG_NTFY_AUTH_TOKENBearer token for the ntfy server, when it requires one.
AILANG_NTFY_SERVER_URLntfy server the coordinator pushes secret-approval requests to; unset (or no topic) skips the push.
AILANG_NTFY_TOPICntfy topic for secret-approval pushes.