What policy-as-code actually is
A policy-as-code rule is a machine-checkable statement an agent evaluates before it takes an action. "Refunds over $50 require manager approval" becomes a check that fires on every refund attempt; "no PII may leave the EU" becomes a boundary the agent cannot cross silently.
AgentPolicy reads your company policy text and generates these agent-callable checks plus a compliance checklist, mapped to the EU AI Act obligations the rules touch. The output is an exportable rules file — not a document.
Why agents need enforced policy, not just a PDF
A PDF policy is documentation a human reads once and forgets. An autonomous agent never "reads" it at all. Tell an agent to "process the refund," and it will — including the one above your approval threshold, because nothing in its runtime knows the threshold exists.
The EU AI Act makes this concrete. For systems in an Annex III high-risk use, Art. 9 (risk management) and Art. 14 (human oversight) effectively require that high-risk actions be governed by controls, not goodwill. A policy encoded as a rule is the control; a PDF is the intent.
The three layers: detect, gate, log
- Detect — extract each policy sentence as a condition + action (e.g.
if refund > $50 then require manager_approval). - Gate — wire the high-risk rules to human approval or a hard block before the action executes.
- Log — record every policy decision (Art. 12 of the Act requires logging of high-risk system activity) so you can prove what the agent did and did not do.
What policy-as-code cannot do
Policy-as-code reduces obvious failure modes and makes obligations visible. It is not a guarantee that the agent is safe, compliant, or error-free, and it is not a legal opinion or a compliance certificate. EU AI Act conformity is the deploying organization's responsibility and depends on the full system — not on one rules file.
Treat it as a seatbelt, not an autopilot.
Authoritative references
- EU AI Act (Reg. 2024/1689): https://eur-lex.europa.eu/eli/reg/2024/1689/oj
- AI Act explorer: https://artificialintelligenceact.eu/
- European Commission AI policy: https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai