Skip to content
Thenar

Agents

An agent can take one task's corpus without a subscription. It asks for the file, is answered 402, and pays 0.01 USDC on Monad in the request that fetches it, final in the block it lands in. No account, no API key and no subscription: the payment is the permission.

The terms, as the 402 states them
Endpoint
GET /api/agent/corpus?taskId=N
Price
0.01 USDC per task corpus, x402 exact scheme
Settles
On eip155:10143, through the Monad facilitator, which submits the agent's signed USDC authorisation and pays the gas. Only after the file is ready: a task with nothing recorded answers 404 and charges nothing.
Paid to
reading…
Sales log
reading…
What has this agent bought?
What agents have taken

Reading the ledger…

Run the buyer

The agent in the repository signs a USDC authorisation for x402 to settle on Monad. Then it hashes what it received and asks SalesLog on Monad whether those exact bytes were logged as sold.

node --import ./test/register.mjs scripts/agent-buy.mjs http://localhost:3222 1