How bruceowenga/ulinzi-sre-agent works
Ulinzi monitors infrastructure metrics, turns detected alerts into shared incident state, classifies incidents with an LLM, and routes remediation by severity. Low/medium incidents use registered runbooks; high/critical incidents get an LLM-generated playbook and pause for operator approval. Both routes report to notification and observability sinks. The graph distinguishes monitoring, incident workflow, model/runbook execution, and reporting. Source excerpts show the main runtime calls; some monitoring and integration capabilities are documented in the README but their implementations were not sampled.
Main entry points: remediation.py Automatic remediation · main.py Runtime entry · graph.py Workflow graph · triage.py Triage agent
Components 22
Monitoring
- Monitor agent
agents/monitor.py
Incident workflow
- Incident state
state.py - Runtime entry
main.py - SQLite checkpoint
main.py - Workflow graph
graph.py - Triage agent
agents/triage.py - Configuration
config.py - Prompt templates
prompts
Response execution
- LLM client
agents/llm.py - Automatic remediation
agents/remediation.py - Manual playbook
agents/remediation.py - Runbook registry
runbooks/__init__.py - Container recovery
runbooks/container_oom.py - Disk cleanup
runbooks/disk_pressure.py - Log rotation
runbooks/log_flood.py
Reporting
- Reporter agent
agents/reporter.py
Other components
- Prometheus
- Model endpoint
- Operator approval
- ntfy
- Loki
- Grafana
Connections 29
- Runtime entry → Monitor agent: starts
main.py - Monitor agent → Prometheus: queries
agents/monitor.py - Monitor agent → Runtime entry: emits incident
main.py - Monitor agent → Incident state: creates
agents/monitor.py - Runtime entry → Workflow graph: invokes
main.py - Runtime entry → SQLite checkpoint: persists graph state
main.py - Workflow graph → Triage agent: dispatches
graph.py - Workflow graph → Automatic remediation: routes auto
graph.py - Workflow graph → Manual playbook: routes manual
graph.py - Workflow graph → Reporter agent: dispatches
graph.py - Triage agent → LLM client: requests classification
agents/triage.py - Automatic remediation → LLM client: requests playbook
agents/remediation.py - LLM client → Model endpoint: calls configured endpoint
agents/llm.py - Triage agent → Prompt templates: reads triage prompt
agents/triage.py - Automatic remediation → Prompt templates: reads playbook prompt
agents/remediation.py - Triage agent → Configuration: reads model settings
agents/triage.py - Automatic remediation → Configuration: reads model settings
agents/remediation.py - Automatic remediation → Runbook registry: looks up runbook
agents/remediation.py - Runbook registry → Container recovery: registers
runbooks/__init__.py - Runbook registry → Disk cleanup: registers
runbooks/__init__.py - Runbook registry → Log rotation: registers
runbooks/__init__.py - Manual playbook → Operator approval: requests decision
agents/remediation.py - Runtime entry → Operator approval: collects decision
main.py - Reporter agent → ntfy: pushes notification
agents/reporter.py - Reporter agent → Loki: writes incident log
agents/reporter.py - Reporter agent → Grafana: posts annotation
agents/reporter.py - Triage agent → Incident state: updates classification
agents/triage.py - Automatic remediation → Incident state: updates action
agents/remediation.py - Reporter agent → Incident state: updates report
agents/reporter.py