OpsPilot turns a plain-English incident description into a structured, auditable change plan in seconds — backed by runbook evidence, not guesswork.
When production goes down, engineers waste precious minutes hunting through runbooks, Slack threads, and wikis to figure out what to do. The knowledge exists — it's just scattered and slow to retrieve under pressure.
OpsPilot is an agentic triage system that:
- Receives an incident message (e.g. "/login returns 500 after deploy")
- Retrieves relevant runbook evidence from a vector database (Astra DB)
- Reasons through the evidence using a Langflow agent with MCP tools
- Returns a human-readable triage response + a validated
CHANGE_PLANJSON object - Persists a ticket and session memory for continuity across the incident lifecycle
┌─────────────────────────────────────────────────────────────┐
│ Nginx (TLS) │
└───────────────────────────┬─────────────────────────────────┘
│
┌───────────────────────────▼─────────────────────────────────┐
│ FastAPI Gateway (api/) │
│ • API key auth • Rate limiting • CORS • Request sizing │
└──────────┬────────────────────────────────────┬─────────────┘
│ vector search │ orchestration
┌──────────▼──────────┐ ┌──────────▼──────────┐
│ Astra DB │ │ Langflow │
│ • runbook_chunks │◄──────────────│ Agent + MCP tools │
│ • tickets │ └─────────────────────┘
│ • sessions │
└─────────────────────┘
Key design decisions:
- Astra DB serves double duty: vector store for RAG and persistent operational records
CHANGE_PLANis Pydantic-validated JSON — no freeform LLM output reaches downstream systems- All containers run as non-root; secrets are never committed
| Layer | Technology |
|---|---|
| Agent Orchestration | Langflow + MCP tools |
| LLM | OpenAI / Groq (configurable) |
| Vector Store + Persistence | DataStax Astra DB |
| API Gateway | FastAPI + Nginx |
| Embeddings | OpenAI text-embedding-3-small (1536d) |
| Infrastructure | Docker Compose |
| Testing | pytest + Schemathesis (contract tests) |
# 1. Clone and configure
git clone https://github.com/Sylesh29/OpsPilot.git
cd OpsPilot
# 2. Set secrets
cp langflow/.env.example langflow/.env
cp api/.env.example api/.env
# → add OPENAI_API_KEY, ASTRA_DB_* credentials, GATEWAY_API_KEY
# 3. Start the stack
docker compose up --build
# 4. Seed the vector store
python scripts/astra_setup.py
python scripts/seed_astra.py
# 5. Verify
curl http://localhost:8088/healthzcurl -X POST http://localhost:8088/v1/triage \
-H "Content-Type: application/json" \
-H "x-api-key: gw-demo-key-change-me" \
-d '{
"session_id": "demo-001",
"message": "We deployed 30 minutes ago and now /login returns 500. Create a triage plan.",
"severity_hint": "SEV2"
}'Response includes:
- Plain-English triage narrative
- Structured
CHANGE_PLANJSON (validated by Pydantic) - Ticket ID persisted in Astra for continuity
- API key authentication on all endpoints
- Rate limiting + CORS allowlist + request size cap at the gateway
- Structured JSON logging with request IDs for full auditability
- All containers run as non-root
- Zero secrets committed —
.env.examplefiles only
# Unit tests
cd api && pytest
# Integration tests (requires live stack + credentials)
RUN_INTEGRATION_TESTS=1 pytest tests/test_integration_e2e.pyContract tests run via Schemathesis against the live OpenAPI spec.
Switch providers without changing application code:
# Groq (fast, great for dev)
LLM_PROVIDER=groq
GROQ_API_KEY=your_key
GROQ_MODEL=llama-3.3-70b-versatile
# OpenAI (default)
LLM_PROVIDER=openai
OPENAI_MODEL=gpt-4o| Collection | Type | Purpose |
|---|---|---|
opspilot_runbook_chunks |
Vector (1536d) | RAG knowledge base |
opspilot_tickets |
Non-vector | Incident ticket records |
opspilot_sessions |
Non-vector | Session memory across incidents |
Built for the IBM WatsonX Challenge · Langflow + Astra DB + FastAPI