Agent Spend Assurance
$0.25/callPer-analysisOne signed preflight for an autonomous x402 payment: WalletGuard counterparty screening, Payment Policy challenge validation, and structured evidence verification.
POST /api/agent-services/spend-assurance/runAnswer-engine brief
Canonical answer for Agent Spend Assurance
- Direct answer
- Agent Spend Assurance is a deterministic x402 API for AI agents. One signed preflight for an autonomous x402 payment: WalletGuard counterparty screening, Payment Policy challenge validation, and structured evidence verification.
- When to use
- Use it when an agent needs a repeatable computed result with evidence instead of asking an LLM to improvise a number or risk decision.
- Inputs
- runId, wallet, payment
- Outputs
- status, service, decision, allowed, wallet
- Pricing
- $0.25 per call, paid over x402 in USDC on Base. No API key is required.
- Citation target
- https://hermesplant.com/agent-services/spend-assurance
What it does
One signed preflight for an autonomous x402 payment: WalletGuard counterparty screening, Payment Policy challenge validation, and structured evidence verification. Returns allow, deny, or needs_review plus the component findings and a tamper-evident service receipt. Caller-provided wallet context only; no external chain-intelligence feed.
- agent-spend
- ai-agents
- wallet-screening
- payment-policy
Example request
POST /api/agent-services/spend-assurance/run
{
"runId": "run-42",
"wallet": {
"wallet": "0x9999999999999999999999999999999999999999",
"labels": [
"exchange:verified"
]
},
"payment": {
"resourceUrl": "https://api.example.com/data",
"method": "POST",
"scheme": "exact",
"network": "eip155:8453",
"amountUnits": "100000",
"payTo": "0x1111111111111111111111111111111111111111",
"buyerPolicy": {
"maxUsdPerCall": 1
}
}
}Example response (HTTP 200)
Deterministic — the same inputs always return the same audited output.
{
"status": "assessed",
"service": "spend-assurance",
"decision": "allow",
"allowed": true,
"wallet": {
"riskScore": 0,
"riskLevel": "low",
"recommendedAction": "proceed_with_standard_controls"
},
"payment": {
"decision": "allow",
"allowed": true,
"recommendedAction": "sign_and_retry_payment"
},
"evidence": {
"decision": "verified",
"verified": true
},
"recommendedAction": "sign_and_retry_payment",
"receipt": {
"algorithm": "HMAC-SHA-256",
"verifyUrl": "https://hermesplant.com/api/agent-services/assurance/verify"
}
}Input schema
Top-level request fields. Nested shapes are shown in the example above and the OpenAPI spec.
| Field | Type | Required | Description |
|---|---|---|---|
| runId | string | — | Optional caller run identifier. |
| wallet | object | Yes | WalletGuard context: wallet plus optional labels, sanctionsHits, exposures, transfers, and fundingSources. |
| payment | object | Yes | Payment Policy input: resource, x402 challenge fields, buyer policy, and optional replay context. |
How to call it over x402
- 1. Send the request. The first unpaid call returns HTTP 402 with an x402 payment challenge — $0.25, USDC on Base, and the recipient.
- 2. Pay per call. Your x402 client signs the USDC payment and retries automatically — no API key, no account, no subscription. New to x402?
- 3. Read the result. HTTP 200 returns the computed values plus evidence-backed findings.
With the x402 fetch client (Node / TypeScript)
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.AGENT_WALLET_KEY);
const pay = wrapFetchWithPayment(fetch, account); // USDC on Base
const res = await pay("https://hermesplant.com/api/agent-services/spend-assurance/run", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"runId": "run-42",
"wallet": {
"wallet": "0x9999999999999999999999999999999999999999",
"labels": [
"exchange:verified"
]
},
"payment": {
"resourceUrl": "https://api.example.com/data",
"method": "POST",
"scheme": "exact",
"network": "eip155:8453",
"amountUnits": "100000",
"payTo": "0x1111111111111111111111111111111111111111",
"buyerPolicy": {
"maxUsdPerCall": 1
}
}
}),
});
const result = await res.json();Inspect the 402 with curl
curl -i -X POST https://hermesplant.com/api/agent-services/spend-assurance/run \
-H "content-type: application/json" \
-d '{"runId":"run-42","wallet":{"wallet":"0x9999999999999999999999999999999999999999","labels":["exchange:verified"]},"payment":{"resourceUrl":"https://api.example.com/data","method":"POST","scheme":"exact","network":"eip155:8453","amountUnits":"100000","payTo":"0x1111111111111111111111111111111111111111","buyerPolicy":{"maxUsdPerCall":1}}}'
# → HTTP/1.1 402 Payment Required (x402 challenge: price, USDC asset, Base network, recipient)
# → sign the USDC-on-Base payment and retry to receive HTTP 200Prefer no wallet? Get a free API key (250 calls/mo) and send it as X-API-Key instead of signing an x402 payment — the same call, no crypto, ideal for looping over many records.
Prefer zero code? This endpoint is also exposed as a tool on the Hermes Plant MCP server, so an MCP-capable agent can call it with its own x402 wallet.
Other agent services
A one-cent safety gate for every consequential agent action.
Score, triage, receipt, and status in one agent-safety workflow.
Separate candidate demand from owner-funded and duplicate x402 activity.
A signed, verifiable receipt for every action your agent takes.
Decide whether an agent should pay before it signs.
Verify the evidence bundle before trusting a paid agent result.
Score an MCP server before your agent installs it.
Catch destructive agent commands before they run.
Route risky agent actions to human approval.
Validate & normalize every contact record your agent touches.
Per-wallet AML screening inside your agent's loop.
NPV, IRR, XIRR & DCF valuation in a single call.
LP/GP distribution waterfalls, solved exactly.
Black-Scholes option pricing with the full Greeks.
Yield, duration, convexity & loan amortization.
Portfolio risk scored straight from holdings.
Full deal underwriting — DCF, returns, sensitivity & waterfall in one call.
CashflowLens return and DCF analytics plus PortfolioGuard concentration and risk scoring in one paid call, with structured internal evidence and a tamper-evident signed receipt.
Need a calculator that isn’t here yet? contact@hermesplant.com