ContextOps is an automated incident response engine. It fetches infrastructure context across monitoring tools, evaluates telemetry data using LangGraph and Model Context Protocol (MCP) integrations, and provides validated resolution protocols via Retrieval-Augmented Generation (RAG).
- Stateful Triaging: Implements continuous event loops using LangGraph to analyze complex telemetry spanning multiple decoupled systems.
- Vector-Grounded Resolution: Executes cosine-similarity searches via
pgvectorto anchor mitigation strategies in organizational runbooks, eliminating hallucination. - Real-Time Streaming: Broadcasts state mutations and resolution vectors instantaneously via WebSocket and Redis Pub/Sub directly to the client interface.
- Extensible Integration: Interfaces with existing monitoring infrastructure (PagerDuty, Datadog) through the standardized Model Context Protocol (MCP).
During critical outages, engineering telemetry is distributed across decoupled systems (PagerDuty, Datadog, Grafana, GitHub). This state, defined as context fragmentation, increases Mean Time to Resolution (MTTR).
| Manual Triaging | ContextOps Engine |
|---|---|
| T+00:00 - PagerDuty alert initiates incident. | T+00:00 - PagerDuty webhook initiates ContextOps pipeline. |
| T+05:00 - Engineer parses Datadog logs manually. | T+00:02 - MCP integrations fetch telemetry and recent PRs. |
| T+15:00 - Engineer queries internal wiki for runbooks. | T+00:05 - RAG pipeline retrieves vector-matched runbooks. |
| T+30:00 - Engineer executes mitigation protocol. | T+00:08 - Actionable context streamed to dashboard. |
The execution environment utilizes state-of-the-art agentic frameworks to enforce deterministic operational protocols:
- LangChain: Provides the foundational interface for LLM communication, structuring prompts, and parsing complex JSON telemetry payloads.
- LangGraph: Orchestrates the cyclic, stateful reasoning loop. It acts as the cognitive traffic controller, dynamically deciding whether to execute further Model Context Protocol (MCP) tool calls (e.g., fetching additional GitHub commits) or synthesize a final mitigation strategy.
- Retrieval-Augmented Generation (RAG): Grounds the agent in proprietary organizational data. The system embeds incident error traces and performs cosine-similarity vector searches against a PostgreSQL (
pgvector) database containing the organization's historical runbooks.
The platform operates on a decoupled event-driven architecture, separating the client state, message broker, and AI execution layers.
graph TD
Webhook[PagerDuty Webhook] -->|HTTP POST| API[Node.js Broker API]
API -->|WebSocket Stream| UI[Next.js Dashboard]
API -->|Enqueue Incident| Queue[(Redis BullMQ)]
API -->|Subscribe State| State[(Redis Pub/Sub)]
State -->|State Updates| API
Queue -->|Consume Job| Agent{Python LangGraph Engine}
Agent -->|Publish State| State
Agent -->|Vector Retrieval| DB[(PostgreSQL + pgvector)]
Agent -->|MCP Tool Calls| Tools[GitHub and Datadog APIs]
classDef default fill:#020617,stroke:#334155,stroke-width:2px,color:#f8fafc;
classDef database fill:#0f172a,stroke:#3b82f6,stroke-width:2px,color:#f8fafc;
class Queue,State,DB database;
Execute the following commands to initialize the required services.
Initialize the Redis and PostgreSQL containers.
docker compose up -dInstall dependencies and compute embeddings for the proprietary runbooks.
cd ai-engine
pip install -r requirements.txt
python ingest_runbooks.pyStart the Python worker process.
cd ai-engine
python worker.pyStart the Node.js API server.
cd core-api
npm install
npm run devStart the Next.js development server.
cd dashboard
npm install
npm run devAccess the client interface at http://localhost:3000. Authenticate via the configured Clerk instance.
Engineering contributions are accepted via Pull Requests. Ensure all code passes formatting and linting checks prior to submission. Refer to CONTRIBUTING.md for architectural constraints.
ContextOps is distributed under the MIT License. Refer to LICENSE for complete terms and conditions.