Skip to main content

Policy Engine

The Policy Engine evaluates declarative policies on governed wallet routes and named provider capability invocations. Those paths use default deny when no applicable policy allows the request. Policy coverage is route-specific.

Design Principles

  • Default deny — new agents can’t do anything until policies are assigned
  • Declarative — JSON-based policy definitions, no custom DSL to learn
  • Composable — multiple policies evaluated in order; ALL must pass
  • Cache-aware: policy context can be cached in Redis

Policy Types

Spending Limit

Controls how much value an agent can transact:
Values are in wei (for EVM) or lamports (for Solana). The engine tracks cumulative spend per agent over rolling time windows.

Approved Addresses

Whitelist of addresses an agent can interact with:
Approved addresses work as a whitelist. If enabled, only transactions to listed addresses are allowed. Disable this policy to allow transactions to any address.

Auto-Approve Threshold

Transactions below this value are auto-approved; above requires manual approval:
When a transaction exceeds the threshold but passes other policies, it enters the approval queue. A tenant admin must explicitly approve or reject it.

Rate Limit

Controls how many transactions an agent can submit:

Time Window

Restricts when an agent can transact:

Allowed Chains

Restricts which blockchain networks an agent can use:

Evaluation Flow

Value Units

Policy values are evaluated in the units accepted by the API for the action being checked. EVM transaction limits such as maxPerTransaction, maxPerDay, and maxValue are normally passed as integer wei strings. UI and operator docs may display human ETH/USD equivalents, but policy enforcement should be configured with exact integer values to avoid rounding surprises.

Policy Results

Every policy evaluation returns detailed results:
These results are stored with every transaction record and returned in API responses, making it easy to debug why a transaction was denied or queued.

Approval Queue

Transactions that pass all policies except auto-approve enter the approval queue:
Webhooks are dispatched for approval_required, tx_signed, tx_rejected, and tx_failed events. Configure your webhook URL via the Tenants API.