Overview
Interventions are records of when Agent Sentinel’s policy engine actively prevented or modified agent actions. The Interventions API provides:
- Query endpoints for intervention history
- Statistics showing “blast radius” avoided
- Cost prevention metrics
- Risk analysis
Endpoints
List interventions
Query parameters:
type (optional): Filter by intervention type
hard_block, approval_required, rate_limited, budget_exceeded, downgrade, warning
outcome (optional): Filter by outcome
blocked, escalated, approved_after_review, rejected_after_review, modified, warned
action_name (optional): Filter by action name (exact match)
agent_id (optional): Filter by agent ID
run_id (optional): Filter by run ID
policy_id (optional): Filter by policy that triggered intervention
risk_level (optional): Filter by risk level
critical, high, medium, low, minimal
start_date (optional): Filter by date range start (ISO 8601)
end_date (optional): Filter by date range end (ISO 8601)
skip (optional): Pagination offset (default: 0)
limit (optional): Page size (default: 50, max: 1000)
Example:
Response:
Get intervention details
Returns detailed information about a specific intervention.
Intervention statistics
Returns aggregate statistics showing platform value:
Create intervention (SDK)
Interventions are primarily created automatically by the SDK when policies trigger, but can also be created manually:
Delete intervention
Remove an intervention record (rare - usually for testing):
Intervention types
Guardrail context payloads
For Phase 7 guardrail blocks, the SDK populates intervention.context with a versioned, typed payload so the console can render a dedicated detail panel:
The guardrail discriminator is one of pii, moderation, loop, or idempotency. See Console → Interventions for how each panel renders.
Enriched fields
After ingest, a Gemini background task overwrites the following fields with plain-English versions (the original strings are preserved on the intervention’s audit trail):
reason — one or two sentences explaining the policy concern
agent_intent — what the agent was likely trying to accomplish
risk_level — reassessed severity
remediation_payload.suggested_rewrite — how the agent could safely retry, or null
Enrichment runs out-of-band, so the SDK’s POST /api/v1/ingest/ returns immediately and the enriched fields stream into the console asynchronously. Requires GEMINI_API_KEY (or GOOGLE_API_KEY) on the platform; degrades silently when absent. See SDK → LLM integrations.
Intervention outcomes
Risk levels
Use cases
Show stakeholders what disasters were prevented:
Security monitoring
Monitor attempted policy violations:
Policy tuning
Identify policies that trigger frequently (may need adjustment):
Agent behavior analysis
Understand which agents are most frequently blocked:
Web console
View interventions in the web console:
- Navigate to Interventions page
- See dashboard with:
- Total interventions
- Cost saved
- High-risk blocks
- Blocked actions count
- Filter by type, outcome, risk level
- Click intervention for details including blast radius analysis
- Link to adjust triggering policy
Best practices
Review interventions regularly: High intervention rates may indicate overly restrictive policies or misbehaving agents.
Use blast radius field: Document what would have happened if the action was allowed - this demonstrates platform ROI.
Track cost prevented: Even if estimated_cost_usd is 0, interventions prevent non-monetary harm (data loss, reputation damage).
Don’t rely solely on interventions: Some actions may slip through if policies aren’t comprehensive. Use interventions as defense-in-depth.
See also