Start Free Trial
How it works

Ten ways in.
One governance layer.

AutoPIL enforces access policy at retrieval time — before sensitive data enters your agent's context window. Every integration path runs the same policy engine, writes to the same audit log, and fires the same alert rules.

Agent
any framework
@guard.protect()
decorator / wrapper
Policy Engine
YAML rules evaluated
✓ ALLOW → data returned
✗ DENY → exception raised
Audit Log
SQLite + OTEL
What happens on every retrieval
01

Session isolation

Each request is bound to a session ID and agent role. The session TTL is resolved from the policy YAML, with a global fallback. Concurrent requests never bleed context — async variants use ContextVar for safe isolation.

02

Policy evaluation

The policy engine evaluates role, source, sensitivity level, and session age. Sensitivity decay rules tighten the effective ceiling as the session ages — no operator action required. Decision is ALLOW or DENY — no partial access.

03

Audit event recorded

Every decision — ALLOW and DENY — is written to the audit log immediately. Event includes role, user, source, decision, policy name, timestamp, and event ID.

04

Alert rules evaluated

After the audit write, alert rules run against the event. Violations trigger configurable alerts — Slack, PagerDuty, webhook, or custom handlers.

05

PIL Score updated

Every enforcement decision contributes to the PIL Score — a 0–100 governance health index computed over the rolling 30-day window. Scope Integrity, Governance Coverage, Isolation Safety, Source Registration, and Trend. The score, its band, and a 30-day sparkline are visible in the dashboard and queryable via API.

Ten paths in. Same policy engine underneath.
system-prompt.txt
# Add to your agent's system prompt:
Before accessing any data source, call evaluate_context:
  agent_role: loan_underwriter
  user_id: <current user>
  source_id: <data source you want>
  sensitivity_level: high
  session_id: <conversation id>

Only proceed if decision is ALLOW.
mcp-response.txt
✅ ALLOW — loan_underwriter may access 'credit_scores'.
Policy: loan_underwriter_policy
Event ID: evt_abc123
autopil-mcp --policy policies/ — add to Claude Desktop or agent config.
Every integration. One audit log.
Channel source_type Use case
Python Decorator sdk Python microservices, scripts, notebooks
Async Decorator sdk Async Python agents (FastAPI, async frameworks)
MCP Server mcp Claude Desktop, any MCP-compatible agent
REST API rest Any language: Go, Java, Ruby, PHP, .NET
ASGI Middleware api FastAPI / Starlette apps — HTTP-layer enforcement
LangChain langchain LangChain agents, chains, and LCEL pipelines
LlamaIndex llamaindex LlamaIndex query engines and retrievers
Gemini gemini Google Gemini function-calling agents
OpenAI Agents openai_agents OpenAI Agents SDK function tools
AWS Bedrock bedrock Bedrock Agents via boto3 / aioboto3

Pick your integration path and ship today

Self-hosted. Every channel enforces the same policy and writes to the same audit log.

Start Free Trial Read the docs Browse industries