Native Shell
Native Shell:AI 生成的 UI,在你的应用中原生呈现,覆盖每个平台。iOS、Android、macOS、Windows 与 Linux 上的应用、GPUI 应用与网页在运行时加载已签名、沙箱隔离的 TSX 模块并绘制 th
AI 翻译
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Agentic incident-response copilot: alerts open incidents, a LangGraph agent investigates via MCP, a human approves, a single-use capability executes the fix, and recovery is verified. Spring Boot 4 + Spring AI, LangGraph, Kafka, pgvector, Keycloak, Helm, Terraform.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗An agentic incident-response copilot that closes the loop: alert → investigation → human approval → exactly-once fix → verified recovery.
Website · Write-up: what a local 8B model taught us about letting AI touch production · User guide · Engineering handbook (PDF) · System design · ADRs · Benchmark report
Recorded from the running system: a bad deploy → the alert opens the incident → the agent proposes a cited rollback → approve → mitigated in 14 s.
Sentinel's safety core now ships on its own. No agent changes your cluster unless policy, or a human, approved that exact change, and then only once. It works with coding agents running kubectl, CI and GitOps bots, and LangGraph or MCP agents, with no code changes, because it enforces at the Kubernetes API. Humans, CI and controllers are never sent to it, so if the guard is down they are unaffected and only agents wait.
helm install sentinel-guard oci://ghcr.io/abdulmdev/charts/sentinel-guard --version 2.0.0 -n sentinel-system --create-namespace
$ kubectl -n shop scale deploy/checkout --replicas=3 # as an agent
Error from server (Forbidden): ... Sentinel Guard: scale of shop/deployment/checkout needs human approval (request ar-c8f4166c-1).
$ kubectl sentinel approve ar-c8f4166c-1 # on-call engineer
Approved ar-c8f4166c-1: scale of shop/deployment/checkout (replicas: 2 → 3), by alice.
Bound to the exact change. Approving "scale to 3" doesn't admit "scale to 0", a second restart, or the same change after someone reverted it. This is proven on a real API server in CI, including the API server's own write retries (33 end-to-end checks).
Two people where it matters. approvals: 2 makes an action wait for two different people, each authenticated (by Kubernetes, or by OIDC at the guard), each approval signed. Approvers are notified when a request needs them.
Tamper-evident, and provable to others. Every request, decision and execution is a signed link in a hash chain; kubectl sentinel audit verify checks it yourself and also detects deleted records. kubectl sentinel audit export gives an auditor one file to verify offline (below).
Small. One Go binary, an 11.5 MB image, no database. Its state lives in the Kubernetes API, and 3 replicas share it.
Measured (p99 through the API server, 3 replicas, a laptop): a human's change 6.1 ms, an agent's pending change 7.5 ms, an approved change admitted once 34.6 ms.
Any agent, not just kubectl:
guard.require(...), then guard.spend(...), or a decorator;Also kubectl apply -f install.yaml, docker run ghcr.io/abdulmdev/sentinel-guard (single process, HTTP API for agents outside Kubernetes), and kubectl krew install sentinel/sentinel. Sentinel Guard docs →
Try it in one command, from a clone:
docker compose up
Then open http://localhost:8080 and sign in as Alice (token alice-demo; Bob's is bob-demo). The inbox opens on an Overview of what every agent did and what waits for people; click any request for its full, signed story. A support-desk agent works through tickets behind the guard: receipts go out on policy, every refund waits for you in the inbox (Approve once or Deny), closing an account needs both Alice and Bob, and erasure requests are never allowed. docker compose logs -f notifications shows what Slack would receive. Add --profile monitoring for Prometheus with the guard's drift alerts, and a Grafana dashboard. Quickstart →
Or open the repository in GitHub Codespaces (button above) and run scripts/guard-demo.sh, a scripted minute: a person approves, the action runs exactly once, a replay is refused, and the record is exported, verified offline and caught when edited. What it shows →
An open, deterministic benchmark of 224 replayed production incidents: red herrings, missing data and prompt injection hidden in log lines.
safeactionbench serve.| dev split | Harmful, as proposed | Behind the reference guard | Fix rate |
|---|---|---|---|
| Always restart (the 3 a.m. reflex) | 83.0% | 0.0% | 20.6% |
| gemma4 8B, the model alone | 33.9% | 0.0% (38 blocked, no good fix lost) | 45.6% |
| Sentinel's rules | 0.0% | 0.0% | 82.6% |
The incidents are synthetic, so the guarded numbers are an upper bound; the benchmark says so on its own page. Leaderboard → · Take it →
What agents did, who allowed it and under which rules, in a form anyone can check:
kubectl sentinel audit export writes one file: every request, its signed events, every policy version and the signed chain head. kubectl sentinel audit verify --bundle checks it offline; --previous proves nothing was removed since the last archived export.Airliners don't rely on a pilot's nerve at 3 a.m. On-call engineers shouldn't have to either.
Modern airliners don't rely on a pilot's memory and nerve at 3 a.m. When something fails, Airbus's ECAM and Boeing's EICAS show the alert, the affected systems and the checklist to run. Airbus's flight-envelope protection stops inputs that would take the aircraft outside safe limits. The pilot stays in command throughout. The automation's job is to keep 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. An engineer gets paged at night, under pressure, with dashboards screaming, and the tempting move is the fast, reactive one: roll back whatever deployed last, restart everything, scale it up. Sentinel brings the cockpit discipline to on-call:
| In the cockpit | In 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 failure | One proposed action, with every claim cited to evidence |
| Envelope protection: unsafe inputs are blocked | Policy interlocks block unsafe actions even when proposed (no rollback without a recent deploy, no restart without memory growth, …) |
| The pilot decides | Nothing runs until a human approves |
| Exactly the commanded input, nothing more | A single-use capability executes exactly the approved action, once |
| Instruments confirm the recovery | Real-traffic probes verify the service is healthy before "resolved" |
| The flight data recorder | The audit 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.
When production breaks, the on-call engineer's first 10–30 minutes go to gathering evidence. Sentinel does that work, keeps a human in charge, and proves the result:
RESOLVED, time to mitigate is recorded, and the postmortem writes itself.| Time to mitigate (alert start → verified healthy, incl. the human approval) | 14–41 s across 6 live runs (phase history) |
| Rule baseline, 112 replayed incidents (incl. red herrings, outages, prompt injection) | 92.9% correct remediation, 0 harmful actions, 0 successful injections, 0 PII leaks |
| Local LLM (gemma4 8B), same 112 incidents | it proposes a harmful fix in 33.9% of incidents; the guardrails let 0% through (62.5% correct; every unsafe proposal escalates instead) |
| The eval caught a real bug | the first baseline rolled back harmless deploys in 16% of incidents → fixed to 0%; CI now fails on regression |
| Load (k6) | incidents p95 314 ms at 5/s; search p95 18 ms at 20/s; a 200-request burst admits exactly 120 (distributed limiter) |
| Quality gates | 331 automated tests (incl. 72 for Sentinel Guard, 25 for its SDKs, 13 for SafeActionBench), plus 33 Guard checks on a real API server and an 8-check upgrade test from the last alpha, promtool-tested alert rules, an asserted walkthrough and a checked docker compose quickstart; CI with a real Kubernetes end-to-end run, green on the first push (only the paid Claude eval job is skipped: no key) |
🤖 Agentic AI, done safely
🔐 Zero-trust security
⚙️ Distributed systems
📈 Engineering rigor
| Service | Stack | Role |
|---|---|---|
gateway-service | Java 21, Spring Boot 4, Spring AI 2 | API, OIDC + tenancy, rate limits, hybrid RAG /ask, alert intake, sole token issuer (JWKS) |
agent-service | Python, LangGraph, FastAPI | Investigation → RCA → guardrails → approval → execute → verify → postmortem |
ingestion-service | Spring Boot, Kafka, Flyway | Chunk → embed (local ONNX) → index; owns the schema (V1–V7) |
mcp-tools/observability | MCP (FastMCP) | Deploys, grouped logs, metrics, verification probes |
mcp-tools/remediation | MCP (FastMCP) | Capability-gated rollback / restart / pool / failover / scale |
web | Next.js 16 BFF | Console: OIDC code flow, approvals, closed-loop timeline, integrations |
chaos-lab | FastAPI | Demo services with injectable faults and an ops API |
Deep dive: high-level design · security · evaluation · the full handbook as a PDF.
| Closed loop: executed, verified, timeline | One trace per decision (Jaeger) |
|---|---|
| Grafana: outcomes, time to mitigate, LLM cost | Revocable integration tokens (tenant admins) |
Prerequisites: Docker, Java 21+, Maven, uv, Node 24. Optional: Ollama for a free local LLM.
scripts/dev-local.sh up
python3 chaos-lab/inject.py checkout bad_deploy
Open http://localhost:3000, sign in with Keycloak (alice@acme; dev passwords in deploy/keycloak/sentinel-realm.json), wait about 40 s for the alert-opened incident, and click Approve. With a local model: SENTINEL_LLM_PROVIDER=ollama scripts/dev-local.sh up. On Kubernetes: scripts/kind-up.sh. Full walkthrough: user guide.
cd gateway-service && mvn verify
cd agent-service && uv run pytest
uv run --project agent-service python evals/rca/run.py --check
cd guard && go test -race ./...
LOAD=1 scripts/guard-e2e.sh
CI (workflow) runs all test suites (Testcontainers on real pgvector/Redis), the benchmark gate (main + held-out), docs-sync checks, Helm/kubeconform/Terraform validation, a least-privilege secrets check, and a real kind cluster end to end (incident → approve → RESOLVED, NetworkPolicy denials), and the Sentinel Guard end to end (33 checks, a load run, the guard taken down), and the docker compose quickstart (29 checks, with Prometheus and Grafana), then publishes multi-arch images.
| Idea | Code |
|---|---|
| The agent's state machine (investigate → … → verify) | agent-service/app/graph.py |
| Guardrails: interlocks, citation validation, PII/injection | agent-service/app/guardrails.py |
| Single-use capability, checked before any side effect | mcp-tools/remediation/server.py · GuardClient.java · guard_client.py |
| Issuer-routed JWT verification (no algorithm confusion) | RoutingJwtDecoder.java |
| Race-safe alert dedup and correlation | AlertLinkRepository.java |
| Row-level security on LangGraph checkpoints | agent-service/app/checkpoint.py |
| Hybrid retrieval (RRF) |
Nine phases, each with its goal, decisions, bugs found and fixed, and measured results in the phase history:
| Phase | Outcome |
|---|---|
| 1 Foundation | Gateway ↔ LangGraph agent ↔ chaos-lab; human approval interrupt; tenancy from the JWT |
| 2 Ingestion + RAG | Kafka ingestion; hybrid pgvector + full-text retrieval; RLS enforced by a non-superuser role |
| 3 Agents | MCP tool servers, downscoped tool tokens, budgets, durable Postgres checkpoints |
| 4 Evaluation | 112 replayed incidents, deterministic scoring, CI gate; found the 16% harmful-rollback bug |
| 5 Hardening | Guardrails + injection tier, Redis limits, semantic cache, OpenTelemetry, k6 |
| 6 Ship | Next.js console, Helm on Kubernetes, Terraform for AWS, CI |
| 7 Close the loop | Alerts open incidents; capability-gated execution; verification; time to mitigate |
| 8 Zero trust | ES256 + JWKS, Keycloak OIDC, every hop authenticated, checkpoint RLS |
| 9 Publish and measure | Full local-LLM benchmark; runbook preconditions take gemma4 from 11.6% to 0% harmful actions |
| 10 Sentinel Guard (v2 alpha) | The safety core as a Kubernetes-native Go service for any agent; exactly-once proven on a real API server, including its write retries; p99 42.9 ms for an approved change |
| 11 The copilot on the guard | One safety core: the agent proposes to the guard, console approvals are recorded there by the gateway, the adapter redeems the guard's capability; live: alert → verified fix in 24.4 s |
| 12 SDKs and the MCP proxy | Python and TypeScript SDKs, a LangChain/LangGraph wrapper and a zero-code MCP proxy, tested against the real guard |
| 13 SafeActionBench | The incident benchmark as an open benchmark for any agent and any guard; an independent guard alone took a small model from 33.9% to 0% harmful |
| 14 Governance and compliance | A signed evidence export anyone can verify offline, policy versions, signed checkpoints, guardian alerts on agent drift (tested with promtool), the EU AI Act / NIST AI RMF mapping, and a one-click Codespaces demo |
| 15 Try it, ship it | docker compose up with a live agent, an approvals inbox in the guard, the guard's Grafana dashboard, signed charts and SDK packages on every release, with PyPI/npm/Artifact Hub publishing ready to switch on |
| 16 Two people | approvals: N for the riskiest actions (distinct, authenticated people, every approval signed and verified), approvers verified by OIDC at the guard, notifications to Slack-style webhooks; v2.0.0 released |
| Decision | Reason |
|---|---|
| Java gateway + Python agents | Platform concerns (auth, tenancy, rate limits, resilience) sit on the JVM. The agent ecosystem (LangGraph) is in Python. See ADR-0001. |
| Human-in-the-loop interrupt | Remediation changes production. LangGraph interrupt() pauses the graph, and the gateway takes the reviewer's identity from the JWT, not the request body. |
| Model routing | Triage is classification, so it runs on claude-haiku-4-5. RCA needs reasoning, so it runs on claude-opus-5-5. |
| Heuristic fallback | Without an API key, or when an LLM call fails, rule-based triage and RCA run instead. They are also the eval baseline the LLM path has to beat. |
| Tenant from the token, everywhere | The gateway ignores tenant_id in request bodies. Agent threads are keyed tenant:incident. Postgres uses row-level security. |
| chaos-lab | Real services with injectable faults, so the agent is tested on real symptoms instead of mocked text. |
| Hybrid retrieval in Postgres | Vectors and full-text live in the same row and are fused with RRF. One system, one transaction, one RLS model. See ADR-0003. |
| Tools over MCP | Observability and runbook search are MCP servers the agent discovers at runtime, reusable by any MCP client. See ADR-0004. |
| Downscoped tool tokens | The agent never holds a user's token: the gateway mints a 15-minute, single-tenant, knowledge:read, MCP-only JWT per incident, and it's never checkpointed. |
| Capabilities, not deploy credentials | The agent holds no standing power to change production. It registers each proposal in Sentinel Guard; when a human approves in the console, the gateway records that decision in the guard on their behalf, and only then does the guard issue a single-use capability bound to one action, one service, the approved parameters and one incident. The adapter verifies it with the guard's public key and redeems it at the guard before acting, failing closed. A compromised agent can at most do the one thing a human approved, once. See and . |
Claude benchmark column (needs an API key) · compaction after archived evidence export · approvers from different teams · Slack approvals · KMS-backed signing and mTLS · async approval with streamed progress · dependency-aware alert correlation · incidents recorded from real postmortems. Details: limitations and roadmap.
Contributions are welcome: see CONTRIBUTING (how to run, verify and keep the docs in sync), the code of conduct and the security policy. Licensed under the Apache License 2.0.
ReciprocalRankFusion.java| Distributed rate limiter (Lua) | RedisRateLimiter.java |
| Benchmark scoring and its CI thresholds | evals/rca/scoring.py · thresholds.json |
| Guard: exactly once, API-server retries, the signed audit chain | guard/internal/guard/engine.go · classify.go · audit.go |
| Guard: compare-and-swap state in the Kubernetes API | guard/internal/store/kube.go · admission.go |
| 17 The whole picture | An Overview in the inbox (what agents did, what waits, the chain's health) and a details view for every request; rejections close incidents whose guard request is gone; alerts never join an ended incident; a fresh read so a just-made approval counts at once; released as v2.0.0 (stable sentinel.dev/v1 API, upgrades from the alphas tested in CI) |
| Alerts open incidents | Alertmanager webhook with a per-tenant integration token. Re-fires are deduplicated, and several rules tripping on one fault are correlated into one incident under a per-service advisory lock. opened_at = the alert's start. |
| Zero-trust identity | Only the gateway can mint service credentials: ES256 with a published JWKS, so the agent, MCP servers and remediation adapter verify but can't forge. Users sign in through OIDC (Keycloak in dev). Every hop is authenticated and tenant-bound, and the agent's checkpoints are under Postgres RLS. CI checks which pod may hold which secret. See ADR-0009. |
| Verified, measured outcomes | "Resolved" means probes pass after the fix, not "someone clicked approve". Time to mitigate is recorded per incident and as a histogram. |
| Budgets enforced by the graph | Tool-call and dollar caps are checked in code before each step. Stop reasons are recorded, exported as metrics and printed in the postmortem. |
| Durable incidents | Every step is checkpointed to Postgres, so a paused incident survives restarts and resumes on any replica. |
| Guardrails: model proposes, policy disposes | PII redaction and injection removal on tool output; citation validation, runbook policy interlocks and constrained decoding on model output. Measured raw vs. guarded in the benchmark. See ADR-0006. |
| Pluggable LLM | SENTINEL_LLM_PROVIDER=anthropic|ollama: Claude or a free local model (gemma4) for both the agent and /ask. |
| Distributed rate limits | Atomic Lua token bucket in Redis using Redis's clock; agent traffic gets its own bucket; per-instance fallback if Redis is down. |
Semantic cache for /ask | pgvector, tenant-scoped, invalidated by a knowledge-version fingerprint the moment a runbook changes. |
| End-to-end tracing | One OpenTelemetry trace per incident across gateway → agent → MCP servers, with GenAI attributes (model, tokens, cost). Grafana dashboard for cost, safety and latency. |
| Async ingestion over Kafka | Uploads return once Kafka acks them. Embedding runs in ingestion-service, re-ingest is idempotent (content hash), and bad messages go to a dead-letter topic. |