# keephq/keep architecture

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

- Interactive diagram: https://gitdiagram.com/keephq/keep
- Repository: https://github.com/keephq/keep

## Overview

Keep is an AIOps and alert-management platform: monitoring integrations send events into Keep, where alerts can be normalized, deduplicated, enriched, filtered, and correlated into incidents; operators investigate them in the UI and automate responses with workflows. The repository also includes dashboards, topology, maintenance, and identity management. The graph combines documented product capabilities with relationships visible in sampled source and the source index; several UI and backend subsystems are represented at directory level because their implementation was not sampled.

Main entry points: [`keep/api/core/db.py`](https://github.com/keephq/keep/blob/main/keep/api/core/db.py) (Application database), [`keep-ui/app/(keep)`](https://github.com/keephq/keep/tree/main/keep-ui/app/(keep)) (Keep web UI), [`keep/rulesengine/rulesengine.py`](https://github.com/keephq/keep/blob/main/keep/rulesengine/rulesengine.py) (Rules engine), [`keep/workflowmanager/workflowmanager.py`](https://github.com/keephq/keep/blob/main/keep/workflowmanager/workflowmanager.py) (Workflow manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Alert processing"]
  node_providers["Provider integrations"]
  node_alerts["Alert models<br/>[alert.py]"]
  node_rules["Rules engine<br/>[rulesengine.py]"]
  node_enrichment["Alert enrichment"]
  node_search["Alert search<br/>[searchengine.py]"]
  node_incidents["Incident models<br/>[incident.py]"]
end

subgraph group_automation["Integrations and automation"]
  node_workflow["Workflow manager<br/>[workflowmanager.py]"]
  node_io["Workflow IO<br/>[iohandler.py]"]
end

subgraph group_experience["Operator experience"]
  node_web_ui["Keep web UI"]
  node_alert_views["Alert views<br/>[page.tsx]"]
  node_incident_views["Incident workspace"]
  node_dashboard["Dashboards"]
  node_topology["Service topology"]
end

subgraph group_platform["Platform services"]
  node_database[("Application database<br/>[db.py]")]
  node_context["Execution context<br/>[contextmanager.py]"]
  node_identity["Identity and access<br/>[identitymanager.py]"]
  node_auth_verification["Request verification"]
  node_identity_factory["Identity selection"]
end

node_monitoring(("Monitoring tools"))
node_external_services{{"Integrated services"}}

node_monitoring -->|"sends events"| node_providers
node_providers -.->|"supplies alerts"| node_alerts
node_rules -->|"reads and writes"| node_database
node_rules -->|"creates incidents"| node_incidents
node_rules -->|"uses enrichment"| node_enrichment
node_search -->|"queries rules"| node_rules
node_search -->|"queries alerts"| node_database
node_incidents -->|"reads and writes"| node_database
node_web_ui -.->|"presents alerts"| node_alert_views
node_web_ui -.->|"presents incidents"| node_incident_views
node_web_ui -->|"presents dashboards"| node_dashboard
node_alert_views -.->|"filters alerts"| node_search
node_incident_views -.->|"manages incidents"| node_incidents
node_workflow -->|"uses context"| node_context
node_workflow -->|"dispatches steps"| node_io
node_workflow -->|"stores executions"| node_database
node_io -->|"invokes providers"| node_providers
node_io -->|"calls integrations"| node_external_services
node_topology -->|"reads and writes"| node_database
node_web_ui -.->|"explores topology"| node_topology
node_identity_factory -->|"selects manager"| node_identity
node_auth_verification -->|"verifies identity"| node_identity

click node_providers "https://github.com/keephq/keep/tree/main/keep/providers"
click node_alerts "https://github.com/keephq/keep/blob/main/keep/api/models/alert.py"
click node_rules "https://github.com/keephq/keep/blob/main/keep/rulesengine/rulesengine.py"
click node_enrichment "https://github.com/keephq/keep/blob/main/keep/api/utils/enrichment_helpers.py"
click node_search "https://github.com/keephq/keep/blob/main/keep/searchengine/searchengine.py"
click node_incidents "https://github.com/keephq/keep/blob/main/keep/api/models/incident.py"
click node_database "https://github.com/keephq/keep/blob/main/keep/api/core/db.py"
click node_workflow "https://github.com/keephq/keep/blob/main/keep/workflowmanager/workflowmanager.py"
click node_io "https://github.com/keephq/keep/blob/main/keep/iohandler/iohandler.py"
click node_context "https://github.com/keephq/keep/blob/main/keep/contextmanager/contextmanager.py"
click node_web_ui "https://github.com/keephq/keep/tree/main/keep-ui/app/(keep)"
click node_alert_views "https://github.com/keephq/keep/blob/main/keep-ui/app/(keep)/alerts/%5Bid%5D/page.tsx"
click node_incident_views "https://github.com/keephq/keep/tree/main/keep-ui/app/(keep)/incidents/%5Bid%5D"
click node_dashboard "https://github.com/keephq/keep/tree/main/keep-ui/app/(keep)/dashboard"
click node_topology "https://github.com/keephq/keep/blob/main/keep/topologies/topologies_service.py"
click node_identity "https://github.com/keephq/keep/blob/main/keep/identitymanager/identitymanager.py"
click node_auth_verification "https://github.com/keephq/keep/blob/main/keep/identitymanager/authverifierbase.py"
click node_identity_factory "https://github.com/keephq/keep/blob/main/keep/identitymanager/identitymanagerfactory.py"

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_providers,node_alerts,node_rules,node_enrichment,node_search,node_incidents toneBlue
class node_workflow,node_io toneAmber
class node_web_ui,node_alert_views,node_incident_views,node_dashboard,node_topology toneMint
class node_database,node_context,node_identity,node_auth_verification,node_identity_factory toneRose
class node_monitoring,node_external_services toneIndigo
```

## Components

### Alert processing

- [Provider integrations](https://github.com/keephq/keep/tree/main/keep/providers): `keep/providers`
- [Alert models](https://github.com/keephq/keep/blob/main/keep/api/models/alert.py): `keep/api/models/alert.py`
- [Rules engine](https://github.com/keephq/keep/blob/main/keep/rulesengine/rulesengine.py): `keep/rulesengine/rulesengine.py`
- [Alert enrichment](https://github.com/keephq/keep/blob/main/keep/api/utils/enrichment_helpers.py): `keep/api/utils/enrichment_helpers.py`
- [Alert search](https://github.com/keephq/keep/blob/main/keep/searchengine/searchengine.py): `keep/searchengine/searchengine.py`
- [Incident models](https://github.com/keephq/keep/blob/main/keep/api/models/incident.py): `keep/api/models/incident.py`

### Integrations and automation

- [Workflow manager](https://github.com/keephq/keep/blob/main/keep/workflowmanager/workflowmanager.py): `keep/workflowmanager/workflowmanager.py`
- [Workflow IO](https://github.com/keephq/keep/blob/main/keep/iohandler/iohandler.py): `keep/iohandler/iohandler.py`

### Operator experience

- [Keep web UI](https://github.com/keephq/keep/tree/main/keep-ui/app/(keep)): `keep-ui/app/(keep)`
- [Alert views](https://github.com/keephq/keep/blob/main/keep-ui/app/(keep)/alerts/%5Bid%5D/page.tsx): `keep-ui/app/(keep)/alerts/[id]/page.tsx`
- [Incident workspace](https://github.com/keephq/keep/tree/main/keep-ui/app/(keep)/incidents/%5Bid%5D): `keep-ui/app/(keep)/incidents/[id]`
- [Dashboards](https://github.com/keephq/keep/tree/main/keep-ui/app/(keep)/dashboard): `keep-ui/app/(keep)/dashboard`
- [Service topology](https://github.com/keephq/keep/blob/main/keep/topologies/topologies_service.py): `keep/topologies/topologies_service.py`

### Platform services

- [Application database](https://github.com/keephq/keep/blob/main/keep/api/core/db.py): `keep/api/core/db.py`
- [Execution context](https://github.com/keephq/keep/blob/main/keep/contextmanager/contextmanager.py): `keep/contextmanager/contextmanager.py`
- [Identity and access](https://github.com/keephq/keep/blob/main/keep/identitymanager/identitymanager.py): `keep/identitymanager/identitymanager.py`
- [Request verification](https://github.com/keephq/keep/blob/main/keep/identitymanager/authverifierbase.py): `keep/identitymanager/authverifierbase.py`
- [Identity selection](https://github.com/keephq/keep/blob/main/keep/identitymanager/identitymanagerfactory.py): `keep/identitymanager/identitymanagerfactory.py`

### Other components

- **Monitoring tools**
- **Integrated services**

## Connections

- Monitoring tools → Provider integrations: sends events (evidence: `README.md`)
- Provider integrations → Alert models: supplies alerts (evidence: `keep/providers/incidentmanager_provider/incidentmanager_provider.py`)
- Rules engine → Application database: reads and writes (evidence: `keep/rulesengine/rulesengine.py`)
- Rules engine → Incident models: creates incidents (evidence: `keep/rulesengine/rulesengine.py`)
- Rules engine → Alert enrichment: uses enrichment (evidence: `keep/rulesengine/rulesengine.py`)
- Alert search → Rules engine: queries rules (evidence: `keep/searchengine/searchengine.py`)
- Alert search → Application database: queries alerts (evidence: `keep/searchengine/searchengine.py`)
- Incident models → Application database: reads and writes (evidence: `keep/api/models/incident.py`)
- Keep web UI → Alert views: presents alerts
- Keep web UI → Incident workspace: presents incidents
- Keep web UI → Dashboards: presents dashboards (evidence: `README.md`)
- Alert views → Alert search: filters alerts
- Incident workspace → Incident models: manages incidents
- Workflow manager → Execution context: uses context (evidence: `keep/workflowmanager/workflowmanager.py`)
- Workflow manager → Workflow IO: dispatches steps (evidence: `keep/workflowmanager/workflowmanager.py`)
- Workflow manager → Application database: stores executions (evidence: `keep/workflowmanager/workflowmanager.py`)
- Workflow IO → Provider integrations: invokes providers (evidence: `keep/iohandler/iohandler.py`)
- Workflow IO → Integrated services: calls integrations (evidence: `README.md`)
- Service topology → Application database: reads and writes (evidence: `keep/topologies/topologies_service.py`)
- Keep web UI → Service topology: explores topology
- Identity selection → Identity and access: selects manager (evidence: `keep/identitymanager/identitymanagerfactory.py`)
- Request verification → Identity and access: verifies identity (evidence: `keep/identitymanager/authverifierbase.py`)
