Skip to main content

Overview

Shannon uses environment variables for configuration across all services. This page documents all 100+ configuration options with types, defaults, and impact.

Quick Reference

Total: 100+ configuration variables

Configuration File

Copy .env.example to .env and customize:
Restart services after changes:

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.
Impact:
  • dev: Verbose logging, relaxed policies
  • staging: Moderate logging, standard policies
  • prod: Minimal logging, strict policies

DEBUG

Type: Boolean Default: false Valid Values: true, false Services: All Hot-Reload: No Enable debug logging across all services.
Impact:
  • true: Debug-level logs, stack traces
  • false: 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.
Models Enabled: GPT-5, GPT-5-mini, GPT-5-nano
Required for semantic memory features (text embeddings). Without this key, vector search and agent memory will be disabled.

ANTHROPIC_API_KEY

Type: String Services: LLM Service Hot-Reload: Yes Anthropic API key for Claude models.
Models Enabled: Claude 4.5 Sonnet, Claude 4.1 Opus, Claude 4.5 Haiku

GOOGLE_API_KEY

Type: String Services: LLM Service Hot-Reload: Yes Google AI API key for Gemini models.
Models Enabled: Gemini Pro, Gemini Flash

GROQ_API_KEY

Type: String Services: LLM Service Hot-Reload: Yes Groq API key for fast inference.
Models Enabled: Llama 3, Mixtral

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.
Models Enabled: Claude (Bedrock), Llama (Bedrock), Titan

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, serpapi, searchapi, bing, exa, firecrawl Services: LLM Service Hot-Reload: Yes Active web search provider.
Providers:
  • searchapi — SearchAPI.io — multi-engine search ($0.004/call)

GOOGLE_SEARCH_API_KEY

Type: String Services: LLM Service Hot-Reload: Yes Google Custom Search API key.
Obtain from: https://console.cloud.google.com/apis/credentials

SERPER_API_KEY

Type: String Services: LLM Service Hot-Reload: Yes Serper.dev API key (Google Search API alternative).
Obtain from: https://serper.dev

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.

SEARCHAPI_API_KEY

Type: String Required: No Default: (none) Services: LLM Service Hot-Reload: Yes API key for SearchAPI.io. Get one at searchapi.io.

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.
Security: Change in production!

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.
Impact: Cache duration for sessions, events, responses

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.
Use Case: Separate LLM cache from session data for scaling

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.
Tiers:
  • small: GPT-5-nano, Claude Haiku (~$0.15/1M tokens)
  • medium: GPT-5-mini, Claude Sonnet (~$3-15/1M tokens)
  • large: GPT-5.1, 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-5-20250929 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.
Impact:
  • 0.0: Deterministic, focused
  • 0.7: Balanced creativity
  • 1.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.
Impact: Hard budget limit, task fails when exceeded

MAX_COST_PER_REQUEST

Type: Float Default: 0.50 Range: 0.0-∞ Services: Orchestrator Hot-Reload: Yes Maximum cost (USD) per task request.
Impact: Task fails when cost exceeds this limit

LLM_DISABLE_BUDGETS

Type: Integer Default: 1 Valid Values: 0, 1 Services: Orchestrator, LLM Service Hot-Reload: Yes Budget enforcement location.
Values:
  • 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.
Impact:
  • 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.
Impact:
  • true: Cache responses in Redis, faster & cheaper
  • false: 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.
Impact:
  • 1.0: Exact matches only
  • 0.95: Very similar queries
  • 0.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.
Combined:

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: 1 Range: 1-∞ (1 = sequential) Services: Orchestrator, Agent Core Hot-Reload: Yes Concurrent tool executions.
Impact:
  • 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.
Values:
  • 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.
Impact: Compress context when 75% of token budget used

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.
Impact: Circuit opens when 50% of requests fail

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: 1800 Services: Orchestrator Hot-Reload: Yes Approval request timeout (30 minutes).

JWT_SECRET

Type: String Default: development-only-secret-change-in-production Services: Gateway Hot-Reload: No JWT signing secret.
Security: Must change in production!

GATEWAY_SKIP_AUTH

Type: Integer Default: 1 Valid Values: 0, 1 Services: Gateway Hot-Reload: Yes (restart recommended) Skip authentication (development only).
Security: Must set to 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: 3 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:
Impact:
  • 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.

SHANNON_SESSION_WORKSPACES_DIR

Type: String Default: /tmp/shannon-sessions Services: Gateway, Agent Core Hot-Reload: No Base directory for session-isolated workspace files. Each session gets a subdirectory.

SHANNON_USE_WASI_SANDBOX

Type: Boolean (0/1) Default: 0 Services: Agent Core Hot-Reload: No Enable WASI sandbox for file operations. When enabled, file access is mediated through the Firecracker executor for security isolation.

SHANNON_MAX_WORKSPACE_SIZE_MB

Type: Integer Default: 100 Services: Agent Core Hot-Reload: No Maximum disk quota per session workspace in megabytes.

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.

Configuration Examples

Development

Production

High Performance

Cost Optimized

Troubleshooting

See Configuration Troubleshooting for common issues.

Docker Compose

Docker deployment guide

Kubernetes

Kubernetes deployment

Performance Tuning

Optimize performance

Security

Security hardening