Configuration Reference
AIA uses aia.config.yaml as the main configuration file, with support for local overrides via aia.config.local.yaml.
#Configuration Files
Main Config: aia.config.yaml
The primary configuration file (committed to git):
project_name: "aia-demo"
cluster_env: "prod"
services:
dashboard: { port: 3000, base_url: "http://localhost:3000" }
router: { port: 3001, base_url: "http://localhost:3001" }
autopsy: { port: 3002, base_url: "http://localhost:3002" }
state: { port: 3003, base_url: "http://localhost:3003" }
git: { port: 3004, base_url: "http://localhost:3004" }
repro: { port: 3005, base_url: "http://localhost:3005" }
web: { port: 3006, base_url: "http://localhost:3006" }
docs: { port: 3007, base_url: "http://localhost:3007" }
sample_app: { port: 3008, base_url: "http://localhost:3008" }
agent: { port: 4318, base_url: "http://localhost:4318" }
github:
provider: "github"
token: "PLACEHOLDER" # Read from .env
owner: "your-org" # CHANGE THIS
repo: "your-repo" # CHANGE THIS
base_branch: "main"
ai:
provider: "you.com"
model: "express"
api_url: "https://api.you.com/v1/chat/completions"
Local Override: aia.config.local.yaml
For local testing (gitignored):
github:
owner: "your-github-username"
repo: "your-test-repo"
Priority: aia.config.local.yaml > aia.config.yaml
#Environment Variables
Create a .env file in the project root:
# Required
YOU_API_KEY=ydc_your_actual_key_here
GITHUB_TOKEN=ghp_your_actual_token_here
DATABASE_URL=postgresql://user:pass@host/db
# Optional: R2 Storage
R2_ACCESS_KEY_ID=your_r2_access_key
R2_SECRET_ACCESS_KEY=your_r2_secret_key
R2_BUCKET_NAME=aia
R2_ACCOUNT_ID=your_account_id
#Configuration Schema
Top-Level Fields
| Field | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| project_name | string | ✅ | Project identifier |
| cluster_env | string | ✅ | Environment (dev/prod) |
| services | object | ✅ | Service ports and URLs |
| github | object | ✅ | GitHub integration |
| ai | object | ✅ | AI provider config |
| paths | object | ❌ | File paths |
| storage | object | ❌ | R2 storage (optional) |
Services
Each service has:
port: Port numberbase_url: Full URL with protocol
services:
# OTEL receiver
agent: { port: 4318, base_url: "http://localhost:4318" }
# Dashboard UI
dashboard: { port: 3000, base_url: "http://localhost:3000" }
# Incident orchestrator
router: { port: 3001, base_url: "http://localhost:3001" }
# AI analysis
autopsy: { port: 3002, base_url: "http://localhost:3002" }
# Database service
state: { port: 3003, base_url: "http://localhost:3003" }
# GitHub integration
git: { port: 3004, base_url: "http://localhost:3004" }
# Repro service (optional)
repro: { port: 3005, base_url: "http://localhost:3005" }
# Marketing site
web: { port: 3006, base_url: "http://localhost:3006" }
# Documentation
docs: { port: 3007, base_url: "http://localhost:3007" }
# Sample app for testing
sample_app: { port: 3008, base_url: "http://localhost:3008" }
GitHub Configuration
github:
provider: "github"
token: "PLACEHOLDER" # Read from GITHUB_TOKEN env var
owner: "your-github-username" # REQUIRED
repo: "your-repo-name" # REQUIRED
base_branch: "main"
username: "aia-bot" # Optional: bot username
email: "bot@aia.local" # Optional: bot email
| Field | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| provider | string | ✅ | Always "github" |
| token | string | ✅ | GitHub PAT (from .env) |
| owner | string | ✅ | GitHub username/org |
| repo | string | ✅ | Repository name |
| base_branch | string | ✅ | Default branch (main/master) |
| username | string | ❌ | Git commit author name |
| email | string | ❌ | Git commit author email |
AI Configuration
ai:
provider: "you.com"
model: "express" # or "research-pro"
api_url: "https://api.you.com/v1/chat/completions"
| Field | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| provider | string | ✅ | AI provider (you.com) |
| model | string | ✅ | Model name |
| api_url | string | ✅ | API endpoint |
Models:
express: Fast, good qualityresearch-pro: Slower, better quality
Paths Configuration
paths:
repo_root: "/path/to/project"
logs: "logs/app.log"
events: "events"
storage: "storage"
autopsy_output: "autopsy_output"
patches: "patches"
pr_description: "pr_descriptions"
repro_logs: "repro_logs"
Storage Configuration (Optional)
R2 is optional for autopsy result backups:
storage:
provider: "r2"
bucket: "aia"
access_key: "${R2_ACCESS_KEY_ID}"
secret_key: "${R2_SECRET_ACCESS_KEY}"
account_id: "${R2_ACCOUNT_ID}"
region: "auto"
#Environment Variable Reference
Required
| Variable | Description | Example |
| :--- | :--- | :--- |
| YOU_API_KEY | You.com API key | ydc_abc123... |
| GITHUB_TOKEN | GitHub PAT with repo scope | ghp_abc123... |
| DATABASE_URL | PostgreSQL connection string | postgresql://user:pass@host/db |
Optional
| Variable | Description | Example |
| :--- | :--- | :--- |
| R2_ACCESS_KEY_ID | R2 access key | abc123... |
| R2_SECRET_ACCESS_KEY | R2 secret key | xyz789... |
| R2_BUCKET_NAME | R2 bucket name | aia |
| R2_ACCOUNT_ID | Cloudflare account ID | abc123... |
| AIA_CONFIG_PATH | Custom config file path | /path/to/config.yaml |
#Config Loading
The config loader searches for files in this order:
$AIA_CONFIG_PATH(if set)./aia.config.local.yaml../aia.config.local.yaml../../aia.config.local.yaml../../../aia.config.local.yaml./config/aia.config.local.yaml./config/aia.config.yaml./aia.config.yaml../aia.config.yaml../../aia.config.yaml../../../aia.config.yaml
Why multiple paths?
Services run from different directories (apps/git/, apps/agent/, etc.), so the loader searches upward to find the config in the project root.
#Database Configuration
PostgreSQL (Recommended)
Set in .env:
DATABASE_URL=postgresql://user:password@host:5432/database
Providers:
Schema
Tables are auto-created:
incidents: Incident metadataautopsy_results: AI analysis results
#Production Configuration
Security Best Practices
-
Never commit secrets
- Use
.envfor all credentials - Add
.envto.gitignore - Use
aia.config.local.yamlfor local testing
- Use
-
Use environment variables
Terminalgithub: token: "${GITHUB_TOKEN}" # Read from env -
Rotate tokens regularly
- GitHub PAT: Every 90 days
- You.com API key: As needed
Production Checklist
- [ ] Set
cluster_env: "prod" - [ ] Configure production database
- [ ] Set up R2 storage (optional)
- [ ] Use production GitHub repo
- [ ] Set proper service URLs (not localhost)
- [ ] Enable HTTPS for external services
- [ ] Set up monitoring and logging
#Example Configurations
Development
project_name: "aia-dev"
cluster_env: "dev"
github:
owner: "your-username"
repo: "test-repo"
ai:
model: "express" # Faster for dev
Production
project_name: "aia-prod"
cluster_env: "prod"
services:
dashboard: { port: 3000, base_url: "https://dashboard.example.com" }
agent: { port: 4318, base_url: "https://agent.example.com" }
# ... other services
github:
owner: "your-org"
repo: "production-app"
ai:
model: "research-pro" # Better quality for prod
#Troubleshooting
"Config file not found"
- Check file exists:
ls aia.config.yaml - Verify file name (not
.yml) - Check search paths in logs
"Invalid config"
- Validate YAML syntax
- Check required fields are present
- Verify service ports don't conflict
"GitHub token invalid"
- Check token in
.env - Verify token has
reposcope - Test token:
curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
"Database connection failed"
- Verify
DATABASE_URLformat - Check database is running
- Test connection:
psql $DATABASE_URL
#Next Steps
- Installation - Setup guide
- GitHub Integration - GitHub setup
- Architecture - System overview