Getting started
Running in 15 minutes
Prerequisites
- Python 3.9+
kubectlfor Kubernetes features- Cloud CLI tools (optional):
aws,gcloud,az
1. Install
# Clone and enter the repo
$ git clone https://github.com/open-devops-agent/open-devops-agent.git
$ cd open-devops-agent
# Create a virtual environment
$ python -m venv venv && source venv/bin/activate
# Core dependencies
$ pip install -r requirements.txt
# Cloud providers (optional)
$ pip install boto3 google-cloud-compute azure-mgmt-compute
2. Configure
Copy the example environment file and fill in the minimum required variables. Orgs sharing one deployment can instead register keys per-org via the API or MCP env.
$ cp .env.example .env
# Required for the built-in agent loop
ANTHROPIC_API_KEY=your-claude-api-key
# Critical — alerts before dangerous operations
EMAIL_ENABLED=true
EMAIL_SMTP_HOST=smtp.gmail.com
EMAIL_TO=sre-team@yourcompany.com
# Safety — keep false in production until reviewed
AUTO_APPLY=false
3. Run locally
# Webhook API + background queue worker
$ devops-agent serve
# MCP server for Cursor / Claude Desktop / custom agents
$ devops-agent mcp
4. Test with an incident
$ curl -X POST http://localhost:8000/webhook/manual \
-H "Content-Type: application/json" \
-H "X-Org-ID: acme-corp" \
-d '{ "type": "k8s", "namespace": "default", "pod": "myapp-pod", "description": "CrashLoopBackOff test" }'
# wait ~30s, then check the org-scoped audit log
$ curl "http://localhost:8000/audit?org_id=acme-corp"
5. Deploy to Kubernetes
$ kubectl create namespace devops-agent
$ kubectl create secret generic agent-secrets \
--from-literal=ANTHROPIC_API_KEY=your-key \
--from-literal=GITHUB_TOKEN=your-token \
-n devops-agent
$ kubectl apply -f k8s/ -n devops-agent