ABS Core
Features

Policy Engine

Dynamic Governance & Rule Enforcement

Policy Engine

The ABS Policy Engine is the core decision-making component of the ABS Kernel. It evaluates every agent action against a set of active policies to determine whether to ALLOW, DENY, or ESCALATE the operation.

Architecture

The engine operates on a Fail-Close principle: if a policy cannot be evaluated or an error occurs, the default action is to block.

Decision Flow

  1. Event Ingestion: The engine receives an EventEnvelope containing the agent's intent, payload, and metadata (see Decision Envelope).
  2. Sanitization: Input safeguards remove PII and check for prompt injection.
  3. Policy Evaluation: The active policy for the event type is executed.
  4. Risk Scoring: A risk score (0-100) is calculated based on:
    • Static Rules: Regex matches, keyword blocks.
    • Contextual Analysis: Velocity checks, anomaly detection.
    • Sequence Analysis: Recognition of dangerous workflows.
    • Trust Score: Historical reputation of the agent.
  5. Verdict:
    • ALLOW: Risk score < 30.
    • ESCALATE: Risk score 30-79 (requires human approval).
    • DENY: Risk score >= 80 or explicit block.
  6. Immutable Log: The decision is signed and recorded in the Write-Ahead Log (WAL).

1. Policy Structure

All policies are defined in YAML and follow the ABS Schema 2.1.

apiVersion: abs/v2
kind: Policy
metadata:
  name: financial-safeguards
  version: 1.0.0
spec:
  target:
    agents: ["*"]
    tools: ["stripe_api", "bank_transfer"]
  
  rules:
    - id: "limit-high-value"
      description: "Block transfers over $10k without approval"
      condition:
        type: "json_path"
        path: "$.arguments.amount"
        operator: "gt"
        value: 10000
      action: "ESCALATE"
      
    - id: "block-offshore"
      description: "Prevent transfers to non-approved jurisdictions"
      condition:
        type: "regex"
        path: "$.arguments.destination_country"
        pattern: "^(KY|VG|PA)$" # Cayman, BVI, Panama
      action: "DENY"

2. Policy Actions

ActionBehaviorHTTP Response
ALLOWRequest proceeds to LLM/Tool.200 OK
DENYRequest is blocked immediately.403 Forbidden
ESCALATEPauses execution. Sends webhook to admin.202 Accepted
REDACTModifies payload (PII stripping) and proceeds.200 OK (Modified)

3. Dynamic Context (Redis)

Policies can reference dynamic state using the ${ctx.*} syntax:

- id: "velocity-check"
  condition:
    type: "rate_limit"
    key: "${ctx.agent_id}"
    limit: 10
    window: "1m"
  action: "DENY"

On this page