Med Reliability Guardian is an evidence-grounded incident triage agent for healthcare microservices. It correlates logs, metrics, traces, deployment history, and runbooks to produce structured, explainable incident hypotheses — without hallucinations.
This project demonstrates how agentic AI can be safely applied to SRE and reliability workflows in regulated environments.
In healthcare systems, incident response is slow not because data is missing — but because context is fragmented:
- Logs live in one system
- Metrics in another
- Traces elsewhere
- Deployment history and runbooks require manual lookup
This agent gathers evidence first, then reasons over it.
No evidence → no confidence.
Given an incident description, the agent:
- Logs (errors, counts)
- Metrics (latency, error rates, saturation)
- Traces (slow spans, exemplars)
- Deployment history
- Operational runbooks
- Ranked incident hypotheses
- Confidence scores
- Explicit evidence references (
ref_id) - Safe operational next steps
- Incident summary (impact, timeline, suspected change)
- Evidence references must exist
- No invented telemetry
- Confidence degrades when evidence is weak
The system is implemented as a LangGraph state machine with explicit evidence grounding and safety gates.
Key design idea: Evidence is collected before reasoning, and every hypothesis is constrained by observable signals.
Med Reliability Guardian is implemented using LangGraph to model the agent as an explicit, deterministic state machine.
LangGraph enables:
- Explicit node boundaries (
route → gather → synthesize) - Deterministic execution paths
- Clear separation between evidence collection and reasoning
- Safe insertion of guardrails and test hooks
Each node operates on a typed shared state (AgentState), making the system:
- Inspectable
- Testable
- Production-aligned
This design avoids opaque, chain-of-thought-style agents and instead favors auditable, healthcare-ready agent flows.
The system supports a mock LLM mode for fast, deterministic testing:
make test-fastMock mode:
Disables live LLM calls Produces stable outputs Enforces contract rules (evidence grounding, citations) This makes CI reliable, fast, and cost-free.
Example Output (Truncated)
{
"hypotheses": [
{
"rank": 1,
"title": "Database connectivity issues causing latency and 5xx errors",
"confidence_0_to_1": 0.9,
"evidence_refs": [
"logs:patient-monitoring-api:ERROR:1h",
"metrics:patient-monitoring-api:1h"
]
}
]
}
Running Locally Live mode (real LLM)
make run-api-live
Mock mode (deterministic)
make run-api-mock
Testing
make test
make test-fast
All tests enforce:
- JSON schema validity
- Evidence reference grounding
- Confidence rules
- Design Principles
- Evidence before reasoning
- Safety over creativity
- Deterministic tests
- Healthcare-ready mindset
- Status
This project is a reference implementation for safe, evidence-grounded LLM agents in reliability and SRE workflows.

