Your agents are accessing data your compliance team has never seen
AutoPIL enforces access policy at retrieval time — before sensitive data enters your agent's context window. Every decision is logged, auditable, and observable.
Built for regulated industries — where a data access violation is a compliance incident, not just a bug.
protect_async uses Python ContextVar for concurrent-safe tracking across async agents. Fully compatible with asyncio, FastAPI, and aioboto3.Adopt AutoPIL with a decorator, MCP tool call, REST request, ASGI middleware, or native wrappers for LangChain, LlamaIndex, Gemini, OpenAI Agents, and AWS Bedrock. Every path runs the same policy engine, writes to the same audit log, and fires the same alert rules.
# 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.
After retrieval, call record_action with the event_id.
✅ ALLOW — loan_underwriter may access 'credit_scores'. Policy: loan_underwriter_policy Event ID: evt_abc123 # pass event_id to record_action to complete the lineage chain
🚫 DENY — loan_underwriter cannot access 'executive_communications'.
Reason: source is on denylist for this role
Policy: loan_underwriter_policy
Do not proceed. Inform the user access is not permitted.
autopil-mcp --policy policies/ — then add it to your Claude Desktop or agent config. No code changes in the agent required.
Autonomous agents across regulated industries pull data at runtime — from vector stores, databases, and APIs. What enters the context window is unprotected by your existing governance stack.
Ship governance-ready on day one. Each industry pack defines agent roles, allowed sources, denied sources, and sensitivity ceilings — ready to load and customize.
policy_path="policies/" — all files are loaded automatically. Customize or extend any policy via the REST API without redeploying."Most enterprise data governance frameworks were designed for humans querying data. Autonomous agents operate at a fundamentally different speed and scale — and the governance tools have to catch up."
# What did the loan_underwriter agent access today? curl "https://api.autopil.ai/v1/audit/events\ ?agent_role=loan_underwriter\ &decision=ALLOW\ &limit=50" \ -H "X-API-Key: apl_yourkey" # Response [ { "event_id": "evt_abc123", "agent_role": "loan_underwriter", "source_id": "credit_scores", "decision": "ALLOW", "policy_name": "loan_underwriter_policy", "timestamp": "2026-03-26T14:22:01Z" }, ... ]
# Alert if deny rate exceeds 20% in any 10-minute window curl -X POST "https://api.autopil.ai/v1/alerts/rules" \ -H "X-API-Key: apl_yourkey" \ -d '{ "rule_type": "high_deny_rate", "threshold": 0.20, "window_minutes": 10, "notify_url": "https://hooks.slack.com/..." }'
Every enforcement decision, storage layer, and SDK method is fully documented. Start with the architecture overview or go straight to the guide that matches your role.
Govern the context. Trust the agent.™
Whether you're evaluating AutoPIL for a production deployment or exploring what retrieval-layer governance looks like for your organization — reach out.