Query and authentication
GET /api/agent/status accepts scaAddress, tokenId and name query parameters.
scaAddressalone, starting with0xand with no token/name filter, selects a public case-insensitive exact-address lookup. It is not a public list.- Token ID, name, combined filters or no filter require the active verified merchant’s API key or supported merchant session. Search is scoped to that merchant’s agents.
nameis a case-insensitive substring;tokenIdis the ERC-8004 token ID, not Registry ID. This route does not accept a universal8004:{chainId}:{tokenId}reference.
401; no matching row returns 404; caught failures return 500.
Response and limits
Returnssuccess, agent (the first enriched match), agents and count. The agent object spreads the stored AgentRegistry row and adds recentPayments, totalPaid and paymentCount. Do not assume the public path strips all stored fields into a separate minimal shape.
There is no live balance read, on-chain identity refresh or reputation calculation in this handler. Stored status is not a guarantee the agent is funded or serviceable on the selected chain.
The payment query takes at most five recent rows whose senderEmail equals the SCA or contains the generic word agent. It is not a merchant-, network- or currency-scoped lifetime history:
paymentCountcounts those sampled rows, including non-successful rows.totalPaidsums SUCCESS amounts from that sample and rounds to six places.- Generic matching can include payments not attributable to this particular agent. Do not label the result an exact wallet balance, lifetime spend or earned reputation.

