Configuration
Full configuration reference for CHAOS-AI.
Environment Variables
Create a .env file in your project root. All provider keys are optional — configure only the ones you use.
# LLM Providers
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AI...
OPENROUTER_API_KEY=sk-or-...
# Database (required for orchestration engine)
DATABASE_URL=postgresql+asyncpg://user:pass@localhost:5432/chaos
# MCP Server
MCP_PORT=8000
MCP_HOST=0.0.0.0
# Web UI
NEXT_PUBLIC_MCP_SERVER_URL=http://localhost:8000
# Telemetry (opt out)
CHAOS_NO_TELEMETRY=1
Provider Configuration
Agents read provider settings from environment variables. To assign a specific provider to a specific agent, set it in the agent definition file (.github/agents/<agent>.md or .claude/agents/<agent>.md).
Per-Agent Provider Override
In any agent definition file, add a model field in the YAML frontmatter:
---
name: python-agent
model: claude-opus-4-5
tools: [bash, edit, view, grep, glob]
---
Using Ollama (Local Models)
Ensure Ollama is running, then set the model in your agent definition:
---
name: test-agent
model: ollama/codellama:13b
---
Context Settings
CHAOS auto-indexes your project on first run. Control what gets indexed:
# Add to .chaosignore (same syntax as .gitignore)
node_modules/
.git/
*.pyc
__pycache__/
.env*
dist/
build/
MCP Server Configuration
# Start on stdio (for Claude Desktop / local editors)
cw mcp
# Start on HTTP (for persistent hosting or Docker)
cw mcp --transport streamable-http --port 8000
# List all available tools
cw mcp --list-tools
# List all available resources
cw mcp --list-resources
Docker Configuration
The docker-compose.yml in the project root runs the full stack. Override ports via environment variables:
# docker-compose.override.yml
services:
api:
ports:
- "9000:8000" # expose MCP on host port 9000
web-ui:
ports:
- "4000:3000" # expose dashboard on host port 4000
Environment Variable Reference
| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY | Anthropic API key | — |
GOOGLE_API_KEY | Google AI API key | — |
OPENROUTER_API_KEY | OpenRouter API key | — |
DATABASE_URL | PostgreSQL connection string | — |
MCP_PORT | MCP server port | 8000 |
MCP_HOST | MCP server bind address | 0.0.0.0 |
NEXT_PUBLIC_MCP_SERVER_URL | Web UI backend URL | http://localhost:8000 |
CHAOS_NO_TELEMETRY | Disable anonymous usage stats | unset |
CHAOS_LOG_LEVEL | Log level: debug, info, warn, error | info |