# Agent Spend Controls – Approval Risk Gate & Wallet Limits

> Agent Spend Controls – Approval Risk Gate & Wallet Limits is a paid API for AI agents from wallet-portfolio-history-mcp.mtree.workers.dev, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-14).

Evaluates autonomous agent wallet spend requests against approval-risk gates, per-call/per-counterparty limits, burst signals, risky spender flags, and autopay policy using live allowance data and fresh wallet snapshots

## Facts

- Endpoint: POST https://wallet-portfolio-history-mcp.mtree.workers.dev/tools/agent_spend_controls
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-spend-controls-approval-risk-gate-wallet-limits-d6750c4c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wiGJJYah52Dfu4i0yFx2i

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-spend-controls-approval-risk-gate-wallet-limits-d6750c4c -d '<json body>'
```

Example prompt: Before my agent sends 50 USDC to 0xAbC123 on Base, run spend controls on wallet 0xMyWallet — check the per-call and per-counterparty limits, flag any burst signals or risky spender approvals, and tell me if the autopay policy allows this transaction.

## When to prefer this

Use this endpoint when an AI agent needs a holistic, gate-style spend control check before executing a wallet transaction — combining limit enforcement, burst detection, risky-spender flags, and autopay policy in a single call rather than assembling individual risk signals separately.

## Known failure modes

- Invalid or unrecognized wallet address returns an error or empty result
- Payment of 0.25 USDC on Base not received causes 402 rejection
- Wallet has no transaction history resulting in limited scoring signals
- Counterparty address not found in risk graph returns neutral/unknown rating
- D1 snapshot stale or unavailable causing degraded policy recommendation

## How this service works

Hosted agent spend controls for autonomous wallets: approval-risk gate, per-call and per-counterparty limits, wallet risk score, transaction-pattern burst signals, risky spender approvals, and autopay spend policy from fresh D1 wallet snapshots plus live allowance reads. Price 0.25 USDC on Base via x402. Demo: https://wallet-portfolio-history-mcp.mtree.workers.dev/demo/tools/agent_spend_controls. Contact: https://wallet-portfolio-history-mcp.mtree.workers.dev/contact.

## Output

Returns an approval/risk gate decision including per-call and per-counterparty limit status, wallet risk score (0-100), burst/anomaly signals, risky spender approval flags, and an autopay spend policy recommendation derived from fresh D1 wallet snapshots and live on-chain allowance reads.

## Example request

```json
{
 "input": {
  "body": {
   "chain": "base",
   "limit": 10,
   "address": "0x1234567890123456789012345678901234567890",
   "refresh": false
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon"
       ],
       "type": "string"
      },
      "limit": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1
      },
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "refresh": {
       "type": "boolean"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-spend-controls-approval-risk-gate-wallet-limits-d6750c4c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from wallet-portfolio-history-mcp.mtree.workers.dev](https://www.zero.xyz/host/wallet-portfolio-history-mcp.mtree.workers.dev/llms.txt)
