Overview
Shannon uses environment variables for configuration across all services. This page documents all 100+ configuration options with types, defaults, and impact.Quick Reference
| Category | Variables | Service |
|---|---|---|
| Core Runtime | 3 | All |
| LLM Provider Keys | 11 | LLM Service |
| Web Search | 6 | LLM Service |
| Data Stores | 17 | All |
| Service Endpoints | 8 | All |
| Model Routing | 13 | Orchestrator, LLM Service |
| Cache & Rate Limiting | 8 | All |
| Tool Execution | 11 | Orchestrator, Agent Core |
| Security | 6 | Gateway, Orchestrator |
| Observability | 5 | All |
| WASI Sandbox | 4 | Agent Core, LLM Service |
| Integrations | 13 | LLM Service |
| Advanced | 20+ | Orchestrator |
Configuration File
Copy.env.example to .env and customize:
Core Runtime
ENVIRONMENT
Type: String Default:dev
Valid Values: dev, staging, prod
Services: All
Hot-Reload: No (requires restart)
Controls logging verbosity and policy enforcement.
dev: Verbose logging, relaxed policiesstaging: Moderate logging, standard policiesprod: Minimal logging, strict policies
DEBUG
Type: Boolean Default:false
Valid Values: true, false
Services: All
Hot-Reload: No
Enable debug logging across all services.
true: Debug-level logs, stack tracesfalse: Info-level logs only
SERVICE_NAME
Type: String Default:shannon-llm-service
Services: LLM Service
Hot-Reload: No
Service identifier for logging and telemetry.
LLM Provider API Keys
OPENAI_API_KEY
Type: String Required: At least one provider key Services: LLM Service Hot-Reload: Yes OpenAI API key for GPT models.ANTHROPIC_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Anthropic API key for Claude models.GOOGLE_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Google AI API key for Gemini models.GROQ_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Groq API key for fast inference.XAI_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes xAI API key for Grok models.DEEPSEEK_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes DeepSeek API key.QWEN_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Qwen API key for Alibaba Cloud models.MISTRAL_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Mistral API key.AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY
Type: String Services: LLM Service Hot-Reload: Yes AWS credentials for Bedrock models.ZAI_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes ZAI API key.Web Search Providers
WEB_SEARCH_PROVIDER
Type: String Default:google
Valid Values: google, serper, bing, exa, firecrawl
Services: LLM Service
Hot-Reload: Yes
Active web search provider.
GOOGLE_SEARCH_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Google Custom Search API key.SERPER_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Serper.dev API key (Google Search API alternative).BING_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Microsoft Bing Search API key.EXA_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Exa AI search API key.FIRECRAWL_API_KEY
Type: String Services: LLM Service Hot-Reload: Yes Firecrawl API key for web scraping.Data Stores
PostgreSQL
POSTGRES_HOST
Type: String Default:postgres
Services: Gateway, Orchestrator
Hot-Reload: No
PostgreSQL hostname.
POSTGRES_PORT
Type: Integer Default:5432
Range: 1-65535
Services: Gateway, Orchestrator
Hot-Reload: No
PostgreSQL port.
POSTGRES_DB
Type: String Default:shannon
Services: Gateway, Orchestrator
Hot-Reload: No
PostgreSQL database name.
POSTGRES_USER
Type: String Default:shannon
Services: Gateway, Orchestrator
Hot-Reload: No
PostgreSQL username.
POSTGRES_PASSWORD
Type: String Default:shannon
Services: Gateway, Orchestrator
Hot-Reload: No
PostgreSQL password.
POSTGRES_SSLMODE
Type: String Default:disable
Valid Values: disable, require, verify-ca, verify-full
Services: Gateway, Orchestrator
Hot-Reload: No
SSL mode for PostgreSQL connections.
Redis
REDIS_HOST
Type: String Default:redis
Services: All
Hot-Reload: No
Redis hostname.
REDIS_PORT
Type: Integer Default:6379
Services: All
Hot-Reload: No
Redis port.
REDIS_PASSWORD
Type: String Default: Empty Services: All Hot-Reload: No Redis password (if authentication enabled).REDIS_TTL_SECONDS
Type: Integer Default:3600
Range: 0-∞ (0 = no expiration)
Services: All
Hot-Reload: Yes
Default TTL for Redis keys.
REDIS_URL
Type: String Default:redis://redis:6379
Services: All
Hot-Reload: No
Full Redis connection URL.
LLM_REDIS_URL
Type: String Default: Empty (uses REDIS_URL) Services: LLM Service Hot-Reload: No Dedicated Redis instance for LLM response caching.Qdrant (Vector Store)
QDRANT_URL
Type: String Default:http://qdrant:6333
Services: Orchestrator, LLM Service
Hot-Reload: No
Qdrant connection URL.
QDRANT_HOST / QDRANT_PORT
Type: String / Integer Default:qdrant / 6333
Services: Orchestrator, LLM Service
Hot-Reload: No
Alternative to QDRANT_URL (host/port separately).
Service Endpoints
TEMPORAL_HOST
Type: String Default:temporal:7233
Services: Orchestrator
Hot-Reload: No
Temporal server address.
LLM_SERVICE_URL
Type: String Default:http://llm-service:8000
Services: Orchestrator, Agent Core
Hot-Reload: No
LLM Service endpoint.
AGENT_CORE_ADDR
Type: String Default:agent-core:50051
Services: Orchestrator
Hot-Reload: No
Agent Core gRPC address.
ORCHESTRATOR_GRPC
Type: String Default:orchestrator:50052
Services: Gateway
Hot-Reload: No
Orchestrator gRPC endpoint.
ADMIN_SERVER
Type: String Default:http://orchestrator:8081
Services: Gateway
Hot-Reload: No
Admin/SSE server for streaming events.
CONFIG_PATH
Type: String Default:./config/features.yaml
Services: Orchestrator, Agent Core
Hot-Reload: Yes (with file watcher)
Path to feature flags configuration.
MODELS_CONFIG_PATH
Type: String Default:./config/models.yaml
Services: LLM Service, Orchestrator
Hot-Reload: Yes (with file watcher)
Path to model and pricing configuration.
EVENTS_INGEST_URL
Type: String Default:http://orchestrator:8081/events
Services: Agent Core
Hot-Reload: No
Event ingestion endpoint.
Model Routing and Budgets
DEFAULT_MODEL_TIER
Type: String Default:small
Valid Values: small, medium, large
Services: Orchestrator
Hot-Reload: Yes
Default model tier for tasks.
small: GPT-5o-mini, Claude Haiku (~$0.15/1M tokens)medium: GPT-5o, Claude Sonnet (~$3-15/1M tokens)large: GPT-5, Claude Opus (~$15-75/1M tokens)
COMPLEXITY_MODEL_ID
Type: String Default:gpt-5
Services: Orchestrator
Hot-Reload: Yes
Model used for complexity analysis.
DECOMPOSITION_MODEL_ID
Type: String Default:claude-sonnet-4-20250514
Services: Orchestrator
Hot-Reload: Yes
Model used for task decomposition.
MAX_TOKENS
Type: Integer Default:2000
Range: 1-∞
Services: LLM Service
Hot-Reload: Yes
Default max output tokens per LLM call.
TEMPERATURE
Type: Float Default:0.7
Range: 0.0-2.0
Services: LLM Service
Hot-Reload: Yes
Default temperature for LLM sampling.
0.0: Deterministic, focused0.7: Balanced creativity1.0+: More random, creative
MAX_TOKENS_PER_REQUEST
Type: Integer Default:10000
Range: 1-∞
Services: Orchestrator
Hot-Reload: Yes
Maximum total tokens per task request.
MAX_COST_PER_REQUEST
Type: Float Default:0.50
Range: 0.0-∞
Services: Orchestrator
Hot-Reload: Yes
Maximum cost (USD) per task request.
LLM_DISABLE_BUDGETS
Type: Integer Default:1
Valid Values: 0, 1
Services: Orchestrator, LLM Service
Hot-Reload: Yes
Budget enforcement location.
1: Orchestrator manages budgets (recommended)0: LLM service enforces budgets
HISTORY_WINDOW_MESSAGES
Type: Integer Default:50
Range: 1-∞
Services: Orchestrator
Hot-Reload: Yes
Number of messages to include in conversation history.
HISTORY_WINDOW_DEBUG_MESSAGES
Type: Integer Default:75
Services: Orchestrator
Hot-Reload: Yes
History window size for debug mode.
WORKFLOW_SYNTH_BYPASS_SINGLE
Type: Boolean Default:true
Services: Orchestrator
Hot-Reload: Yes
Skip synthesis for single-result workflows.
true: Faster for simple tasks (skips synthesis step)false: Always synthesize results
TOKEN_BUDGET_PER_AGENT
Type: Integer Default: Empty (unlimited) Services: Orchestrator Hot-Reload: Yes Token budget per agent execution.TOKEN_BUDGET_PER_TASK
Type: Integer Default: Empty (unlimited) Services: Orchestrator Hot-Reload: Yes Token budget per entire task.Cache and Rate Limiting
ENABLE_CACHE
Type: Boolean Default:true
Services: LLM Service
Hot-Reload: Yes
Enable LLM response caching.
true: Cache responses in Redis, faster & cheaperfalse: Always hit LLM API
CACHE_SIMILARITY_THRESHOLD
Type: Float Default:0.95
Range: 0.0-1.0
Services: LLM Service
Hot-Reload: Yes
Semantic similarity threshold for cache hits.
1.0: Exact matches only0.95: Very similar queries0.8: Looser matching (more cache hits, less accuracy)
RATE_LIMIT_REQUESTS
Type: Integer Default:100
Services: Gateway
Hot-Reload: Yes
Requests per window per API key.
RATE_LIMIT_WINDOW
Type: Integer Default:60
Range: 1-∞ (seconds)
Services: Gateway
Hot-Reload: Yes
Rate limit window duration.
WEB_SEARCH_RATE_LIMIT
Type: Integer Default:120
Services: LLM Service
Hot-Reload: Yes
Web search requests per minute.
CALCULATOR_RATE_LIMIT
Type: Integer Default:2000
Services: LLM Service
Hot-Reload: Yes
Calculator tool requests per minute.
PYTHON_EXECUTOR_RATE_LIMIT
Type: Integer Default:60
Services: Agent Core
Hot-Reload: Yes
Python code execution requests per minute.
PARTIAL_CHUNK_CHARS
Type: Integer Default:512
Services: LLM Service
Hot-Reload: Yes
Characters per streaming chunk.
Tool Execution and Workflow
TOOL_PARALLELISM
Type: Integer Default:5
Range: 1-∞ (1 = sequential)
Services: Orchestrator, Agent Core
Hot-Reload: Yes
Concurrent tool executions.
1: Sequential execution (slower, safer)5: 5 tools in parallel (faster, more resources)10+: High parallelism (fastest, highest resource usage)
ENABLE_TOOL_SELECTION
Type: Integer Default:1
Valid Values: 0, 1
Services: Orchestrator
Hot-Reload: Yes
Automatic tool selection by planner.
1: Planner auto-selects tools (recommended)0: Manual tool specification only
PRIORITY_QUEUES
Type: String Default:off
Valid Values: on, off
Services: Orchestrator
Hot-Reload: Yes
Enable priority-based task queuing.
STREAMING_RING_CAPACITY
Type: Integer Default:1000
Services: Orchestrator
Hot-Reload: No
Ring buffer capacity for streaming events.
COMPRESSION_TRIGGER_RATIO
Type: Float Default:0.75
Range: 0.0-1.0
Services: Orchestrator
Hot-Reload: Yes
Context compression trigger threshold.
COMPRESSION_TARGET_RATIO
Type: Float Default:0.375
Range: 0.0-1.0
Services: Orchestrator
Hot-Reload: Yes
Target size after compression.
ENFORCE_TIMEOUT_SECONDS
Type: Integer Default:90
Services: Agent Core
Hot-Reload: Yes
Tool execution timeout.
ENFORCE_MAX_TOKENS
Type: Integer Default:32768
Services: Agent Core
Hot-Reload: Yes
Maximum tokens per agent execution.
ENFORCE_RATE_RPS
Type: Integer Default:20
Services: Agent Core
Hot-Reload: Yes
Rate limit (requests per second) for agent operations.
ENFORCE_CB_ERROR_THRESHOLD
Type: Float Default:0.5
Range: 0.0-1.0
Services: Agent Core
Hot-Reload: Yes
Circuit breaker error rate threshold.
ENFORCE_CB_WINDOW_SECONDS
Type: Integer Default:30
Services: Agent Core
Hot-Reload: Yes
Circuit breaker measurement window.
ENFORCE_CB_MIN_REQUESTS
Type: Integer Default:20
Services: Agent Core
Hot-Reload: Yes
Minimum requests before circuit breaker activates.
Approvals and Security
APPROVAL_ENABLED
Type: Boolean Default:false
Services: Orchestrator
Hot-Reload: Yes
Enable human-in-the-loop approvals.
APPROVAL_COMPLEXITY_THRESHOLD
Type: Float Default:0.5
Range: 0.0-1.0
Services: Orchestrator
Hot-Reload: Yes
Complexity threshold requiring approval.
APPROVAL_DANGEROUS_TOOLS
Type: String (comma-separated) Default:file_system,code_execution
Services: Orchestrator
Hot-Reload: Yes
Tools requiring approval.
APPROVAL_TIMEOUT_SECONDS
Type: Integer Default:7200
Services: Orchestrator
Hot-Reload: Yes
Approval request timeout (2 hours).
JWT_SECRET
Type: String Default:development-only-secret-change-in-production
Services: Gateway
Hot-Reload: No
JWT signing secret.
GATEWAY_SKIP_AUTH
Type: Integer Default:1
Valid Values: 0, 1
Services: Gateway
Hot-Reload: Yes (restart recommended)
Skip authentication (development only).
0 in production!
Templates
TEMPLATE_FALLBACK_ENABLED
Type: Boolean Default:false
Services: Orchestrator
Hot-Reload: Yes
Fallback to AI when template fails.
Observability and Telemetry
OTEL_SERVICE_NAME
Type: String Default:shannon-llm-service
Services: All
Hot-Reload: No
Service name for OpenTelemetry.
OTEL_EXPORTER_OTLP_ENDPOINT
Type: String Default:localhost:4317
Services: All
Hot-Reload: No
OTLP exporter endpoint.
OTEL_ENABLED
Type: Boolean Default:false
Services: All
Hot-Reload: No
Enable OpenTelemetry tracing.
LOG_FORMAT
Type: String Default:plain
Valid Values: plain, json
Services: Agent Core (Rust)
Hot-Reload: No
Log output format.
METRICS_PORT
Type: Integer Default:2112
Services: All
Hot-Reload: No
Prometheus metrics port.
Python WASI Sandbox
PYTHON_WASI_WASM_PATH
Type: String Default:./wasm-interpreters/python-3.11.4.wasm
Services: Agent Core, LLM Service
Hot-Reload: No
Path to Python WASI interpreter.
PYTHON_WASI_SESSION_TIMEOUT
Type: Integer Default:3600
Services: LLM Service
Hot-Reload: Yes
Python session timeout (seconds).
WASI_MEMORY_LIMIT_MB
Type: Integer Default:512
Services: Agent Core
Hot-Reload: Yes
WASI sandbox memory limit (MB).
WASI_TIMEOUT_SECONDS
Type: Integer Default:60
Services: Agent Core
Hot-Reload: Yes
WASI execution timeout.
OpenAPI and MCP
OpenAPI Integration
OPENAPI_ALLOWED_DOMAINS
Type: String Default:*
Services: LLM Service
Hot-Reload: Yes
Allowed domains for OpenAPI spec fetching.
OPENAPI_MAX_SPEC_SIZE
Type: Integer Default:5242880 (5 MB)
Services: LLM Service
Hot-Reload: Yes
Maximum OpenAPI spec file size.
OPENAPI_FETCH_TIMEOUT
Type: Integer Default:30
Services: LLM Service
Hot-Reload: Yes
Timeout for fetching OpenAPI specs.
OPENAPI_RETRIES
Type: Integer Default:2
Services: LLM Service
Hot-Reload: Yes
Retry attempts for OpenAPI operations (spec fetching and API calls).
MCP Integration
MCP_ALLOWED_DOMAINS
Type: String Default:*
Services: LLM Service
Hot-Reload: Yes
Allowed domains for MCP servers.
MCP_MAX_RESPONSE_BYTES
Type: Integer Default:10485760 (10 MB)
Services: LLM Service
Hot-Reload: Yes
Maximum MCP response size.
MCP_RETRIES
Type: Integer Default:3
Services: LLM Service
Hot-Reload: Yes
MCP request retry attempts.
MCP_TIMEOUT_SECONDS
Type: Integer Default:10
Services: LLM Service
Hot-Reload: Yes
MCP request timeout.
MCP_REGISTER_TOKEN
Type: String Default: Empty Services: LLM Service Hot-Reload: Yes Authentication token for MCP server registration.MCP_RATE_LIMIT_DEFAULT
Type: Integer Default:60
Services: LLM Service
Hot-Reload: Yes
Default rate limit for MCP tools (requests/minute).
MCP_CB_FAILURES
Type: Integer Default:5
Services: LLM Service
Hot-Reload: Yes
Circuit breaker failure threshold for MCP.
MCP_CB_RECOVERY_SECONDS
Type: Integer Default:60
Services: LLM Service
Hot-Reload: Yes
Circuit breaker recovery time.
MCP_COST_TO_TOKENS
Type: Integer Default:0
Services: LLM Service
Hot-Reload: Yes
Token cost multiplier for MCP tools.
Advanced Orchestrator Controls
EVENTLOG_BATCH_SIZE
Type: Integer Default:100
Services: Orchestrator
Hot-Reload: Yes
Events per batch for database writes.
EVENTLOG_BATCH_INTERVAL_MS
Type: Integer Default:100
Services: Orchestrator
Hot-Reload: Yes
Batch interval (milliseconds).
RATE_LIMIT_INTERVAL_MS
Type: Integer Default:60000
Services: Orchestrator
Hot-Reload: Yes
Rate limit window (milliseconds).
Worker Concurrency
Configure Temporal worker concurrency per priority queue:- Higher values = more concurrency, more resource usage
- Lower values = less concurrency, lower resource usage
LLM_TIMEOUT_SECONDS
Type: Integer Default:120
Services: Orchestrator
Hot-Reload: Yes
Timeout for LLM API calls.
Miscellaneous
SHANNON_WORKSPACE
Type: String Default:./workspace
Services: Agent Core
Hot-Reload: No
Workspace directory for file operations.
SEED_DATA
Type: Boolean Default:false
Services: All
Hot-Reload: No
Seed Qdrant with sample data on startup.
AGENT_TIMEOUT_SECONDS
Type: Integer Default:600
Services: Agent Core
Hot-Reload: Yes
Maximum runtime per agent execution.