# Agent Buyer Identity Preflight | x402 Purchase Governance

> Agent Buyer Identity Preflight | x402 Purchase Governance is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Checks whether an AI agent's buyer role, budget, and risk profile are appropriate before it purchases an x402-gated API, dataset, or tool.

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/agent/spend-route-plan
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-buyer-identity-preflight-x402-purchase-governance-f5094a8f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QG4I36oEoPQaxQUUi_Aoq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-buyer-identity-preflight-x402-purchase-governance-f5094a8f
```

Example prompt: Before I spend up to $10 USDC to buy that x402 financial data API, run a preflight check on whether my agent is cleared to make that purchase — my risk tolerance is low.

## When to prefer this

Use this endpoint when an AI agent needs to make an x402-protocol purchase and you want a lightweight, pre-transaction governance check to ensure the buyer role, budget, and sensitivity align with policy — especially in autonomous agent workflows where human approval is not guaranteed before each spend event.

## Known failure modes

- Missing or malformed 'task' query parameter returns a validation error
- Budget parameter not matching numeric pattern causes schema rejection
- Invalid risk_tolerance enum value results in bad request
- Upstream policy service unavailable causes 5xx response
- Task description too short (under 3 chars) or too long (over 500 chars) triggers validation failure

## How this service works

Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.

## Output

Returns a JSON object containing the Base network identifier (eip155:8453), the product type, an assessment block with a numeric risk score, risk level (low/medium/high), and any policy flags, plus identity, activity, and provenance sub-objects describing the agent buyer context.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "task"
     ],
     "properties": {
      "task": {
       "type": "string",
       "maxLength": 500,
       "minLength": 3,
       "description": "Natural-language task the agent wants to complete."
      },
      "budget_usdc": {
       "type": "string",
       "pattern": "^[0-9]+(?:\\.[0-9]{1,6})?$",
       "description": "Maximum planned spend for the route."
      },
      "risk_tolerance": {
       "enum": [
        "low",
        "medium",
        "high"
       ],
       "type": "string",
       "description": "How much uncertainty the buyer can tolerate."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "agent-spend-route-plan",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-buyer-identity-preflight-x402-purchase-governance-f5094a8f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
