1 Your agent pays: ask the Gate first
Send the paying agent, the address it is about to pay and the amount in USD. You get back one of four answers with every reason, nine measured facts about the payee, how this payment compares with the agent's own history, and a signed receipt to keep beside the payment.
One callrun against the live API
curl -s https://agenticfinancegraph.com/api/gate/check \
-H "content-type: application/json" \
-d '{"agent":"57657","payee":"0x4cd00e387622c35bddb9b4c962c136462338bc31","amount_usd":25,"policy_name":"recommended-v3"}'What comes back (trimmed; a live answer of 2026-11-15 15:06 UTC)
{
"decision_id": "gd_ab46269943388b5ec1a3b96c",
"decision": "allow",
"reasons": [],
"agent": {
"token_id": "57657",
"level": 9
},
"payee": "0x4cd00e387622c35bddb9b4c962c136462338bc31",
"amount_usd": 25,
"policy": {
"name": "recommended-v3",
"hash": "fdca84e4e0e0b216"
},
"receipt": {
"canonical": "{\"agent\":{\"chain\":\"eip155:8453\",\"t…",
"sha256": "3332092eebaa44fc8bad744337eb633f28…",
"signature": "oUR7FcRUc64M6eJQTObnBtjU+JDh48h7dt…",
"key_id": "afg-pass-2026-10",
"logged": false,
"note": "Signed. Receipts are written into …"
}
}allow
Nothing fired under your policy. Pay.
log
Something your policy records fired. Pay, and keep the reasons.
warn
Something worth a second look. Pay only under your own limit, or ask a person.
block
A cap of your policy or a refuse condition fired. The reasons say which. The decision to stop is still yours.
The policy is yours. Name one of ours (log-only, the default, balanced, recommended-v3, strict) or send your own with caps, a budget, allowed payees and what to do on each condition. They are listed in full at /api/gate/policies. A constraint we do not know blocks before any rule runs, so a typo cannot silently allow.
In your coderun against the live API
// Before your agent pays: ask, keep the receipt, decide. Node 18+ or any browser, no dependencies.
async function checkBeforePaying({ agent, payee, amountUsd, policy = "recommended-v3" }) {
const r = await fetch("https://agenticfinancegraph.com/api/gate/check", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ agent, payee, amount_usd: amountUsd, policy_name: policy }),
signal: AbortSignal.timeout(8000),
});
if (!r.ok) return { decision: "unavailable", status: r.status }; // your fail mode decides; nothing is substituted
const j = await r.json();
return { decision: j.decision, reasons: j.reasons, receipt: j.receipt, id: j.decision_id };
}
const c = await checkBeforePaying({ agent: "57657", payee: "0x4cd00e387622c35bddb9b4c962c136462338bc31", amountUsd: 25 });
if (c.decision === "block") throw new Error("payment stopped: " + c.reasons.join(", "));
console.log({ decision: c.decision, reasons: c.reasons, receipt_id: c.id }); // store c.receipt beside the paymentIf you use an x402 client, the hook below asks the Gate after your own spend controls and before anything is signed. Install it from npm: npm install agentic-finance-graph.
x402 client hookshown as documented
// An x402 client (@x402/core 2.x): the Gate is asked after your own spend controls and before the scheme signs.
import { makeGateHook } from "agentic-finance-graph/bin/x402-gate-hook.mjs";
client.onBeforePaymentCreation(makeGateHook({
agent: "57657", // your agent: token id, slug or bound wallet
policy_name: "recommended-v3",
abortOn: ["block"], // which decisions stop the payment
onUnavailable: "warn", // "abort" fails closed, "allow" fails open
log: (d) => audit.write(d), // one object per decision, with the signed receipt
}));Keep the receipt. It carries the agent, the payee, the amount, the policy and its hash, the decision, the reasons and the time, signed with our Ed25519 key. Read one back at /api/gate/receipt?id=<decision_id>. Checks made with a Desk session also go into our signed log, which a daily Base transaction commits to.
2 You are being paid: check the payer
A seller or a platform can ask what the ledger holds about the wallet on the other side: the registrations bound to it, and for the highest-level one its level, last payment, open incidents, the Pass, the Watch reading and detections of the last 30 days. What is worth a look comes first, each item with its source.
In your handlerrun against the live API
// When you are the one being paid: what the ledger holds about the wallet on the other side.
const seen = new Map(); // wallet -> { at, answer }; an answer is good for ten minutes
async function payerCheck(wallet) {
const w = wallet.toLowerCase();
const hit = seen.get(w);
if (hit && Date.now() - hit.at < 600_000) return hit.answer;
const r = await fetch("https://agenticfinancegraph.com/api/payer?wallet=" + w, { signal: AbortSignal.timeout(6000) });
if (!r.ok) return null; // not reachable or over the limit: serve as you would without us
const answer = await r.json();
seen.set(w, { at: Date.now(), answer });
return answer;
}
// in your handler, once the payment is verified and you know who paid:
const p = await payerCheck("0x024beeed33d76cce272c0db022134cda921f4aa6");
if (p && p.worth_a_look.length) console.warn("payer worth a look:", p.worth_a_look);
console.log({ registered: p.registered_agent, level: p.agent && p.agent.level, worth_a_look: p.worth_a_look.length });A wallet with no registration answers registered_agent: false. That is not a statement about the wallet: most wallets are not registered agents, and an agent can pay from a wallet it never bound.
3 You run many agents: one call for the fleet
Level, Pass, Watch reading, incidents, approvals, detections and blast radius for up to 60 agents in one answer, the ones worth a look first. Each row equals that agent's own self-check.
Fleet checkrun against the live API
# up to 60 agents in one answer, the ones worth a look first
curl -s "https://agenticfinancegraph.com/api/fleet?agents=57657,45978,99924"
# or every registration one wallet holds
curl -s "https://agenticfinancegraph.com/api/fleet?owner=0x<the wallet that holds your agents>"For a standing watch instead of a call, put the agents on a Desk watch-list (one agent free, 20 and 60 on the paid plans, see pricing) and plant canaries: decoy addresses and URLs that fire if someone else is steering an agent.
4 You have to show the books: a statement anyone can verify
Agent Books is what one agent paid and received on Base in a closed month or to date. We sign it, write its hash into our signed log, and a daily Base transaction commits to that log. Whoever receives the statement can check it without asking us, as below. It is a record of observed facts: not an audit, not an opinion, and nothing about tax or about who owns the agent.
Verify a statementrun against the live API
// Check an Agent Books statement without trusting us: the hash, then our signature. Node 18+, no dependencies.
import { createHash, createPublicKey, verify } from "node:crypto";
const SITE = "https://agenticfinancegraph.com";
const s = await (await fetch(SITE + "/api/books?agent=57657&period=2026-10")).json();
const keys = await (await fetch(SITE + "/.well-known/afg-pass-keys.json")).json();
const key = keys.keys.find((k) => k.key_id === s.key_id);
const bytes = Buffer.from(s.canonical, "utf8"); // the exact text that was signed
const hashOk = createHash("sha256").update(bytes).digest("hex") === s.sha256;
const spki = Buffer.concat([Buffer.from("302a300506032b6570032100", "hex"), Buffer.from(key.public_key_hex, "hex")]);
const sigOk = verify(null, bytes, createPublicKey({ key: spki, format: "der", type: "spki" }), Buffer.from(s.signature, "base64"));
const books = JSON.parse(s.canonical); // read the figures from the signed text, not from beside it
console.log({ hash_ok: hashOk, signature_ok: sigOk, period: books.period, in_signed_log: s.log.logged });5 Your agent has to show who it is: a signed Pass
The Agent Pass is eight checks on one agent at one moment, valid three hours: what held, what failed and what could not be checked. It comes as JSON, as a JWT, or as a W3C Verifiable Credential (format=vc), so the other side can verify it with a standard library and our public key. It says holds or does not hold. It never says safe.
Verify a Passrun against the live API
// The Agent Pass as a JWT: verify it with our public key (JWKS), then read what held. Node 18+, no dependencies.
import { createPublicKey, verify } from "node:crypto";
const SITE = "https://agenticfinancegraph.com";
const jwt = (await (await fetch(SITE + "/api/pass?agent=57657&format=jwt")).text()).trim();
const [h, p, sig] = jwt.split(".");
const header = JSON.parse(Buffer.from(h, "base64url"));
const jwks = await (await fetch(SITE + "/.well-known/jwks.json")).json();
const jwk = jwks.keys.find((k) => k.kid === header.kid);
const ok = verify(null, Buffer.from(h + "." + p), createPublicKey({ key: jwk, format: "jwk" }), Buffer.from(sig, "base64url"));
const claims = JSON.parse(Buffer.from(p, "base64url"));
console.log({ signature_ok: ok, expires: new Date(claims.exp * 1000).toISOString(), still_valid: claims.exp * 1000 > Date.now() });6 Your agent speaks MCP or A2A
Everything above is also a tool on our MCP server (29 read-only tools, no key: gate_check, payer_check, fleet_check, agent_books, agent_pass, self_check and the rest), and an agent can simply write to us over A2A in plain words. The answer starts with what we read the message as.
MCPshown as documented
# Claude Code
claude mcp add --transport http afg https://agenticfinancegraph.com/mcp
# any MCP client: a remote server, streamable HTTP, no key
https://agenticfinancegraph.com/mcpA2Arun against the live API
curl -s https://agenticfinancegraph.com/api/a2a \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"message/send","params":{"message":{"role":"user","messageId":"m1","parts":[{"kind":"text","text":"payer check 0x024beeed33d76cce272c0db022134cda921f4aa6"}]}}}'Setup for Claude, ChatGPT, Cursor and others: the MCP page. The agent card: /.well-known/agent-card.json. Every route with its parameters: /openapi.json.
Limits and answer times
Answer times were measured from outside on 13 November 2026 at 12:38 UTC (the lookup and the file on 15 November at 13:53 UTC, the series and the state at 15:01 UTC). The limits are per calling address and are the free tier; an IPv6 caller is counted by its /64. Since 15 November 2026 they hold through MCP and A2A as well: a tool call counts against the same limit as its plain route. Callers that reach us through one shared address, a hosted MCP hub for example, share one count. An answer over the limit is HTTP 429 with Retry-After (through MCP and A2A, an error that names the limit), and nothing is run or recorded.
| Call | Free limit | Answer time | How long an answer is good for |
|---|---|---|---|
POST /api/gate/check | 30 a minute | 0.5 s median, 1.3 s at the 95th percentile (20 checks) | One payment. Ask again for the next. |
GET /api/gate/facts | 30 a minute, shared with the check | 0.5 s median (8 calls) | Ten minutes |
GET /api/payer | 30 a minute | 0.4 s median (10 calls) | Ten minutes |
GET /api/fleet | 6 a minute, 60 agents a call | 0.4 s for five agents (5 calls) | Ten minutes |
GET /api/self-check | 30 a minute | 0.2 s median (10 calls) | Ten minutes |
GET /api/books | By agent and period: 10 a minute and 40 a day. By a stored statement's id: no limit. 200 new statements are logged a day in all; after that the figures come unsigned until 00:00 UTC | 0.1 s median (10 calls) | A closed month does not change |
GET /api/pass | No limit set today | 0.1 s median (10 calls) | Until it expires, three hours |
GET /api/agents?q= (one agent) | 60 a minute | 0.15 s median (10 calls) | A day: about one ranked agent in 25 had its level set in the last 24 hours (15 November 2026) |
GET /api/address-facts?format=file | 6 a minute | 0.55 s median for 9.7 MB, 1.3 MB on the wire (5 calls) | Six hours; ?head=1 says whether the file has changed |
GET /api/series | 120 a minute | 0.2 s median for 90 days of every metric, 1.3 MB (5 calls) | Five minutes for the newest points; a closed day does not change |
GET /api/state | 240 a minute | 0.15 s median, 150 KB (5 calls) | A minute; each figure carries its own time |
/api/canary (canaries; needs a signed-in Desk session) | 30 a minute | Not measured from outside | |
| MCP and A2A, every tool | 120 tool calls a minute in all, and each tool's own limit above | As the plain route | As the plain route |
| Everything on the site, pages and files included | 900 requests a minute |
When we cannot answer
You get HTTP 503 and nothing is substituted. Decide your fail mode in advance. We suggest: go on below the amount you could lose without minding, stop above it.
Other answers
400: a parameter is missing, the body says which. 404: an agent we do not know. 422: an agent with more than 20,000 counted payments, which the Gate does not score at request time.
From a browser
Every route answers any origin, the Gate's POST included, so a dashboard or a wallet can call it directly.
What these checks are not
- Not a verdict. Each answer is measured facts with their sources and times. A clean answer means nothing in our data fired at those times, not that a payment is safe.
- Not a block. The Gate is advisory. We record what we answered; what happens next is your code's decision.
- Not every chain. The checks read Base: ERC-8004 registrations on Base and stablecoin payments there.
- Not an identity. We work with registration numbers and addresses. We do not say who holds a key.
Each figure and field has a definition that says what it means and what it does not: /def. Corrections are dated and public: the changelog.
More than the free limits, or something that is missing
If you need more calls a minute, a whole fleet on a standing watch, the data as a feed, or a check we do not have yet, tell us what you are building.