Skip to content
Policy Engine

Your rules. Enforced at the API layer.

The ADJUDON Policy Engine evaluates every inbound decision trace against your configured rules — in under 10ms. Conditions support AND/OR logic, regex matching, and priority ordering. When a policy fires, the API response code changes. Your pipeline never ships a decision that should have been blocked.

Deterministic evaluation at ingest

Every trace submitted to POST /api/traces is evaluated against your active policies before a response is returned. Evaluation is synchronous — the HTTP status code your application receives is the enforcement decision.

Conditions

Each policy defines one or more conditions evaluated against the trace payload. Conditions can reference any field: `confidenceScore`, `status`, `agentId`, `inputContext.*`, `outputDecision.*`, or custom metadata. Supported operators include equality, inequality, numeric thresholds (`<`, `>`, `<=`, `>=`), string matching, and regex patterns.

Actions

When all conditions on a policy match, the configured action executes. Four action types: `block` — rejects the trace and returns HTTP 403; `flag_for_review` — accepts the trace with HTTP 202 and auto-creates a review item in the human review queue; `approve` — explicitly passes the trace with HTTP 201; `notify` — triggers an alert without changing the routing outcome.

AND/OR Logic

Conditions within a single policy are evaluated with AND logic — all must match for the action to fire. Multiple policies can target the same trace; they are evaluated in priority order, and the first matching policy with a terminal action (block or flag) determines the response.

Regex Support

String conditions accept full regex patterns for matching against free-text fields. Example: `/IBAN\s?[A-Z]{2}\d{2}/i` to detect IBAN patterns in output text, or `/high[\-_]?risk/i` to match risk classifications regardless of formatting.

Priority Ordering

Policies are evaluated in ascending priority order (lower number = higher priority). A `block` policy at priority 1 will always execute before a `flag_for_review` at priority 10. This guarantees deterministic, predictable enforcement regardless of the number of active policies.

Policy Templates

ADJUDON ships pre-built policy templates for common governance patterns: low-confidence blocking, PII detection escalation, agent-specific thresholds, and off-hours review routing. Templates are fully editable and serve as starting points — not black boxes.

Three response codes. Three outcomes.

The HTTP status code returned by the API is the enforcement decision. Your application logic reacts to the code — no polling, no callbacks, no ambiguity.

201

Approved

The trace passed all active policies. The decision is logged and approved for production. Your application proceeds normally.

202

Flagged for Review

The trace matched a `flag_for_review` policy. The decision is logged, and a review item is auto-created in the human review queue. Your application should hold the decision pending human resolution — or proceed with a fallback, depending on your architecture.

403

Blocked

The trace matched a `block` policy. The decision is rejected. Your application must not execute the proposed action. The full trace is still logged for audit purposes — including the reason for the block and the policy that triggered it.

Alerts fire in parallel — not after the fact.

When a policy triggers a notify action — or when any block or flag_for_review fires — the Alert Engine dispatches notifications in parallel with the API response. Alerts are delivered to Slack channels, email addresses, or arbitrary webhook endpoints. Delivery latency is under 2 seconds. Alert rules are configurable per policy, per agent, and per workspace. Your ops team knows about blocked decisions before your application finishes processing the response.

Policy as code

Policies are defined as structured objects — configurable via the dashboard or the API. Below is a representative example.

{
  "name": "Block low-confidence payment decisions",
  "priority": 1,
  "enabled": true,
  "conditions": [
    { "field": "confidenceScore", "operator": "<", "value": 0.70 },
    { "field": "agentId", "operator": "equals", "value": "payment_agent_v3" }
  ],
  "action": "block",
  "alert": {
    "enabled": true,
    "channels": ["slack:#ai-ops", "webhook:https://internal.example.com/alerts"]
  }
}

Write your first policy in minutes.

The Policy Engine evaluates in under 10ms. No cold starts. No batch jobs. No ambiguity.