Skip to main content

Environment variables

The CLI and runtime read a small set of environment variables. All of them have safe defaults.

Core runtime

VariableDefaultPurpose
DECLARAGENT_CONFIG_DIR$HOME/.declaragentOverrides the per-user config directory. Used by the Cloud Run Dockerfile to mount /etc/declaragent.
DECLARAGENT_TELEMETRY1Set to 0 to opt out of the three first-run telemetry events (installed, wizard_completed, deploy_invoked).
DECLARAGENT_LOG_LEVELinfoOne of trace, debug, info, warn, error. Runbooks frequently set debug to trace connection errors.
DECLARAGENT_OFFLINEunsetIf set, skips any network calls outside the configured provider. Affects the wizard's verify step + declaragent upgrade (post-v1.0).

Installer

VariableDefaultPurpose
DECLARAGENT_VERSIONlatestTag to install. curl + npm paths both honor it.
DECLARAGENT_PREFIX$HOME/.localInstall prefix for the curl installer. Binary lands at $PREFIX/bin/declaragent.
DECLARAGENT_BASE_URLGitHub releasesRelease origin override. Used by CI smoke tests to stage a local mirror.
DECLARAGENT_NO_CHECKSUMunsetSkips the SHA-256 verify. Never set this in production.
DECLARAGENT_NO_POSTINSTALLunsetnpm path only. Skips the binary download; the launcher prints a hint.
DECLARAGENT_SIZE_BUDGET_MB120Build-only. Used by scripts/build-binary.sh to fail the release if the compiled binary exceeds the budget.

Chaos / integration harnesses

Flags for the Phase 6 chaos + integration suites. Not used in normal operation.

VariablePurpose
DECLARAGENT_CHAOS=1Enables the chaos harness when running the daemon under test.
DECLARAGENT_CHANNEL_IT=1Enables nightly real-platform channel integration tests.
DECLARAGENT_SECRETS_IT=1Enables real Vault / AWS SM / GCP SM integration tests.
DECLARAGENT_E2E=1Runs the Phase-1 live-Anthropic smoke test.
DECLARAGENT_INTEGRATION=1Gates adapter Docker Compose suites (Kafka, SQS, AMQP, MQTT, NATS).

Provider API keys

Each provider preset declares a canonical envVar. If set, the CLI picks it up automatically — no need to run declaragent auth login.

ProviderEnv var
AnthropicANTHROPIC_API_KEY
OpenAIOPENAI_API_KEY
OpenRouterOPENROUTER_API_KEY
GroqGROQ_API_KEY
DeepSeekDEEPSEEK_API_KEY
TogetherTOGETHER_API_KEY
MistralMISTRAL_API_KEY
xAI (Grok)XAI_API_KEY
Ollama (local)OLLAMA_API_KEY (usually empty)
LM Studio (local)LMSTUDIO_API_KEY (usually empty)
llama.cpp (local)LLAMACPP_API_KEY (usually empty)

See Provider matrix for per-provider features.

Cloud / secrets

Inherit from each provider SDK. Listed for completeness:

VariableUsed by
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKENAWS Secrets Manager resolver, SQS source.
KUBERNETES_SERVICE_HOST / KUBERNETES_SERVICE_PORT_HTTPSKubernetes secret resolver (auto-detected when pod-mounted).
WEBHOOK_SECRET / TEST_WEBHOOK_SECRET / TEST_WEBHOOK_TOKENWebhook source HMAC verification.

[placeholder — landing 2026-Q2] Slice 7.5 polish: every remaining adapter-specific env var (Slack bot tokens, Telegram tokens, etc.) will be auto-extracted from each adapter's README.md so this table stays in sync.