Docs / Reference
Reference

Environment Variables

Complete reference for all environment variables used by Agent Kernel. All vars go in agent-kernel/.env.local.

⚠️
Never commit .env.local to version control. Use .env.example as a template with placeholder values only.

Core server

VariableDefaultDescription
PORT3006HTTP port for Agent Kernel API server
NODE_ENVdevelopmentSet to production in prod. Affects logging and error verbosity.
OPACUS_DEV_API_KEYRequired in dev. Master API key accepted by all authenticated routes. Use long random strings.
OPACUS_REQUIRE_EXECUTOR_REGISTRYtrueSet to false to use single private key fallback (dev only)

Execution wallet (Base chain)

VariableDescription
AGENT_EXECUTOR_PRIVATE_KEYRequired. Private key of the execution wallet. Signs all on-chain USDC transactions on Base.
BASE_RPC_URLBase mainnet RPC. Default: https://mainnet.base.org
BASE_USDC_ADDRESSUSDC contract on Base. Default: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

0G Network

VariableDescription
OG_RPC_URL0G EVM RPC. Mainnet: https://evmrpc.0g.ai  |  Testnet: https://evmrpc-testnet.0g.ai
OG_STORAGE_INDEXERStorage indexer. Mainnet: https://indexer-storage-turbo.0g.ai
OG_PRIVATE_KEYPrivate key for signing 0G storage transactions (can be same as executor key)
OG_PROVIDER_ADDRESS0G compute provider wallet address for GPU inference routing
OG_INFERENCE_TOKEN0G Labs inference API token (alternative auth for compute network)
OG_FLOW_CONTRACT0G Flow contract address (auto-detected from indexer if omitted)

Amazon / Shopping

VariableDescription
OPACUS_AMAZON_ORDER_API_URLURL for direct Amazon order connector. Without it, shopping runs in checkout mode only.
OPACUS_SHOPPING_MAX_USDCMaximum per-task budget cap for shopping agent. Default: 100

OpenClaw integration

VariableDescription
OPENCLAW_API_URLOpenClaw gateway URL. Default: auto-detected from local process
OPENCLAW_API_KEYOpenClaw authentication key if gateway requires it

AI provider keys (optional)

VariableDescription
ANTHROPIC_API_KEYAnthropic Claude API key for direct inference fallback
OPENAI_API_KEYOpenAI API key for direct inference fallback

Logging & monitoring

VariableDescription
LOG_LEVELinfo | debug | warn | error. Default: info
OPACUS_DISABLE_SIMULATESet to true to disable simulation mode and use real on-chain execution

Example .env.local

# Core
PORT=3006
NODE_ENV=production
OPACUS_DEV_API_KEY=sk-opacus-local-dev-change-this-in-production
OPACUS_REQUIRE_EXECUTOR_REGISTRY=false

# Base chain
AGENT_EXECUTOR_PRIVATE_KEY=0xabc123...
BASE_RPC_URL=https://mainnet.base.org

# 0G Network (mainnet)
OG_RPC_URL=https://evmrpc.0g.ai
OG_STORAGE_INDEXER=https://indexer-storage-turbo.0g.ai
OG_PRIVATE_KEY=0xabc123...
OG_PROVIDER_ADDRESS=0xProviderAddress...

# Optional AI keys
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
Previous
← REST API