Tragent™
Tragent for agents and developers
Research, decisions and a wallet, for any agent
Software can use Tragent two ways, with no sign-up and no person behind it. Ask one question and pay per answer. Or buy your agent an account of its own: its own Tragent to research, decide and trade with, and its own wallet on Base. Pay over plain HTTP, in USDC on Base with the open x402 protocol, or by card through a Link wallet with the Machine Payments Protocol.
| Pay per answer | An account of its own | |
|---|---|---|
| Use it as | Research: an answer about prices, on-chain activity and markets | Research, decisions and trades, with its own wallet |
| Price | 0.25 USD an answer in USDC, or 0.50 USD an answer by card | 20.00 USD for 30 days, and 1,000 credits with each purchase |
| Keys | None: each call is paid | An API key, issued to requests your own key signs |
| Acts on its own | No: it answers, and never trades | Yes: it trades on Base within the account's rules, and sends only to the one address you fix |
Pay per answer
Tragent answers one question about token prices or on-chain activity with live data. There is no account, key or sign-up: your agent pays for each answer.
The request
POST https://tragent.fyi/api/v1/x402/ask pay in USDC
POST https://tragent.fyi/api/v1/mpp/ask pay by card
Content-Type: application/json
{"question": "What is ETH trading at, and what does on-chain activity show today?"}
One question of 1 to 2,000 characters, in plain words. Put the coin, contract address, wallet address or time frame in the question itself. The body and the answer are the same on both addresses; only the way of paying differs.
Two ways to pay
| USDC on Base | Card, through Link | |
|---|---|---|
| Address | /api/v1/x402/ask | /api/v1/mpp/ask |
| Price | 0.25 USD an answer | 0.50 USD an answer by card (cards have a 0.50 USD minimum) |
| Protocol | x402 version 2, scheme exact | Machine Payments Protocol, method stripe, intent charge |
| You need | A wallet with USDC on Base and an x402 client | A Link account and link-cli, or another client that can get a payment token from a wallet |
| When you are charged | When the answer is ready | The amount is held on the card when you pay, and charged when the answer is ready. A payment that cannot be held first is charged when you pay |
Paying in USDC (x402)
| Paid in | USDC on Base (eip155:8453, token 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) |
|---|---|
| Network fee | None for you: the payment is a signed authorization that a facilitator submits |
- Send the request with no payment. The reply is
402 Payment Requiredwith aPAYMENT-REQUIREDheader: base64 JSON holding the exact amount, the token and the address to pay. - Sign that payment. It is one
TransferWithAuthorization(EIP-3009) for exactly the amount, valid for the number of seconds the requirement gives inmaxTimeoutSeconds. - Send the same request again with the signed payment, base64 JSON, in a
PAYMENT-SIGNATUREheader. - The answer comes back as
200with aPAYMENT-RESPONSEheader naming the transaction.
Any x402 version 2 client does all four steps for you. With the official TypeScript client:
import { x402Client, wrapFetchWithPayment } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm/exact/client';
import { privateKeyToAccount } from 'viem/accounts';
const client = new x402Client();
client.register('eip155:*', new ExactEvmScheme(privateKeyToAccount(process.env.WALLET_KEY), { rpcUrl: 'https://mainnet.base.org' }));
const pay = wrapFetchWithPayment(fetch, client);
const res = await pay('https://tragent.fyi/api/v1/x402/ask', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ question: 'Who are the largest holders of USDC on Base right now?' }),
});
console.log((await res.json()).answer);
Paying by card (Link)
- Send the request to
/api/v1/mpp/askwith no payment. The reply is402 Payment Requiredwith aWWW-Authenticate: Paymentheader: the challenge. It names the amount in cents, the currency, Tragent as the seller, and when it runs out (five minutes). - Your wallet grants a one-time payment token for that amount to that seller.
- Send the same request again with an
Authorization: Paymentheader: the challenge echoed back, with the token. - The answer comes back as
200with aPayment-Receiptheader naming the payment.
link-cli does all four steps, and asks you to approve the purchase in Link:
npm install -g @stripe/link-cli
link-cli auth login --client-name "My agent"
link-cli mpp pay https://tragent.fyi/api/v1/mpp/ask -X POST \
-d '{"question": "What is ETH trading at, and what does on-chain activity show today?"}' \
--context "Buy one researched answer from the Tragent API about the current ETH price and on-chain activity, to use in my own market analysis today."
--context tells Link what the purchase is for and must be at least 100 characters. A payment token is good for one purchase. If a run ends without an answer (a time-out, a 503), send the same request again with the same payment: Tragent recognises the token and never charges it twice. With link-cli that is link-cli mpp pay again with --spend-request-id and the id link-cli spend-request list shows for the purchase. If Link will not let that purchase pay again, start a new one: a request Tragent could not answer is never charged. The hold on the card is released within the hour, and a card that was charged when you paid is refunded.
The answer
{
"id": "ans_0c3f6a1e9b2d4f57",
"answer": "ETH is at $3,412.55, up 3.1% in the last 24 hours (market data, as of this answer). On chain, ...",
"sources": [{ "label": "Market data" }, { "label": "On-chain data" }],
"asOf": "2026-11-18T12:00:00.000Z"
}
answer is Markdown. sources name the kind of data behind it. Answers take about 5 to 20 seconds.
What it covers: live and past token prices, on-chain activity (transfers, swaps, large holders, wallet balances and positions) and DEX markets (pairs, liquidity, volume, trending tokens). What it does not: news, macro data and derivatives are not part of an answer yet. It is research, not financial advice. It cannot see or act on any account, and it does not place trades.
What you pay for, and what you never pay for
- You pay for an answer that is delivered. A request we refuse or cannot answer is not charged. If a payment was already collected when an answer fails, it stays good for the same request, and is refunded if we still cannot answer it.
- By card, the amount is held on the card when you pay and charged only once your answer is ready. If we cannot answer, the hold is released and nothing is charged. A payment that cannot be held first, because its payment method does not allow it or because we are not holding payments at that time, is charged when you pay instead, and refunded if we cannot answer.
- A body that is not
{"question": "..."}is refused with400before your payment is checked. - If the same wallet, or the same payment token, sends the same question again within ten minutes, as a retry does, it gets the same answer and is not charged again.
- A payment is good for one question. The same payment with a different question is refused with
409. - If a reply says your payment is being confirmed (
503, codesettlement_pendingorpayment_check_unavailable), wait the seconds inRetry-Afterand send the same request again. Do not treat it as unpaid, and do not pay again. - The same payment returns its answer for 15 minutes after you first sent it. After that the answer is removed and the payment is spent.
Replies other than 200
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_body | The body is not one question of 1 to 2,000 characters | Fix the body; nothing was charged |
| 402 | (challenge) | USDC: no payment, or the payment was not accepted; the header's error says why | Pay what the header asks |
| 402 | payment_required | Card: no payment was sent | Pay the challenge in the reply |
| 402 | malformed_credential, invalid_challenge, payment_expired | Card: the payment could not be read, answers a challenge that is not ours or has changed, or its challenge ran out | Pay the new challenge in the reply; nothing was charged |
| 402 | payment_refused, verification_failed | Card: the token or the card was not accepted; the reply says why | Pay the new challenge with a new token; nothing was charged |
| 403 | payer_blocked | Payments from this wallet are not accepted | Write to support@tragent.fyi |
| 409 | in_progress | This request is already being answered | Send it again after Retry-After |
| 409 | payment_reused | This payment was made for another question | Sign a new payment |
| 410 | answer_expired | More than 15 minutes have passed since this payment was first sent | Send the request with a new payment |
| 410 | payment_refunded | The request could not be answered and its payment is being refunded | Send the request with a new payment |
| 410 | payment_released | Card: the hold was released and nothing was charged | Send the request with a new payment |
| 429 | rate_limited | Too many requests from this wallet or address | Wait Retry-After |
| 503 | settlement_pending | The payment is being confirmed | Send the same request again after Retry-After |
| 503 | answer_failed | The answer could not be produced; the reply says whether your payment was kept for a retry | Send the same request again |
| 503 | busy | We are at a limit, out of time or paused; the reply says whether your payment was kept | Send the same request again after Retry-After |
| 503 | payment_check_unavailable | The payment cannot be checked or confirmed right now | Send the same request again after Retry-After; do not pay again |
Errors are JSON: {"error": {"code": "...", "message": "..."}}. On the card address, replies about a payment are also problem documents (application/problem+json, with type, title, status and detail), as the protocol asks, and every 402 carries a new challenge.
Limits
One question a call. Up to 20 paid requests a minute from one wallet, and up to 10 new card payments a minute from one network address. After three card payments from one address are refused or cannot be answered, new ones from it are slowed to one a minute for ten minutes. The routes are for programs: a web page on another site cannot call them from a browser.
An account of your agent's own
For an agent that acts, not only asks. One paid call buys it a Tragent account of its own: its own Tragent (the same agent people use, which researches, decides and trades), its own wallet on Base, and an API to work with both. No person signs in and nobody approves its trades: it runs within the account's own rules, set out below. It costs 20.00 USD for 30 days, with 1,000 credits with each purchase, paid the same two ways as an answer.
Buy it
POST https://tragent.fyi/api/v1/x402/plan pay in USDC
POST https://tragent.fyi/api/v1/mpp/plan pay by card
Content-Type: application/json
{"ownerKey": "<your P-256 public key, base64 SPKI DER>", "sendTo": "0x..."}
ownerKeyis a P-256 key you make and keep. It owns the account and its wallet: API keys are issued only to requests it signs, and only it can export the wallet's key. Tragent receives only its public half. If you lose it, nobody can recover the account for you.sendTois the one address on Base that money may ever leave the wallet to. It is fixed when the account is bought and can never be changed, by you or by us. Paying in USDC it is the paying wallet unless you name another; paying by card you must name it.- It is paid first: the
402, then the paid request, exactly as for an answer. The account is made once the payment is collected, in a few seconds.
import { generateKeyPairSync } from 'node:crypto';
const owner = generateKeyPairSync('ec', { namedCurve: 'P-256' }); // keep owner.privateKey safe
const ownerKey = owner.publicKey.export({ type: 'spki', format: 'der' }).toString('base64');
const res = await pay('https://tragent.fyi/api/v1/x402/plan', { // the x402 fetch above
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ ownerKey }),
});
const account = await res.json();
The reply:
{
"id": "acc_5d1f0b7a9c2e4f60",
"account": "agt_N3kR8pQ2vX7mL4tB9wZ1cA",
"wallet": { "address": "0x52a1e4c08b3f6d9e7a2c5b8f1d4e7a0c3b6f9e21", "network": "base" },
"sendTo": "0x8f3e2d1c0b9a8f7e6d5c4b3a2918f7e6d5c4b3a2",
"plan": { "status": "active", "endsAt": "2026-12-19T12:00:00.000Z" },
"credits": { "left": 1000 },
"next": { "keys": "POST /api/v1/agent/keys with a request your owner key signs", "docs": "https://tragent.fyi/developers#accounts" },
"asOf": "2026-11-19T12:00:00.000Z"
}
The same payment sent again returns the same account. To fund it, send USDC or ETH on Base to its wallet address.
Get an API key
Sign four lines with the owner key (ECDSA P-256 over SHA-256, the signature DER, base64) and send them. No key is needed for this call:
import { randomBytes, sign } from 'node:crypto';
const nonce = randomBytes(18).toString('base64url');
const expiresAtMs = Date.now() + 5 * 60_000; // at most ten minutes ahead
const text = `tragent-agent-key-v1\n${account.account}\n${nonce}\n${expiresAtMs}`;
const signature = sign('sha256', Buffer.from(text), { key: owner.privateKey, dsaEncoding: 'der' }).toString('base64');
const r = await fetch('https://tragent.fyi/api/v1/agent/keys', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ account: account.account, nonce, expiresAtMs, signature }),
});
const { key } = await r.json(); // tgk_..., shown once
A signed request works once. A new key replaces the account's earlier one, so a lost or leaked key is replaced by signing again.
Work with it
Every call below takes Authorization: Bearer tgk_....
| Call | What it does |
|---|---|
GET /api/v1/agent/account | The plan, the credits left, the wallet and what it holds, and recent activity |
POST /api/v1/agent/ask{"message", "clientMessageId", "session"?} | One message to the account's Tragent, answered as one JSON reply: {"message": {"text", "sources"}, "actions": [...]}. Ask it to research, to decide, or to trade; actions lists every trade or send it made, and where each stands. The same clientMessageId again returns the same reply and never runs the turn twice. session keeps a conversation going |
POST /api/v1/agent/withdraw{"token", "amount", "requestId"} | Sends from the wallet to the one sendTo address, with or without a plan or credits left. The same requestId again is the same withdrawal, never a second one |
POST /api/v1/agent/export/preparePOST /api/v1/agent/export | The wallet's private key, encrypted to a one-time P-256 key you give. Prepare returns the exact request your owner key must sign (good for five minutes); export returns ciphertext only that one-time key opens |
A turn takes up to about 40 seconds. One still running after 50 seconds answers 202 with "status": "running": send the same request again, with the same clientMessageId or requestId, for its outcome. Never send it as a new one.
What its Tragent may do
- Research and answer, as the pay-per-answer API does, with the account's own history and memory.
- Trade on Base (swaps, and the token approvals they need) with the wallet's own money, with no limit beyond what the wallet holds. A buy of a coin that fails Tragent's coin check is refused, not made.
- Send only to its one
sendToaddress. No other address can ever be named. - Not pay other services, and not lend on Aave: both are off.
- Nobody approves anything for it: a request that would need someone's approval is refused at once, and the reply says why.
Credits, renewal and refunds
- One credit is one US cent of what Tragent's work costs: its replies, the data behind them, and network fees it pays. Credits never expire. When they run out, its Tragent stops until a renewal adds more. Tragent's fees on its trades, deposits and withdrawals, at the rates in the Terms, are taken from its credits, and what they cannot cover is written off. A trade whose fee is more than the credits left is declined; a withdrawal or a deposit never is.
- Renew with the same call and
{"renew": "agt_..."}: 30 more days after the later of now and its end, and 1,000 more credits with each renewal. Anyone may renew an account; it needs no key. - After its plan ends, its Tragent stops and trades no more, but withdrawals to its one address and export still work.
- You pay for an account that is made. If it cannot be made, the payment stays good for the same request for 15 minutes (send it again), and is then refunded, with anything made for it taken back.
Replies for accounts
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 202 | ("status": "running") | A turn or a withdrawal is still running | Send the same request again, with the same id |
| 400 | invalid_body | The body is not one this call takes; on the purchase routes nothing was charged | Fix the body |
| 401 | unauthorized, signature_invalid | No valid API key; or a key request that is not signed by the owner key, has expired or was used | Send the key; sign a new request |
| 402 | plan_ended, credits_exhausted | The plan has ended, or its credits are used up | Renew the account |
| 404 | no_such_account | A renewal names no account; nothing was charged | Check the account id |
| 409 | in_progress | This message, or this account, is already being worked on | Send it again after Retry-After |
| 409 | turn_unfinished | This message's turn did not finish; what it did is on the account | Read /account, then send a new message with a new id |
| 410 | payment_spent, payment_refunded | The payment's 15 minutes have passed, or it is being refunded | Do not pay again for the same account; write to support@tragent.fyi |
| 429 | rate_limited, busy | Too many calls, or two turns already running | Wait Retry-After |
| 503 | account_failed | The account could not be made yet; the reply says whether your payment was kept | Send the same request again |
Limits: 20 turns a minute, 12 withdrawals a minute and 10 exports an hour for one account, and 20 key requests a minute from one caller.
Connect with MCP
An account's Tragent is also an MCP server, so any assistant, harness or coding agent that speaks the Model Context Protocol can add it as a tool, with the account's API key:
https://tragent.fyi/mcp
Authorization: Bearer tgk_...
It is one endpoint, Streamable HTTP, stateless, with JSON replies. It speaks MCP 2026-07-28 and the 2025 handshake (2025-03-26 to 2025-11-25).
| Tool | What it does |
|---|---|
ask{"message", "messageId", "conversation"?} | One message to the account's Tragent, answered as one reply with its sources and every trade or send it made, the same as POST /api/v1/agent/ask. Give each new message a new messageId; the same messageId with the same message is a retry and never runs twice. A turn still working after about 50 seconds answers "status": "running": call ask again the same way for the reply |
account | The plan, the credits left, the wallet and what it holds, and the one address withdrawals go to. Changes nothing |
withdraw{"token", "amount", "requestId"} | A coin from the wallet to its one address, as POST /api/v1/agent/withdraw. The same requestId with the same coin and amount is the same withdrawal, never a second one |
Claude Code:
claude mcp add --transport http tragent https://tragent.fyi/mcp \
--header "Authorization: Bearer $TRAGENT_KEY"
Cursor (~/.cursor/mcp.json):
{ "mcpServers": { "tragent": {
"url": "https://tragent.fyi/mcp",
"headers": { "Authorization": "Bearer ${env:TRAGENT_KEY}" } } } }
VS Code (.vscode/mcp.json):
{ "inputs": [{ "type": "promptString", "id": "tragent-key", "description": "Tragent API key", "password": true }],
"servers": { "tragent": { "type": "http", "url": "https://tragent.fyi/mcp",
"headers": { "Authorization": "Bearer ${input:tragent-key}" } } } }
Any other client: the address above and the header. A request without a valid key is answered 401, and one from a web page on another site 403: call it from your server, app or agent. The server card is at /mcp/server-card, and the server is in the official MCP Registry as fyi.tragent/tragent. Signing in with your own Tragent account instead of a key, to use your Tragent from Claude, ChatGPT or Cursor, is coming next.
From a coding agent
An agent that can run code and holds a wallet with USDC on Base can use Tragent with one instruction:
Read https://tragent.fyi/llms.txt, then ask Tragent: "Which wallets bought the most
of 0x... on Base in the last 24 hours?" Pay with the x402 client and the wallet key
in WALLET_KEY.
An agent with link-cli signed in to your Link wallet needs no crypto at all:
Read https://tragent.fyi/llms.txt, then ask Tragent: "Which wallets bought the most
of 0x... on Base in the last 24 hours?" Pay by card with link-cli mpp pay.
And one that should act on its own can buy itself an account:
Read https://tragent.fyi/llms.txt. Make a P-256 owner key and keep its private half in
OWNER_KEY. Buy a Tragent account with it, paying with the x402 client and WALLET_KEY,
get an API key, and ask your Tragent what to do with the wallet.
For machines: every address is listed below.
For machines
Every address an agent reads or calls, in one place.
| What | Address | How |
|---|---|---|
| Docs for language models | /llms.txt | This page, as plain text |
| The HTTP API | /openapi.json | OpenAPI 3.1: every route, its price and how to pay it |
| Ask, in USDC | POST /api/v1/x402/ask | x402 version 2 |
| Ask, by card | POST /api/v1/mpp/ask | Machine Payments Protocol |
| Buy or renew an account, in USDC | POST /api/v1/x402/plan | x402, paid first |
| Buy or renew an account, by card | POST /api/v1/mpp/plan | Machine Payments Protocol |
| An account's API key | POST /api/v1/agent/keys | A request the owner key signs |
| The account's API | /api/v1/agent/account, /ask, /withdraw, /export | Authorization: Bearer tgk_... |
| MCP server | /mcp | Streamable HTTP, with the account's key |
| MCP server card | /mcp/server-card | What a directory reads before connecting |
Every address is on https://tragent.fyi.
Where Tragent is listed
- The official MCP Registry, as
fyi.tragent/tragent. - x402scan, with both USDC routes: Tragent on x402scan.
- MPPScan, with both card routes: Tragent on MPPScan.
Other ways to use Tragent
| Way | For | State |
|---|---|---|
| Ask a question, pay per answer | Any agent that needs research: an inference layer, with nothing to sign up for | Above |
| An account of the agent's own | An agent that decides and acts: its own Tragent and wallet, a decision and wallet layer | Above |
| An account's Tragent as an MCP server | Assistants, harnesses and coding agents that add tools with MCP, with an account's API key | Above |
| Sign in to your own Tragent from Claude, ChatGPT or Cursor | People who want their own Tragent (portfolio, alerts, their wallet) inside their assistant | Coming next |
| The Tragent app | People: a personal trading agent with its own wallet | tragent.fyi |
Terms and contact
Use of the API is under Tragent's Terms of Service (the Tragent API section) and Privacy Policy, and an account for an agent under their Accounts for agents sections. By paying for an answer or an account you accept them. Questions: support@tragent.fyi.