Skip to main content
Mainnet POST returns 503 x402_unavailable before challenge construction or settlement. This remains true even if a verifier address is configured. Do not fund an SCA or Gateway wallet to activate this endpoint.

GET /api/agent/brain

Public metadata lists the agent label, token ID, tool names/descriptions, protocol names and a configured $0.002 USDC via x402 price. The token ID can come from environment/default metadata. A listed capability or price is not proof that the downstream feature is configured or that an identity/payment succeeded.

POST on an explicitly supported testnet setup

The existing withGateway path gates POST at $0.002 USDC. An ordinary merchant API key is not an x402 payment proof. x402 requires an EOA payer, not a Circle SCA. Keep challenge/settlement behavior separate from the legacy protected-service demo. See x402 availability. Body fields: Client-supplied payer fields are ignored. Downstream tools use their configured server identity and each route’s ownership/policy checks; paying for reasoning does not authorize another tenant’s wallet. Memory reads are keyed by sessionId rather than an owner-scoped session identity. Do not treat this identifier as a private tenant isolation boundary or put confidential data into a shared identifier. The Groq loop allows four iterations normally and up to ten for certain procurement-related messages. It is not an atomic business transaction or a guarantee all advertised tools succeed.

Response and failure

Success returns success, response, toolsUsed, individual results, sessionId and configured agent metadata. Inspect every tool result and the corresponding receipts/records: a successful reasoning envelope is not settlement, job funding or deliverable acceptance proof. Missing message returns 400; missing Groq configuration 500; mapped upstream problems return non-success 429, 502 or 503 with retry guidance; unexpected failures return 500 BRAIN_INTERNAL. The gateway can settle before a handler/upstream failure. Do not promise automatic refunds or retry a money-moving tool merely because reasoning failed.