Skip to main content
This is the env-var contract for the reference deployment. Variables marked required must be set or the service refuses to start.
Never commit real secrets to a public repo. Use Kubernetes secrets or a secret manager. Snippets below show names, not values.

Common (all services)

VariableRequiredNotes
NODE_ENVyesproduction in deployments.
LOG_LEVELnoinfo default; debug for verbose.
INTERNAL_TOKENyesShared secret for /internal/* calls between sibling services.

agentflow-api

VariableRequiredNotes
DATABASE_URLyesPostgres connection string.
JWT_SECRETyesHS256 secret for the af_session cookie.
SIWE_DOMAINyesDomain for SIWE messages (agentflow.website or your own).
COOKIE_DOMAINyesDomain for af_session cookie (.your-domain).
S3_ENDPOINTyesObject storage URL.
S3_BUCKETyesBucket name for screenshots and artifacts.
S3_ACCESS_KEYyes
S3_SECRET_KEYyes
CRYPTOBOT_API_TOKENoptionalEnables CryptoBot rail.
PLATEGA_MERCHANT_IDoptionalEnables Platega rail.
PLATEGA_SECREToptionalHMAC secret for Platega webhooks.
BSC_RPC_URLoptionalRPC endpoint for USDT BEP20 polling.
BSC_DEPOSIT_ADDRESSoptionalHot wallet address that receives deposits.
BSC_INDEXER_FROM_BLOCKoptionalInitial block to scan from on first run.

agentflow-agents

VariableRequiredNotes
API_BASE_URLyesInternal URL for agentflow-api.
INTERNAL_TOKENyesSame shared secret as in API.
OPENROUTER_API_KEYoptionalOpenRouter access. Either this or Anthropic.
ANTHROPIC_API_KEYoptionalAnthropic access via the OAuth proxy.
CLAUDE_OAUTH_PROXY_URLyesInternal URL for claude-oauth-proxy.

agentflow-runtime

VariableRequiredNotes
RUNTIME_SANDBOX_IMAGEyesContainer image used to spawn per-session sandboxes.
MAX_CONCURRENT_SESSIONSnoDefault 50. Increase based on cluster capacity.

claude-oauth-proxy

VariableRequiredNotes
CLAUDE_CLIENT_IDyesOAuth client for Anthropic / Claude API.
CLAUDE_CLIENT_SECRETyes
OPENROUTER_API_KEYoptionalIf routing through OpenRouter as well.

agentflow-bot

VariableRequiredNotes
TELEGRAM_BOT_TOKENyesFrom @BotFather.
API_BASE_URLyesInternal URL for agentflow-api.
INTERNAL_TOKENyes

Generating secrets

A safe way to generate JWT_SECRET and INTERNAL_TOKEN:
openssl rand -hex 32
Apply to Kubernetes:
kubectl -n agentflow create secret generic agentflow-secrets \
  --from-literal=JWT_SECRET=$(openssl rand -hex 32) \
  --from-literal=INTERNAL_TOKEN=$(openssl rand -hex 32)
Reference the secret from each Deployment via envFrom: [{ secretRef: { name: agentflow-secrets } }].
The INTERNAL_TOKEN must be identical across all services that talk to /internal/* endpoints. Rotate by rolling deployments in this order: API last, sibling services first, with the new token added before the old one is removed.