AutoPIL is the policy enforcement and audit layer between your AI agents and your sensitive data. Built for regulated industries where a data access violation is a compliance incident, not just a bug.
Sixteen capabilities that work together to give your compliance and engineering teams full control over what data enters an agent's context window.
session_ttl_minutes per agent role in policy YAML. A fraud_investigator session expires in 60 minutes. A route_optimization_agent runs for 8 hours. Precedence: policy → global server setting → no expiry.fraud_investigator has full critical access for 30 minutes, then drops to high, then medium. Risk narrows over time without operator action.fraud_detected, admin_action, policy_violation, user_logged_out, and more — with an exact revoked_at timestamp. Surfaced as a tooltip on the status badge in the dashboard.protect_async uses Python ContextVar for concurrent-safe last_event_id tracking across async agents. Fully compatible with asyncio, FastAPI, and aioboto3.on_deny="log") for zero-disruption rollout. Buffers and replays the request body so downstream handlers are unaffected.source_type — one of 9 channels. Dashboard by_source_type breakdown lets you see which channels are generating the most access or denial events.Most platforms call their log "immutable" because there's no delete button. That's not tamper evidence — it's just a UI restriction. AutoPIL chains every event to the previous one using SHA-256. If any row is modified, deleted, or inserted out of order, the chain breaks and the verification endpoint tells you exactly which event.
This is what SOC 2 Type II auditors look for under CC7.2 and CC9.1 — evidence that log integrity controls exist and are verifiable on demand.
Most platforms give you data. AutoPIL gives you a score. Every enforcement decision — every ALLOW, every DENY, every isolation check — flows into a continuously updated PIL Score: a 0–100 governance health index that tells your compliance team and your board exactly where you stand.
The component breakdown pinpoints where to focus: low Governance Coverage means unregistered agents; low Source Registration means shadow data access; a declining Trend means something changed in the last 30 days that needs investigation.
Adopt AutoPIL with whichever integration fits your stack. Every channel runs the same policy engine and writes to the same audit log.
@guard.protect() decorator for Python microservices, scripts, and notebooks. Sync and async variants.bedrock-agent-runtime client. Supports sync and async (aioboto3). inputText used as the policy query.Each SDK wraps the same REST API and preserves the same method signatures so you can swap languages without relearning the integration.
pip install autopil
from autopil import ContextGuard guard = ContextGuard(policy_path="policies/") @guard.protect(agent_role="analyst", ...) def retrieve(query): ...
npm install autopil-ts
import { AutoPILClient } from 'autopil-ts'; const client = new AutoPILClient({ baseUrl, apiKey }); const result = await client.context.evaluate({ agent_role: 'analyst', ... });
go get github.com/vibrantcapital/autopil-go
import "github.com/vibrantcapital/autopil-go/autopil" client := autopil.New("http://localhost:8000", "apl_yourkey") result, err := client.Context.Evaluate(ctx, autopil.EvaluateRequest{ AgentRole: "analyst", SourceID: "reports", })
ai.vibrantcapital:autopil-java:0.1.0
AutoPILClient client = AutoPILClient.builder() .baseUrl("http://localhost:8000") .apiKey("apl_yourkey") .build(); EvaluateResponse resp = client.context().evaluate( EvaluateRequest.builder() .agentRole("analyst") .sourceId("reports") .build());
The AutoPIL dashboard gives your team a live view of every policy decision, across every channel, in one place.
by_source_type with total, allowed, and denied per channel.