# Agent Budget Guard - Record Transaction

> Agent Budget Guard - Record Transaction is a paid API for AI agents from agent-budget-guard.onrender.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Records a payment transaction for an AI agent and returns cumulative daily/monthly spend totals plus a next-action recommendation.

## Facts

- Endpoint: POST https://agent-budget-guard.onrender.com/api/budget/record
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-budget-guard-record-transaction-c6035c35
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l6-0iRAdXKEZk6wxfvVeS

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-budget-guard-record-transaction-c6035c35 -d '<json body>'
```

Example prompt: Record a $0.01 USDC payment that agent 'agent-007' just made to https://some-api.example.com for a 'data-lookup' action, with a daily limit of $1.00 USDC, and tell me the total spent today and this month.

## When to prefer this

Use this endpoint after each pay-per-request API call to maintain a running audit log of agent spending. Ideal when your agent operates on USDC/Base via x402 and needs cumulative daily/monthly totals for governance, budget enforcement, or JPY/JPYC compliance reporting. Prefer this over generic logging when you also want AI-driven next-action recommendations.

## Known failure modes

- Missing required fields (agent_id, amount, api_url) returns 422 validation error
- Invalid currency value returns 400 bad request
- Service unavailable on Render cold start returns 503 or timeout
- Malformed USDC amount string causes parsing failure
- Daily limit field ignored if not provided, no enforcement error returned

## How this service works

Pay-per-request governance APIs for AI agents using x402. Check budgets, log payments, classify invoices, and generate audit-ready spending records. Built for autonomous agents, USDC/Base payments, and JPY/JPYC reporting workflows.

## Output

Returns a boolean confirming the transaction was recorded, the agent's running total spend for today and this month in USDC, and a recommended next API call with name, URL, rationale, expected improvement, and price in USDC.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "amount": {
   "type": "string",
   "description": "Requested payment amount in USDC"
  },
  "api_url": {
   "type": "string",
   "description": "Target API URL"
  },
  "agent_id": {
   "type": "string",
   "description": "AI agent identifier"
  },
  "currency": {
   "type": "string",
   "description": "Currency: USD, USDC, JPYC, JPY"
  },
  "target_api": {
   "type": "string",
   "description": "Target API URL (alias for api_url)"
  },
  "action_type": {
   "type": "string",
   "description": "Action type"
  },
  "daily_limit": {
   "type": "string",
   "description": "Daily spend limit in USDC"
  },
  "requested_amount": {
   "type": "string",
   "description": "Requested payment amount (alias for amount)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "RecordTransactionResponse",
 "required": [
  "recorded",
  "total_today",
  "total_this_month",
  "next_recommended"
 ],
 "properties": {
  "recorded": {
   "type": "boolean",
   "title": "Recorded"
  },
  "total_today": {
   "type": "number",
   "title": "Total Today"
  },
  "next_recommended": {
   "type": "object",
   "title": "NextRecommendation",
   "required": [
    "api_name",
    "url",
    "reason",
    "expected_improvement",
    "price_usdc"
   ],
   "properties": {
    "url": {
     "type": "string",
     "title": "Url"
    },
    "reason": {
     "type": "string",
     "title": "Reason"
    },
    "api_name": {
     "type": "string",
     "title": "Api Name"
    },
    "price_usdc": {
     "type": "number",
     "title": "Price Usdc"
    },
    "expected_improvement": {
     "type": "string",
     "title": "Expected Improvement"
    }
   }
  },
  "total_this_month": {
   "type": "number",
   "title": "Total This Month"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-budget-guard-record-transaction-c6035c35/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-budget-guard.onrender.com](https://www.zero.xyz/host/agent-budget-guard.onrender.com/llms.txt)
