Skip to content

About

Evidence-grounded incident triage agent for healthcare microservices using LangGraph. Correlates logs, metrics, traces, deployments, and runbooks to produce safe, explainable incident hypotheses.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

Med Reliability Guardian

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.


Why This Exists

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.


What the Agent Does

Given an incident description, the agent:

1. Gathers operational evidence

  • Logs (errors, counts)
  • Metrics (latency, error rates, saturation)
  • Traces (slow spans, exemplars)
  • Deployment history
  • Operational runbooks

2. Produces structured outputs

  • Ranked incident hypotheses
  • Confidence scores
  • Explicit evidence references (ref_id)
  • Safe operational next steps
  • Incident summary (impact, timeline, suspected change)

3. Enforces hard safety rules

  • Evidence references must exist
  • No invented telemetry
  • Confidence degrades when evidence is weak

Result:

Med Reliability Guardian – Architecture

Architecture (High Level)

The system is implemented as a LangGraph state machine with explicit evidence grounding and safety gates.

Med Reliability Guardian – Architecture

Key design idea: Evidence is collected before reasoning, and every hypothesis is constrained by observable signals.


Agent Orchestration with LangGraph

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.


Deterministic Testing (Mock Mode)

The system supports a mock LLM mode for fast, deterministic testing:

make test-fast

Mock 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.

About

Evidence-grounded incident triage agent for healthcare microservices using LangGraph. Correlates logs, metrics, traces, deployments, and runbooks to produce safe, explainable incident hypotheses.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages