Skip to main content

Environment Variables

Complete reference for all KOSMOS configuration options.

Auto-Generated

This documentation is automatically extracted from the Pydantic settings classes.

Application settings loaded from environment variables.

Core

VariableTypeDefaultDescription
KOSMOS_ENVstr"development"Configure env
KOSMOS_DEBUGboolTrueConfigure debug
KOSMOS_SECRET_KEYstr"change-me-in-production"Configure secret key
KOSMOS_LOG_LEVELstr"INFO"Configure log level

Database

VariableTypeDefaultDescription
KOSMOS_DATABASE_URLstrField(...)Configure database url

Cache

VariableTypeDefaultDescription
KOSMOS_REDIS_URLstrField(...)Configure redis url

Messaging

VariableTypeDefaultDescription
KOSMOS_NATS_URLstrField(...)Configure nats url

Storage

VariableTypeDefaultDescription
KOSMOS_MINIO_HOSTstr"localhost"Configure minio host
KOSMOS_MINIO_PORTint9000Configure minio port
KOSMOS_MINIO_ACCESS_KEYstr"minioadmin"Configure minio access key
KOSMOS_MINIO_SECRET_KEYstr"minioadmin"Configure minio secret key
KOSMOS_MINIO_BUCKETstr"kosmos"Configure minio bucket

Authentication

VariableTypeDefaultDescription
KOSMOS_ZITADEL_DOMAINstr"localhost:8080"Configure zitadel domain
KOSMOS_ZITADEL_PROJECT_IDOptional[str]NoneConfigure zitadel project id
KOSMOS_ZITADEL_CLIENT_IDOptional[str]NoneConfigure zitadel client id
KOSMOS_ZITADEL_CLIENT_SECRETOptional[str]NoneConfigure zitadel client secret

LLM Providers

VariableTypeDefaultDescription
KOSMOS_OPENAI_API_KEYOptional[str]Field(...)Configure openai api key
KOSMOS_ANTHROPIC_API_KEYOptional[str]Field(...)Configure anthropic api key
KOSMOS_HUGGINGFACE_API_KEYOptional[str]Field(...)Configure huggingface api key
KOSMOS_LITELLM_URLstrField(...)Configure litellm url
KOSMOS_LITELLM_MASTER_KEYOptional[str]Field(...)Configure litellm master key

Observability

VariableTypeDefaultDescription
KOSMOS_LANGFUSE_PUBLIC_KEYOptional[str]NoneConfigure langfuse public key
KOSMOS_LANGFUSE_SECRET_KEYOptional[str]NoneConfigure langfuse secret key
KOSMOS_LANGFUSE_HOSTstr"http://localhost:3001"Configure langfuse host
KOSMOS_JAEGER_AGENT_HOSTstr"localhost"Configure jaeger agent host
KOSMOS_JAEGER_AGENT_PORTint6831Configure jaeger agent port

CORS

VariableTypeDefaultDescription
KOSMOS_CORS_ORIGINSList[str]["http://localhost:3000", "http://localhost:8000"]Configure cors origins

Agent Settings

VariableTypeDefaultDescription
KOSMOS_ZEUS_MAX_ITERATIONSint10Configure zeus max iterations
KOSMOS_ZEUS_TIMEOUT_SECONDSint120Configure zeus timeout seconds
KOSMOS_PENTARCHY_VOTE_TIMEOUT_SECONDSint30Configure pentarchy vote timeout seconds

Cost Governance

VariableTypeDefaultDescription
KOSMOS_COST_AUTO_APPROVE_MAXfloat50.0Configure cost auto approve max
KOSMOS_COST_PENTARCHY_VOTE_MAXfloat100.0Configure cost pentarchy vote max
KOSMOS_COST_DAILY_LIMITfloat500.0Configure cost daily limit
KOSMOS_COST_MONTHLY_LIMITfloat10000.0Configure cost monthly limit

Example .env File

# Core Settings
KOSMOS_ENV=production
KOSMOS_DEBUG=false
KOSMOS_SECRET_KEY=your-secret-key-here
KOSMOS_LOG_LEVEL=INFO

# Database
KOSMOS_DATABASE_URL=postgresql+asyncpg://user:pass@db.example.com:5432/kosmos

# Cache & Messaging
KOSMOS_REDIS_URL=redis://redis.example.com:6379
KOSMOS_NATS_URL=nats://nats.example.com:4222

# Storage
KOSMOS_MINIO_HOST=minio.example.com
KOSMOS_MINIO_PORT=9000
KOSMOS_MINIO_ACCESS_KEY=your-access-key
KOSMOS_MINIO_SECRET_KEY=your-secret-key
KOSMOS_MINIO_BUCKET=kosmos

# Authentication (Zitadel)
KOSMOS_ZITADEL_DOMAIN=auth.example.com
KOSMOS_ZITADEL_PROJECT_ID=your-project-id
KOSMOS_ZITADEL_CLIENT_ID=your-client-id
KOSMOS_ZITADEL_CLIENT_SECRET=your-client-secret

# LLM Providers
KOSMOS_OPENAI_API_KEY=sk-...
KOSMOS_ANTHROPIC_API_KEY=sk-ant-...
KOSMOS_LITELLM_URL=http://litellm:4000
KOSMOS_LITELLM_MASTER_KEY=sk-...

# Observability
KOSMOS_LANGFUSE_PUBLIC_KEY=pk-...
KOSMOS_LANGFUSE_SECRET_KEY=sk-...
KOSMOS_LANGFUSE_HOST=http://langfuse:3001
KOSMOS_JAEGER_AGENT_HOST=jaeger
KOSMOS_JAEGER_AGENT_PORT=6831

# Cost Governance
KOSMOS_COST_AUTO_APPROVE_MAX=50.0
KOSMOS_COST_PENTARCHY_VOTE_MAX=100.0
KOSMOS_COST_DAILY_LIMIT=500.0
KOSMOS_COST_MONTHLY_LIMIT=10000.0
Secrets Management

In production, use a secrets manager like HashiCorp Vault or cloud provider secrets service. Store sensitive values as Kubernetes secrets or similar.