ZABTA DOCS

Policy Engine

Zabta's policy engine evaluates every AI agent action against a three-layer policy system in real time. When an agent calls evaluate(), the engine checks the action against all applicable policies and returns a decision (allow, deny, or escalate) with the specific policy, regulatory citation, and risk tier that triggered it.

Three-layer architecture

1

Universal policies

Apply to every agent, everywhere, regardless of jurisdiction or industry. These encode fundamental AI safety principles: no deception, no unauthorized data collection, no actions that could cause physical harm. Universal policies are always active and cannot be disabled.

2

Jurisdiction packs

Region-specific regulatory requirements that activate when an agent operates in a particular jurisdiction. Zabta currently supports 14 jurisdictions. Each pack contains policy templates grounded in actual legislation — not placeholder metadata. Activate packs from the dashboard or API based on where your agents operate.

3

Sectoral overlays

Industry-specific rules that layer on top of jurisdiction packs. Available sectors include healthcare (HIPAA-aligned), finance (algorithmic trading, credit decisioning), and education (student data, algorithmic grading). Sectoral overlays add domain expertise without duplicating jurisdiction-level rules.

Evaluation flow

  1. Agent calls client.evaluate(action, context)
  2. Engine identifies applicable policies: all universal + active jurisdiction packs + active sectoral overlays
  3. Policies are checked in priority order: DENY rules first, then ESCALATE, then ALLOW
  4. First matching DENY or ESCALATE stops evaluation and returns immediately
  5. If no DENY or ESCALATE matches, the action is allowed
  6. Result includes the triggering policy, citation, layer, risk tier, and evaluation time
python
result = client.evaluate(
    action="send_email",
    context={"has_pii": True, "jurisdiction": "eu"}
)
# → decision: "escalate"
# → policy: "PII Guardian"
# → citation: "GDPR Art. 5"
# → layer: "universal"
# → risk_tier: "high"

Policy cache

The policy engine uses an in-memory cache (PolicyCache singleton) that reduces evaluation latency by approximately 65%. Policies are cached per-tenant and invalidated when jurisdiction packs are activated or deactivated.

~500ms

With cache

~1,500ms

Without cache

Decision types

ALLOW

Action permitted. No policies blocked it. Agent proceeds.

DENY

Action blocked by a specific policy. Agent must not proceed. The response includes the blocking policy name and regulatory citation.

ESCALATE

Action requires human review before proceeding. The agent should pause and route to a human decision-maker.

Custom policies

Beyond the built-in jurisdiction packs and sectoral overlays, you can create your own policies to enforce organization-specific rules.

Go to Policies → Create Policy in the dashboard. Each custom policy has:

  • Name and slug — A human-readable name and a machine ID returned by the SDK in result.policy
  • Category — What the policy governs (Action, Data, Communication)
  • Access level — The decision when triggered: Deny (block the action), Escalate (route to human review), or Allow (explicitly permit)
  • Risk tiers — Which agent risk tiers this policy applies to (Low, Medium, High, Critical). Leave empty to apply to all tiers.
  • Agent categories — Which types of agents this policy affects (Support, Data, Ops, Finance, Security, Custom). Leave empty to apply to all agents.

Custom policies are evaluated alongside jurisdiction pack policies on every agent action. They follow the same deny-by-default logic: DENY rules are checked first, then ESCALATE, then ALLOW.

Example: Creating a policy called “Block Unauthorized Exports” with access level DENY and risk tiers High and Critical will block any high-risk or critical agent from performing export actions.

Custom policies appear in your evaluation results:

python
result = client.evaluate(action="export_data", context={...})
# result.policy → "block_unauthorized_exports"
# result.layer → "custom"

Risk tiers

Minimal

Low-risk actions with no regulatory concern.

Limited

Some transparency requirements apply.

High

Significant regulatory requirements — human oversight, documentation, impact assessments.

Unacceptable

Action is prohibited under applicable regulation.

Related