How amitdevx/self-healops works
SelfHealOps accepts CI failure events, queues incidents, and runs a cyclical remediation workflow: classify and diagnose failures, plan and safety-check actions, execute and validate fixes, then learn from resolved incidents or escalate. Its API also exposes authentication and incident, analysis, action, and validation operations. The graph distinguishes the workflow stages from the agent and integration layers. Relationships for unsampled API routes and storage behavior are included only where the README or source index supports them; optional or undocumented links are omitted.
Main entry points: graph.py Workflow Orchestrator · core.py Agent System · repository.py Data Repository · v1 API Routers
Components 23
API and Intake
- GitHub Webhook
backend/api/v1/webhooks.py - API Routers
backend/api/v1 - Incident Worker
backend/workers/worker.py
Incident Workflow
- Workflow Orchestrator
backend/workflows/graph.py - Pattern Recall
backend/workflows/graph.py - Failure Classification
backend/workflows/graph.py - Root Cause Analysis
backend/workflows/graph.py - Remediation Planning
backend/workflows/graph.py - Safety Validation
backend/workflows/graph.py - Action Execution
backend/workflows/graph.py - Fix Validation
backend/workflows/graph.py - Learning Extraction
backend/workflows/graph.py - Escalation
backend/workflows/graph.py
Agents and Integrations
- Agent System
backend/agents/core.py - NVIDIA NIM
backend/services/nim.py - Policy Executor
backend/services/execution_service.py - GitHub Integration
backend/services/github.py - Learning Store Service
backend/services/learning.py
Persistence and Security
- Relational Database
backend/database/session.py - Data Repository
backend/database/repository.py - Domain Models
backend/models - Authentication and Roles
backend/core/dependencies.py
Other components
- CI Provider
Connections 24
- CI Provider → GitHub Webhook: sends event
backend/api/v1/webhooks.py - GitHub Webhook → Incident Worker: queues incident
backend/api/v1/webhooks.py - Incident Worker → Workflow Orchestrator: invokes workflow
backend/workers/worker.py - Workflow Orchestrator → Pattern Recall: checks patterns
backend/workflows/graph.py - Workflow Orchestrator → Failure Classification: routes incident
backend/workflows/graph.py - Workflow Orchestrator → Root Cause Analysis: routes incident
backend/workflows/graph.py - Workflow Orchestrator → Remediation Planning: routes incident
backend/workflows/graph.py - Workflow Orchestrator → Safety Validation: routes plan
backend/workflows/graph.py - Workflow Orchestrator → Action Execution: routes safe plan
backend/workflows/graph.py - Workflow Orchestrator → Fix Validation: routes execution
backend/workflows/graph.py - Workflow Orchestrator → Learning Extraction: routes resolved fix
backend/workflows/graph.py - Workflow Orchestrator → Escalation: routes unsafe or failed
backend/workflows/graph.py - Workflow Orchestrator → Agent System: delegates stages
backend/workflows/graph.py - Agent System → NVIDIA NIM: requests structured output
backend/agents/core.py - Agent System → Policy Executor: executes actions
backend/agents/core.py - Agent System → GitHub Integration: checks CI runs
backend/agents/core.py - Policy Executor → GitHub Integration: updates repository
backend/services/execution_service.py - Pattern Recall → Learning Store Service: looks up pattern
backend/workflows/graph.py - Learning Extraction → Agent System: extracts pattern
backend/workflows/graph.py - API Routers → Data Repository: uses data access
backend/api/v1/incidents.py - Data Repository → Relational Database: reads and writes
backend/database/repository.py - Authentication and Roles → Relational Database: opens session
backend/core/dependencies.py - API Routers → Authentication and Roles: authenticates requests
backend/api/v1/auth.py - Data Repository → Domain Models: operates on models