AI engineering · distributed systems · security

Sentinel

An agentic incident-response copilot that closes the loop: the alert opens the incident, an agent investigates and cites its evidence, a human approves, the fix runs exactly once, and recovery is verified.

Recorded demo: a bad deploy breaks checkout, the alert opens an incident, the agent proposes a cited rollback, a human approves, and recovery is verified in 14 seconds
Recorded from the running system: bad deploy → alert → cited rollback proposal → approve → mitigated in 14 s

🛡️ New in v2: Sentinel Guard, envelope protection for any AI agent

No agent changes your cluster unless policy, or a human, approved that exact change, and then only once.

Sentinel's safety core, extracted for coding agents with kubectl, CI and GitOps bots, and LangGraph or MCP agents. It needs no agent code changes, because it enforces at the Kubernetes API. Humans, CI and controllers are never sent to it, so a guard outage stops only agents.

34.6 msp99 for an approved agent change, admitted once (3 replicas, through the API server)
7.5 msp99 for an agent change waiting for approval (a human's: 6.1 ms)
31 / 31end-to-end checks on a real API server, incl. its write retries, the guard taken down and tampered evidence
11.5 MBone Go binary, no database: state lives in the Kubernetes API

Provable to others. kubectl sentinel audit export writes one evidence file: every request, its signed events, the policy version it was decided under, the signed chain head. Anyone can verify it offline, and an edited copy fails, naming the record. Every replica re-verifies the chain itself, and tested alert rules flag drift in each agent's behaviour. How this maps to the EU AI Act and the NIST AI RMF →

Try it in one command. From a clone, docker compose up starts the guard and a support-desk agent working behind it. Open localhost:8080 as Alice (token alice-demo): every refund waits for you in the approvals inbox, closing an account needs Alice and Bob, receipts go out on policy, and erasures are never allowed. --profile monitoring adds Prometheus with the drift alerts and a Grafana dashboard. Quickstart →

helm install sentinel-guard oci://ghcr.io/abdulmdev/charts/sentinel-guard --version 2.0.0 -n sentinel-system --create-namespace · then kubectl sentinel approve <id> · Sentinel Guard docs →

✈️ Why Sentinel exists: the cockpit idea

Airliners don't rely on a pilot's nerve at 3 a.m. On-call engineers shouldn't have to either.

When something fails in a modern airliner, Airbus's ECAM and Boeing's EICAS show the alert, the affected systems and the checklist to run, and Airbus's flight-envelope protection stops inputs outside safe limits. The pilot stays in command; the automation keeps the right next step in front of them, so stress, fear or fatigue don't turn a manageable failure into a reactive one.

Production incidents have the same shape: paged at night, dashboards screaming, the fast reactive move is tempting (roll back whatever deployed last, restart everything). Sentinel brings the cockpit discipline to on-call:

In the cockpitIn Sentinel
Failure alert with the affected systems (ECAM / EICAS)The alert opens an incident; the agent gathers deploys, logs, metrics and runbooks
The right checklist for this failureOne proposed action, every claim cited to evidence
Envelope protection: unsafe inputs are blockedPolicy interlocks block unsafe actions even when proposed
The pilot decidesNothing runs until a human approves
Exactly the commanded input, nothing moreA single-use capability executes exactly the approved action, once
Instruments confirm the recoveryReal-traffic probes verify health before "resolved"
The flight data recorderAudit trail, timeline and auto-written postmortem

The goal isn't to replace the engineer. It's to make the calm, correct call the easy one, at any hour. Sentinel is not affiliated with Airbus or Boeing; the comparison describes a design philosophy.

Measured, not claimed

14–41 stime to mitigate, alert → verified healthy (6 live runs, human approval included)
0harmful actions, successful injections and PII leaks on the 112-incident benchmark (rule baseline)
33.9% → 0%harmful fixes proposed by a local 8B model vs. what reaches a human after guardrails
33.9% → 0%a small model's harmful actions behind an independent guard alone, with no good fix blocked (SafeActionBench)
290automated tests; CI incl. two real Kubernetes end-to-end runs

What happens when production breaks

  1. Detect. Prometheus fires; the incident opens itself, deduplicated and correlated per service.
  2. Investigate. A LangGraph agent calls MCP tools (deploys, logs, metrics, runbooks) within hard budgets.
  3. Diagnose. Ranked root causes, each cited to evidence; deterministic guardrails block unsafe actions.
  4. Approve. Nothing touches production until a human says yes.
  5. Execute once. Approval mints a 5-minute, single-use capability for exactly that action.
  6. Verify. Real-traffic probes decide “resolved”; time to mitigate and the postmortem are recorded.

Engineering highlights

Agentic AI, done safely

  • LangGraph with a human-approval interrupt and durable Postgres checkpoints
  • Tools over MCP; step and dollar budgets enforced by the graph
  • PII redaction, injection removal, citation validation, policy interlocks, constrained decoding
  • Claude, local gemma4 via Ollama, or rules

Zero-trust security

  • Only the gateway mints credentials: ES256 + JWKS; verifiers can't forge
  • Single-use capabilities; replay store fails closed
  • OIDC (Keycloak, PKCE); every hop authenticated and tenant-bound
  • Row-level security incl. agent checkpoints; least-privilege secrets checked in CI

Distributed systems

  • Kafka ingestion, idempotent re-index, dead-letter topic
  • Hybrid retrieval (pgvector + full-text, RRF) in one Postgres transaction
  • Race-safe alert dedup with a per-service advisory lock
  • Atomic Lua token bucket on Redis with local fallback

Rigor and operations

  • Deterministic benchmark (112 incidents + held-out) as a CI gate
  • OpenTelemetry trace per incident across Java → Python → MCP; Grafana
  • Helm (hardened pods, NetworkPolicies), kind e2e, Terraform for AWS
  • 9 ADRs; a 16-chapter handbook incl. every bug found

Architecture

Architecture overview: Prometheus and Alertmanager, the gateway, the LangGraph agent, MCP observability and remediation servers, Postgres, Kafka, Redis

Built with

Java 21Spring Boot 4Spring AI 2 Python 3.12LangGraphLangChain MCPFastAPINext.js 16 PostgreSQL + pgvectorKafkaRedis Keycloak (OIDC)OpenTelemetryPrometheus GrafanaKubernetes + HelmTerraform (AWS) GitHub ActionsClaude · gemma4

How it was built

PhaseOutcome
1 · FoundationGateway ↔ LangGraph agent ↔ chaos-lab; human approval; tenancy from the JWT
2 · Ingestion + RAGKafka ingestion; hybrid retrieval; row-level security by a non-superuser role
3 · AgentsMCP tool servers, downscoped tokens, budgets, durable checkpoints
4 · EvaluationReplayed-incident benchmark as a CI gate; found the 16% harmful-rollback bug
5 · HardeningGuardrails + injection tier, Redis limits, semantic cache, tracing, load tests
6 · ShipConsole, Helm on Kubernetes, Terraform for AWS, CI
7 · Close the loopAlerts open incidents; capability-gated execution; verification; time to mitigate
8 · Zero trustES256 + JWKS, OIDC, every hop authenticated, checkpoint RLS
9 · Publish and measureFull local-LLM benchmark; runbook preconditions take gemma4 from 11.6% to 0% harmful actions
10–13 · Sentinel GuardThe safety core for any agent: Kubernetes admission, SDKs and an MCP proxy, the copilot on it, SafeActionBench
14 · GovernanceSigned evidence export verifiable offline, policy versions, guardian alerts on agent drift, EU AI Act / NIST AI RMF mapping, one-click Codespaces demo
15 · Try it, ship itdocker compose up with a live agent, an approvals inbox in the guard, a Grafana dashboard for the guard, signed charts and SDK packages on every release
16 · Two peopleTwo-person approvals for the riskiest actions, approvers verified by OIDC at the guard, notifications to Slack; v2.0.0 released
17 · The whole pictureAn Overview of every agent's actions and a details view for every request, with its signed audit trail; incidents can no longer get stuck; released as v2.0.0, a stable API with upgrades tested