# ankit25bcs10610/omnipotent architecture

> Architecture diagram of the GitHub repository ankit25bcs10610/omnipotent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ankit25bcs10610/omnipotent
- Repository: https://github.com/ankit25bcs10610/omnipotent

## Overview

OmniPotent is an AI SRE copilot: an engineer or incoming alert starts an investigation, agents gather and rank operational evidence, and the system produces a root-cause report. Remediation is a separate confidence-, policy-, and simulation-gated workflow that requests human approval when a gate fails. The README also documents incident deduplication, integrations, service topology, SLOs, runbooks, on-call, and enterprise controls. Relationships among unsampled subsystems are included only where the README describes them; source excerpts provide additional evidence for tenant context and persistence.

Main entry points: [`app/api/main.py`](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/api/main.py) (API Surface), [`app/agents`](https://github.com/ankit25bcs10610/omnipotent/tree/main/app/agents) (Investigation Agents), [`app/policy_engine/engine.py`](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/policy_engine/engine.py) (Policy Engine), [`app/webhooks/router.py`](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/webhooks/router.py) (Alert Webhooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User and API"]
  node_api["API Surface<br/>[main.py]"]
  node_webhooks["Alert Webhooks<br/>[router.py]"]
end

subgraph group_investigation["Investigation"]
  node_coordinator["Investigation Coordinator<br/>[dag_executor.py]"]
  node_agents["Investigation Agents"]
  node_mcp["MCP Tool Servers"]
  node_connectors["Direct Connectors"]
  node_evidence[("Evidence Store<br/>[store.py]")]
  node_report["Root-Cause Report<br/>[root_cause.py]"]
end

subgraph group_safety["Safety and Action"]
  node_confidence["Confidence Verification"]
  node_policy["Policy Engine<br/>[engine.py]"]
  node_twin["Digital-Twin Simulation<br/>[simulator.py]"]
  node_approval["Human Approval<br/>[decision.py]"]
  node_remediation["Remediation<br/>[remediation.py]"]
end

subgraph group_operations["Operations"]
  node_dedup["Alert Deduplication<br/>[pipeline.py]"]
  node_topology["Dependency Topology"]
  node_slo["SLO Tracking<br/>[tracker.py]"]
  node_runbooks["Runbook Execution<br/>[executor.py]"]
  node_oncall["On-call Escalation"]
  node_notifications["Notification Delivery<br/>[delivery.py]"]
end

subgraph group_platform["Platform Services"]
  node_tenant["Tenant Context<br/>[tenant_context.py]"]
  node_database[("Application Database<br/>[engine.py]")]
  node_audit[("Audit Log<br/>[immutable_log.py]")]
  node_billing["Billing"]
end

node_engineer(("On-call Engineer"))
node_alert_source(("Alert Source"))

node_engineer -->|"starts investigation"| node_api
node_alert_source -->|"sends alert"| node_webhooks
node_webhooks -->|"submits alerts"| node_dedup
node_dedup -.->|"starts investigation"| node_coordinator
node_api -->|"drives investigation"| node_coordinator
node_coordinator -->|"coordinates agents"| node_agents
node_agents -->|"queries tools"| node_mcp
node_agents -->|"queries systems"| node_connectors
node_agents -.->|"records evidence"| node_evidence
node_agents -->|"writes report"| node_report
node_report -->|"measures confidence"| node_confidence
node_confidence -->|"gates action"| node_policy
node_policy -->|"allows simulation"| node_twin
node_twin -->|"verifies rollback"| node_remediation
node_policy -->|"requests approval"| node_approval
node_approval -.->|"authorizes action"| node_remediation
node_topology -->|"informs blast radius"| node_policy
node_api -.->|"serves SLO features"| node_slo
node_api -.->|"serves runbooks"| node_runbooks
node_api -.->|"serves on-call"| node_oncall
node_oncall -->|"delivers escalations"| node_notifications
node_webhooks -->|"resolves tenant"| node_tenant
node_api -->|"sets request tenant"| node_tenant
node_tenant -->|"scopes persistence"| node_database
node_api -.->|"records audit"| node_audit
node_api -.->|"exposes billing"| node_billing

click node_api "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/api/main.py"
click node_webhooks "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/webhooks/router.py"
click node_dedup "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/deduplication/pipeline.py"
click node_coordinator "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/coordinator/dag_executor.py"
click node_agents "https://github.com/ankit25bcs10610/omnipotent/tree/main/app/agents"
click node_mcp "https://github.com/ankit25bcs10610/omnipotent/tree/main/app/mcp/servers"
click node_connectors "https://github.com/ankit25bcs10610/omnipotent/tree/main/app/connectors"
click node_evidence "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/evidence/store.py"
click node_report "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/contracts/root_cause.py"
click node_confidence "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/verification/verification_agent.py"
click node_policy "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/policy_engine/engine.py"
click node_twin "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/digital_twin/simulator.py"
click node_approval "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/api/v1/decision.py"
click node_remediation "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/agents/remediation.py"
click node_topology "https://github.com/ankit25bcs10610/omnipotent/tree/main/app/dependency_graph"
click node_slo "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/slo/tracker.py"
click node_runbooks "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/runbooks/executor.py"
click node_oncall "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/oncall/escalation_service.py"
click node_notifications "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/notifications/delivery.py"
click node_tenant "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/tenant_context.py"
click node_database "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/database/engine.py"
click node_audit "https://github.com/ankit25bcs10610/omnipotent/blob/main/app/audit/immutable_log.py"
click node_billing "https://github.com/ankit25bcs10610/omnipotent/tree/main/app/billing"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_webhooks toneBlue
class node_coordinator,node_agents,node_mcp,node_connectors,node_evidence,node_report toneAmber
class node_confidence,node_policy,node_twin,node_approval,node_remediation toneMint
class node_dedup,node_topology,node_slo,node_runbooks,node_oncall,node_notifications toneRose
class node_tenant,node_database,node_audit,node_billing,node_engineer,node_alert_source toneIndigo
```

## Components

### User and API

- [API Surface](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/api/main.py): `app/api/main.py`
- [Alert Webhooks](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/webhooks/router.py): `app/webhooks/router.py`

### Investigation

- [Investigation Coordinator](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/coordinator/dag_executor.py): `app/coordinator/dag_executor.py`
- [Investigation Agents](https://github.com/ankit25bcs10610/omnipotent/tree/main/app/agents): `app/agents`
- [MCP Tool Servers](https://github.com/ankit25bcs10610/omnipotent/tree/main/app/mcp/servers): `app/mcp/servers`
- [Direct Connectors](https://github.com/ankit25bcs10610/omnipotent/tree/main/app/connectors): `app/connectors`
- [Evidence Store](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/evidence/store.py): `app/evidence/store.py`
- [Root-Cause Report](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/contracts/root_cause.py): `app/contracts/root_cause.py`

### Safety and Action

- [Confidence Verification](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/verification/verification_agent.py): `app/verification/verification_agent.py`
- [Policy Engine](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/policy_engine/engine.py): `app/policy_engine/engine.py`
- [Digital-Twin Simulation](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/digital_twin/simulator.py): `app/digital_twin/simulator.py`
- [Human Approval](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/api/v1/decision.py): `app/api/v1/decision.py`
- [Remediation](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/agents/remediation.py): `app/agents/remediation.py`

### Operations

- [Alert Deduplication](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/deduplication/pipeline.py): `app/deduplication/pipeline.py`
- [Dependency Topology](https://github.com/ankit25bcs10610/omnipotent/tree/main/app/dependency_graph): `app/dependency_graph`
- [SLO Tracking](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/slo/tracker.py): `app/slo/tracker.py`
- [Runbook Execution](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/runbooks/executor.py): `app/runbooks/executor.py`
- [On-call Escalation](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/oncall/escalation_service.py): `app/oncall/escalation_service.py`
- [Notification Delivery](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/notifications/delivery.py): `app/notifications/delivery.py`

### Platform Services

- [Tenant Context](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/tenant_context.py): `app/tenant_context.py`
- [Application Database](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/database/engine.py): `app/database/engine.py`
- [Audit Log](https://github.com/ankit25bcs10610/omnipotent/blob/main/app/audit/immutable_log.py): `app/audit/immutable_log.py`
- [Billing](https://github.com/ankit25bcs10610/omnipotent/tree/main/app/billing): `app/billing`

### Other components

- **On-call Engineer**
- **Alert Source**

## Connections

- On-call Engineer → API Surface: starts investigation
- Alert Source → Alert Webhooks: sends alert
- Alert Webhooks → Alert Deduplication: submits alerts
- Alert Deduplication → Investigation Coordinator: starts investigation
- API Surface → Investigation Coordinator: drives investigation
- Investigation Coordinator → Investigation Agents: coordinates agents
- Investigation Agents → MCP Tool Servers: queries tools
- Investigation Agents → Direct Connectors: queries systems
- Investigation Agents → Evidence Store: records evidence
- Investigation Agents → Root-Cause Report: writes report
- Root-Cause Report → Confidence Verification: measures confidence
- Confidence Verification → Policy Engine: gates action
- Policy Engine → Digital-Twin Simulation: allows simulation
- Digital-Twin Simulation → Remediation: verifies rollback
- Policy Engine → Human Approval: requests approval
- Human Approval → Remediation: authorizes action
- Dependency Topology → Policy Engine: informs blast radius
- API Surface → SLO Tracking: serves SLO features
- API Surface → Runbook Execution: serves runbooks
- API Surface → On-call Escalation: serves on-call (evidence: `app/api/main.py`)
- On-call Escalation → Notification Delivery: delivers escalations (evidence: `app/oncall/escalation_service.py`)
- Alert Webhooks → Tenant Context: resolves tenant (evidence: `app/webhooks/router.py`)
- API Surface → Tenant Context: sets request tenant (evidence: `app/api/main.py`)
- Tenant Context → Application Database: scopes persistence
- API Surface → Audit Log: records audit
- API Surface → Billing: exposes billing
