Agent Spend Policy ASPL v0.1 · open spec · draft

ASPL is an open format describing what an AI agent is allowed to pay for: budgets, merchant allowlists, approval thresholds, key sources and audit events. One policy file governs any agent on any rail. The format is deliberately boring — it is meant to be read by policy engines, not admired.

MIT Feedback welcome. Reference engine and adapters ship under the same license.

1. Design principles

2. Policy file

A policy is a single YAML document, versioned and signed. Evaluation order: identity → budget → allowlist → threshold → approval.

apiVersion: aspl/v0.1
kind: SpendPolicy
metadata:
  name: research-team-q1
  org: acme-labs
  validFrom: "2026-12-01T00:00:00Z"
  validUntil: "2027-03-01T00:00:00Z"

subjects:                      # who is governed — registered agent identities
  - agent: agent:acme:scraper-01
    pubkey: ed25519:9F86D081...
    owner: team/research
  - agent: agent:acme:browse-02
    pubkey: ed25519:2C26B36B...
    owner: team/research

budgets:
  - scope: team/research       # per-team monthly budget
    currency: USD
    monthly: 250.00
    alertAt: 0.8               # notify finance at 80% burn
  - scope: agent:acme:scraper-01
    currency: USD
    monthly: 80.00

allowlists:
  - scope: agent:acme:scraper-01
    merchants:
      trustRank: {min: 0.6}    # import merchants above Trust Rank tier
      pinned:
        - domain: onesource.io
        - resource: https://api.example.com/x402/weather
    rails: [x402, mcp]         # which rails this agent may use

thresholds:
  autoApproveBelow: 0.50       # USD per transaction
  requireApprovalAbove: 2.00
  approvers:
    - role: team-lead
    - role: finance-oncall

keys:                          # co-signing key sources — BYO, never ours
  policyChange: {source: webauthn, requireStepUp: true}
  paymentSign:   {source: kms, keyRef: aws:kms:alias/acme-agent-gate}
  # alternatives: hsm (PKCS#11), raw-key (dev only)

audit:
  chain: hashlinked            # each event links the previous hash
  export:
    - format: jsonl
      destination: s3://acme-audit/agent-spend/
  retention: 7y

3. Governance tiers

TierMeaningVerification
NATIVESpeaks ASPL natively (SDK / spec)Identity registered; full policy surface
CONFORMANTSpeaks open protocols: AP2 mandates, MCP, x402Gateway reads standard messages; per-transaction evaluation. No vendor certification.
UNGOVERNABLEClosed agents outside enterprise controlsNot interceptable. Reconciliation reports surface unmapped spend as a gap.

Vendors may self-declare conformance via the checklist in §6. Gate does not certify, rank or resell third-party agents.

4. Merchant risk tiers

Risk fields carry an explicit data-source label. Engines must not present heuristic scores as settlement-derived.

risk:
  - source: settlement-behaviour   # PayCensus Trust Rank — real volume, buyer
    rails: [x402, tempo, solana]   # diversity, ticket sanity, identity (live)
  - source: static-heuristics      # domain age, TLS age, public pricing page
    rails: [card, bank]            # computed at evaluation time
  - source: customer-history       # your own disputes and returns, in your
    rails: [all]                   # gateway instance — never shared

5. Audit event schema

Every evaluated payment emits one event. Events are hash-linked; a broken chain is itself an alarm.

{"v":"aspl/v0.1","type":"payment.evaluated","ts":"2026-11-20T04:24:54Z",
 "agent":"agent:acme:scraper-01","intent":{"resource":"https://api.../weather",
 "amount":"1000","currency":"USDC","rail":"x402"},
 "decision":{"allow":true,"reason":"allowlist:trust-rank>=0.6; budget ok",
 "coSignature":{"source":"kms","keyRef":"aws:kms:alias/acme-agent-gate"}},
 "prevHash":"0x9af3...","hash":"0x1c8e..."}

Event types (v0.1): policy.loaded · payment.evaluated · payment.approved · payment.rejected · payment.settled · budget.threshold · chain.verified

6. Governance-readiness checklist

Third-party agent vendors may self-declare conformance. Gate neither certifies nor rates agents — enterprises verify claims themselves.

8. Multi-user & roles · planned v0.2

An enterprise gateway is operated by several people with different duties. The minimal role model:

RolePermissions
adminwrite policies, register agent identities, manage users
approverapprove / reject pending intents above the auto-approve threshold
operatorregister agents, view dashboards and reports
auditorread-only: audit chain, reports, policy history

Requirements: approvals are authenticated (anonymous approvals are invalid); policy changes require admin plus the configured key source (§7); human users and agent identities are separate namespaces — the audit chain records both; implementations map roles onto the enterprise's existing IdP (OIDC / SAML) instead of inventing a user system, and MUST NOT store passwords when an IdP is configured.

9. Status

v0.1 is a draft implemented by the Gate reference engine and exercised in production dogfood (live audit trail). Breaking changes will be versioned, never silently changed. Comments and field proposals welcome.