What is a Compliance Rule?
A compliance rule is a policy rule specifically designed to enforce regulatory or organisational compliance requirements on AI agent tool calls, ensuring automated operations stay within legal and corporate boundaries.
WHY IT MATTERS
AI agents operating through MCP tools can access databases, trigger API calls, modify infrastructure, and process sensitive data. Without compliance rules, each of these operations is a potential regulatory violation waiting to happen. A coding agent that queries a production database might inadvertently access personally identifiable information in breach of GDPR. A DevOps agent might modify cloud infrastructure without the change management process required by SOC 2.
Compliance rules translate legal and organisational obligations into machine-enforceable constraints. Rather than relying on the LLM to 'know' it shouldn't access EU customer data without a lawful basis, a compliance rule explicitly blocks or restricts the tool call at the proxy layer. This is defence in depth — the agent's own reasoning is not trusted as a compliance control.
The distinction between a general policy rule and a compliance rule is intent and traceability. Compliance rules map directly to specific regulatory requirements or internal control objectives. When an auditor asks 'how do you prevent agents from accessing health records without authorisation?', the answer is a specific, version-controlled compliance rule with a clear audit trail of when it was created, reviewed, and last modified.
HOW POLICYLAYER USES THIS
Intercept enforces compliance rules as YAML policies evaluated on every MCP tool call. Each rule can target specific tools, arguments, or patterns — for example, blocking database queries that match PII column names, or requiring approval for any tool call that touches a production environment. Because policies are defined as code in git, every compliance rule has a full version history, review trail, and can be mapped to specific regulatory requirements in audit documentation.