§ PLATFORM / POLICY ENFORCEMENT
Policy that decides before the agent acts.
A rule in a prompt is a request. Execlave turns it into a decision: before a governed action runs, the agent asks Execlave, and the action is allowed, flagged, blocked or held for a human. The decision is synchronous, and every violation is written to the audit trail with the policy version that made it.
§ CAPABILITIES
Enforcement, not just observation
Observability tells you what an agent did. Enforcement decides what it is allowed to do, before it does it.
Enforcement, not just observation
01 / Capability
A decision before every action
The agent calls Execlave through the SDK or the enforce API before it acts. Each matching policy blocks, warns, monitors or requires approval. Output checks, such as the classifier, quality threshold and groundedness policies, evaluate the recorded result afterwards.
The permissions policies grant are watched for drift →02 / Capability
19 enforced policy types
Access control, data restriction, PII access, injection scanning, cost and budget caps, record limits, external calls, tool invocation, tool integrity and tool output scanning, among others. Write your own as CEL expressions, Rego or a call to your own validator.
03 / Capability
Approvals bound to the action
A require-approval policy holds the action for a human. The approval issues a certificate bound to that exact action: it expires, works once and is anchored in the audit trail. The SDKs refuse to run a different action under it.
04 / Capability
Policy as code, tested first
Keep policies as JSON or YAML in your repository. The CLI lints them and prints a plan before it applies anything. A dry run tests policies against sample traces, and every policy keeps its version history.
§ MEASURED
Measured in production
The enforce decision on api.execlave.com (EU West, Amsterdam), measured on 29 October 2026 over 300 calls: API-key authentication, the database reads and policy evaluation, read from each response's Server-Timing header. The client's network time is shown separately, and no model-backed semantic check ran.
Measured in production
§ ROLL IT OUT
How to enforce a policy on an AI agent
Start by watching, then enforce. Each step can be undone without redeploying the agent.
How to enforce a policy on an AI agent
Instrument the agent
Register the agent and call enforce before each governed action, with the JavaScript or Python SDK or with POST /api/v1/policies/enforce.
Write the policy
Create it in the dashboard, through the API, or as a JSON or YAML file applied with execlave policies sync. You can also draft one from a plain-English description and review it before saving.
Dry-run it
Run it against sample traces with POST /api/v1/policies/test or execlave policies test. Nothing is enforced; you see which traces would pass or violate.
Start in monitor mode
Scope the policy to one agent or one environment and set it to monitor. Violations are recorded while every action still runs.
Switch to block or require approval
When the violations are the ones you expect, change the mode. Decisions after the change use the new mode; the agent itself does not change.
§ QUESTIONS
AI agent policy enforcement, answered
AI agent policy enforcement, answered
What is AI agent policy enforcement?
AI agent policy enforcement is a check, outside the agent, that decides whether an action may run before it runs. Unlike instructions in a prompt, the agent cannot talk its way past it, and unlike logging, it stops the action instead of describing it afterwards.
What happens when a policy matches?
It depends on the policy's mode. Block stops the action. Require approval holds it until a human decides. Warn and monitor let it run and record the violation. Every violation is written to the hash-chained audit trail with the agent, the policy and its version.
How fast is the policy check?
The policy check is a synchronous decision before the action runs, and every enforce response reports its own server-side cost in a Server-Timing header. Measured in production on 29 October 2026, the server-side decision took 19.9 ms at the median and 27.0 ms at p99, including API-key authentication. Your client adds network time, and the optional model-backed semantic tier adds model latency. Method, lab and production figures on /benchmarks.
What happens if Execlave cannot be reached or a check fails?
Each policy has a failure mode: fail open, the default, lets the action proceed if its check errors; fail closed blocks it. The SDKs fail open by default when the service is unreachable. Set enforcementOnOutage to fail_closed (enforcement_on_outage in Python) for agents that must stop instead.
Can I write my own rules?
Yes. Expression policies use CEL, Rego policies compiled to WebAssembly run on Open Policy Agent's engine, and a custom validator calls your own endpoint. A plain-language rule judged by a model is also available, but it can only monitor or warn, never block.
Can I test a policy before it affects production?
Yes, three ways. A dry run evaluates policies against sample traces without enforcing them. Monitor mode records violations on live traffic while every action runs. And the CLI prints a plan of what it will create or change before you pass --apply.
Does policy enforcement work with my agent framework?
It works with any agent that can make an HTTP call before it acts. The JavaScript and Python SDKs wrap the call, and the enforce API is available directly. An agent that never calls Execlave is outside the control.
§ COMPARISON
Execlave vs. other places to put a rule
Prompt instructions and API gateways both constrain agents. Neither makes a per-action decision that knows the agent, the tool and the data, and leaves evidence behind.
Execlave vs. other places to put a rule
| Aspect | Prompt instructions | API gateway | Execlave enforcement |
|---|---|---|---|
| Where the rule lives | Inside the model's context | At the network edge | Outside the agent, before each governed action |
| Can the agent get around it | Yes, through injection or drift | Only for traffic that skips it | Not while the agent is instrumented |
| What it understands | Text | Routes, keys and payloads | Agent, tool, data, cost and environment |
| Human approval | No | Not built in | Bound to the exact action, single use |
| Evidence | None | Access logs | Hash-chained violations with the policy version |
Put your first policy in monitor mode today
Register an agent, add one enforce call, and watch what your policies would have stopped. Cloud or self-hosted.