Documentation

OpsOrch Documentation

Everything you need to integrate, extend, and operate with OpsOrch

Quick Start

Get up and running with OpsOrch in minutes

1. Clone OpsOrch Core

git clone https://github.com/OpsOrch/opsorch-core.git

2. Install dependencies

cd opsorch-core && go mod download

3. Run with mock adapters

OPSORCH_INCIDENT_PROVIDER=incidentmock go run ./cmd/opsorch

Architecture

OpsOrch consists of four main layers working together to provide a unified operational experience

1. API Substrate

OpsOrch Core

  • • Stateless Go orchestration service
  • • Unified REST APIs
  • • Provider/plugin loading
  • • Secret management
  • • Zero data storage

2. MCP Tools Layer

opsorch-mcp

  • • TypeScript MCP server
  • • Typed tools for LLMs
  • • stdio & HTTP transports
  • • 15+ operational tools

3. Ops Copilot

opsorch-copilot

  • • LLM-driven planning runtime
  • • Multi-step reasoning
  • • Human-in-the-loop
  • • Evidence-based answers

4. Control Plane

opsorch-console

  • • Next.js operator UI
  • • Incident & ticket management
  • • Copilot integration
  • • Real-time updates

Core Concepts

Unified API Layer

OpsOrch exposes unified APIs for incidents, logs, metrics, tickets, messaging, and services. All schemas are documented and evolving to support growing operational needs.

Adapter Architecture

OpsOrch Core contains no provider logic. Adapters implement capability interfaces in separate repositories and register with the registry. Load in-process or as out-of-process plugins.

QueryScope

All queries accept a shared `QueryScope` filter with service, team, and environment fields. Adapters map these to their native query languages for consistent cross-provider filtering.

Structured Queries

OpsOrch uses structured expressions for logs and metrics instead of free-form strings, ensuring validation and consistency across providers.

Production Adapters

Ready-to-use adapters for popular operational tools

OpsOrch Copilot

AI-powered operational assistant that orchestrates reasoning and tool execution

What Copilot Can Do

  • • Retrieve and summarize recent incidents with full context
  • • Correlate incidents with PagerDuty alerts, Jira tickets, and logs
  • • Explain severity escalations and timeline changes
  • • Find patterns across similar incidents
  • • Correlate metric spikes with system events
  • • Query logs and surface dominant error patterns

Architecture

  • • Multi-step agentic reasoning loop
  • • Configurable max iterations for complex problems
  • • Context-aware tool injection based on question patterns
  • • Service discovery with intelligent caching
  • • Conversation management with LRU eviction
  • • SQLite or in-memory storage

API Examples

Query Incidents

curl -X POST http://localhost:8080/incidents/query \
  -H "Content-Type: application/json" \
  -d '{
    "statuses": ["open"],
    "severities": ["critical", "high"],
    "scope": {"service": "api", "environment": "prod"}
  }'

Query Metrics

curl -X POST http://localhost:8080/metrics/query \
  -H "Content-Type: application/json" \
  -d '{
    "expression": {
      "metricName": "http_requests_total",
      "aggregation": "sum",
      "filters": [{"label": "status", "operator": "=", "value": "500"}]
    },
    "start": "2024-01-01T00:00:00Z",
    "end": "2024-01-01T01:00:00Z",
    "step": 60
  }'

Query Logs

curl -X POST http://localhost:8080/logs/query \
  -H "Content-Type: application/json" \
  -d '{
    "expression": {
      "search": "connection timeout",
      "severityIn": ["error", "critical"]
    },
    "scope": {"service": "gateway"}
  }'

Building Custom Adapters

Create adapters for your own tools using our starter template

1. Clone the adapter template

git clone https://github.com/OpsOrch/opsorch-adapter.git

2. Update module path

Edit `go.mod` to point to your repository

3. Implement provider interfaces

See `incident/example_provider.go` for a working example

4. Register your provider

func init() {
  incident.RegisterProvider("myprovider", New)
}

5. Build and test

make test && make plugin

MCP Tools

Model Context Protocol server exposing OpsOrch APIs as typed tools for AI agents

Incident Tools
  • • query-incidents
  • • get-incident
  • • create-incident
  • • update-incident
  • • get-incident-timeline
  • • append-incident-timeline
Ticket Tools
  • • query-tickets
  • • create-ticket
  • • get-ticket
  • • update-ticket
Log & Metric Tools
  • • query-logs
  • • query-metrics
  • • describe-metrics
Service Tools
  • • query-services
  • • list-services

Additional Resources