> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentsentinel.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Sentinel

> Kill switch, observability, and cost control for Python AI agents.

Agent Sentinel helps you **observe**, **control cost**, and **enforce safety policies** across AI agent runs—without breaking your agent when telemetry fails.

## What you get

### Python SDK

* **Instrumentation**: `@guarded_action` decorator for automatic telemetry
* **Policy enforcement**: Budgets, allow/deny lists, rate limits
* **Guardrails**: Built-in PII detection, content moderation (incl. Gemini semantic), loop protection, idempotency replay
* **Human-in-the-loop**: Approval workflows for sensitive actions
* **Intervention tracking**: See what Sentinel blocks — with Gemini-enriched explanations
* **Remote sync**: Background sync to platform
* **Replay mode**: Zero-cost deterministic replay for debugging
* **LLM integrations**: Transparent instrumentation for OpenAI, Anthropic, Grok, Gemini
* **Framework support**: Native LangChain, CrewAI, AutoGen, and **LangGraph** integrations
* **MCP client**: Model Context Protocol for LLM-platform interaction
* **Error handling**: Comprehensive error types with recovery strategies

### Platform

* **Agent discovery**: Automatic registration and metrics
* **Interventions**: Track policy enforcement, with Gemini-enriched reasons and remediation hints
* **Approvals**: Human-in-the-loop approval workflows
* **Kill switch**: Emergency org-scoped halt for an agent / run / mission
* **Prose policies**: Compile English / YAML / JSON to the policy IR via `POST /policies/compile`
* **Policy versioning**: Immutable version history, side-by-side diff, one-click rollback
* **Evals & benchmarks**: Submit benchmark results, compare runs for regressions, generate adversarial scenarios
* **Activity Ledger**: Complete audit trail with advanced filtering
* **WebSocket real-time**: Live event streaming
* **MCP endpoints**: LLM-native API for autonomous operations
* **Stats & analytics**: Cost tracking and performance metrics
* **Replay analysis**: Org-wide local-replay history, determinism scoring, divergence detection
* **Compliance**: EU AI Act Article 14 support

### Web Console

* **Real-time dashboard**: Live monitoring with WebSocket updates
* **Interventions**: Typed guardrail panels (PII / moderation / loop / idempotency) with enriched reasons
* **Approvals inbox**: Review and approve sensitive actions
* **Kill Switch** (`/kill-switch`): Emergency controls promoted to top-level
* **Runs explorer**: Execution history with replay simulation
* **Replay Hub** (`/replay`): Org-wide ledger of local-replay submissions and savings
* **Activity Ledger**: Complete audit trail with export
* **Agent management**: Fleet overview with performance metrics
* **Evals** (`/evals`): Benchmark scorecards, regression diff, scenario generator (Gemini-powered)
* **Analytics**: Cost dashboards, per-action token + latency drill-down
* **MCP Explorer** (`/mcp`): Browse the platform's tools / resources / prompts
* **Settings**: Policy builder with prose authoring, version diff/rollback, evidence DAG viewer

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get started in 10 minutes - instrument your agent and sync to the platform.
  </Card>

  <Card title="Python SDK" icon="python" href="/sdk/python/installation">
    Full SDK documentation - instrumentation, policies, approvals, LLM integrations.
  </Card>

  <Card title="Platform API" icon="server">
    Platform documentation - agents, interventions, approvals, real-time updates.
  </Card>

  <Card title="Web Console" icon="desktop" href="/console/overview">
    Web UI guide - dashboard, interventions, approvals, runs, analytics.
  </Card>
</CardGroup>

## How Agent Sentinel fits into your agent

At runtime your agent code calls tools / functions. Agent Sentinel wraps those calls:

* **Before execution**: policy engine checks allow/deny lists, budgets, and rate limits.
* **After execution**: a ledger entry is appended (inputs, outputs, cost, duration, outcome).
* **Optional**: a background sync thread batches ledger entries to the platform (`/api/v1/ingest/`).

```text theme={null}
┌────────────────────────────┐
│ Your agent code            │
│  @guarded_action(...)      │
└──────────────┬─────────────┘
               │ (policy check + timing)
               ▼
┌────────────────────────────┐
│ Local ledger (.jsonl)      │
│  .agent-sentinel/ledger…   │
└──────────────┬─────────────┘
               │ (optional background sync)
               ▼
┌────────────────────────────┐
│ Platform                   │
│  POST /api/v1/ingest/      │
└──────────────┬─────────────┘
               ▼
┌────────────────────────────┐
│ Postgres (runs + actions)  │
└────────────────────────────┘
```

## Key features

<CardGroup cols={3}>
  <Card title="Guardrails" icon="shield-check" href="/sdk/python/guardrails">
    PII, moderation, loop protection, idempotency — first-class runtime primitives.
  </Card>

  <Card title="Interventions" icon="shield-halved" href="/sdk/python/interventions">
    Track what Agent Sentinel blocks, with Gemini-enriched reasons.
  </Card>

  <Card title="Prose policies" icon="wand-magic-sparkles" href="/sdk/python/prose-policies">
    Compile plain English, YAML, or JSON into the policy IR.
  </Card>

  <Card title="Kill switch" icon="ban" href="/console/kill-switch">
    Emergency org-scoped halt for any agent, run, or mission.
  </Card>

  <Card title="Evals & benchmarks" icon="flask" href="/console/evals">
    CI-gated scorecards, regression tracking, Gemini scenario generation.
  </Card>

  <Card title="Replay hub" icon="rotate" href="/console/replay">
    Org-wide history of local-replay submissions and dollars saved.
  </Card>
</CardGroup>

## Core concepts

<CardGroup cols={3}>
  <Card title="Actions & runs" icon="diagram-project" href="/concepts/actions-and-runs">
    The core data model: runs contain actions; actions have cost and outcome.
  </Card>

  <Card title="Policies" icon="shield" href="/concepts/policies">
    Budgets, allow/deny lists, rate limits, and remote policy sync.
  </Card>

  <Card title="Activity Ledger" icon="list" href="/concepts/ledger">
    Complete audit trail with compliance metadata and export.
  </Card>
</CardGroup>

<Note>
  Agent Sentinel is **fail-open for telemetry** (ledger writes and sync should never crash your agent), but **policy enforcement is fail-closed** by design (violations raise).
</Note>
