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 answerAn account of its own
Use it asResearch: an answer about prices, on-chain activity and marketsResearch, decisions and trades, with its own wallet
Price0.25 USD an answer in USDC, or 0.50 USD an answer by card20.00 USD for 30 days, and 1,000 credits with each purchase
KeysNone: each call is paidAn API key, issued to requests your own key signs
Acts on its ownNo: it answers, and never tradesYes: 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 BaseCard, through Link
Address/api/v1/x402/ask/api/v1/mpp/ask
Price0.25 USD an answer0.50 USD an answer by card (cards have a 0.50 USD minimum)
Protocolx402 version 2, scheme exactMachine Payments Protocol, method stripe, intent charge
You needA wallet with USDC on Base and an x402 clientA Link account and link-cli, or another client that can get a payment token from a wallet
When you are chargedWhen the answer is readyThe 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 inUSDC on Base (eip155:8453, token 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
Network feeNone for you: the payment is a signed authorization that a facilitator submits
  1. Send the request with no payment. The reply is 402 Payment Required with a PAYMENT-REQUIRED header: base64 JSON holding the exact amount, the token and the address to pay.
  2. Sign that payment. It is one TransferWithAuthorization (EIP-3009) for exactly the amount, valid for the number of seconds the requirement gives in maxTimeoutSeconds.
  3. Send the same request again with the signed payment, base64 JSON, in a PAYMENT-SIGNATURE header.
  4. The answer comes back as 200 with a PAYMENT-RESPONSE header 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)

  1. Send the request to /api/v1/mpp/ask with no payment. The reply is 402 Payment Required with a WWW-Authenticate: Payment header: the challenge. It names the amount in cents, the currency, Tragent as the seller, and when it runs out (five minutes).
  2. Your wallet grants a one-time payment token for that amount to that seller.
  3. Send the same request again with an Authorization: Payment header: the challenge echoed back, with the token.
  4. The answer comes back as 200 with a Payment-Receipt header 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

Replies other than 200

StatusCodeMeaningWhat to do
400invalid_bodyThe body is not one question of 1 to 2,000 charactersFix the body; nothing was charged
402(challenge)USDC: no payment, or the payment was not accepted; the header's error says whyPay what the header asks
402payment_requiredCard: no payment was sentPay the challenge in the reply
402malformed_credential, invalid_challenge, payment_expiredCard: the payment could not be read, answers a challenge that is not ours or has changed, or its challenge ran outPay the new challenge in the reply; nothing was charged
402payment_refused, verification_failedCard: the token or the card was not accepted; the reply says whyPay the new challenge with a new token; nothing was charged
403payer_blockedPayments from this wallet are not acceptedWrite to support@tragent.fyi
409in_progressThis request is already being answeredSend it again after Retry-After
409payment_reusedThis payment was made for another questionSign a new payment
410answer_expiredMore than 15 minutes have passed since this payment was first sentSend the request with a new payment
410payment_refundedThe request could not be answered and its payment is being refundedSend the request with a new payment
410payment_releasedCard: the hold was released and nothing was chargedSend the request with a new payment
429rate_limitedToo many requests from this wallet or addressWait Retry-After
503settlement_pendingThe payment is being confirmedSend the same request again after Retry-After
503answer_failedThe answer could not be produced; the reply says whether your payment was kept for a retrySend the same request again
503busyWe are at a limit, out of time or paused; the reply says whether your payment was keptSend the same request again after Retry-After
503payment_check_unavailableThe payment cannot be checked or confirmed right nowSend 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..."}
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_....

CallWhat it does
GET /api/v1/agent/accountThe 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/prepare
POST /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

Credits, renewal and refunds

Replies for accounts

StatusCodeMeaningWhat to do
202("status": "running")A turn or a withdrawal is still runningSend the same request again, with the same id
400invalid_bodyThe body is not one this call takes; on the purchase routes nothing was chargedFix the body
401unauthorized, signature_invalidNo valid API key; or a key request that is not signed by the owner key, has expired or was usedSend the key; sign a new request
402plan_ended, credits_exhaustedThe plan has ended, or its credits are used upRenew the account
404no_such_accountA renewal names no account; nothing was chargedCheck the account id
409in_progressThis message, or this account, is already being worked onSend it again after Retry-After
409turn_unfinishedThis message's turn did not finish; what it did is on the accountRead /account, then send a new message with a new id
410payment_spent, payment_refundedThe payment's 15 minutes have passed, or it is being refundedDo not pay again for the same account; write to support@tragent.fyi
429rate_limited, busyToo many calls, or two turns already runningWait Retry-After
503account_failedThe account could not be made yet; the reply says whether your payment was keptSend 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).

ToolWhat 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
accountThe 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.

WhatAddressHow
Docs for language models/llms.txtThis page, as plain text
The HTTP API/openapi.jsonOpenAPI 3.1: every route, its price and how to pay it
Ask, in USDCPOST /api/v1/x402/askx402 version 2
Ask, by cardPOST /api/v1/mpp/askMachine Payments Protocol
Buy or renew an account, in USDCPOST /api/v1/x402/planx402, paid first
Buy or renew an account, by cardPOST /api/v1/mpp/planMachine Payments Protocol
An account's API keyPOST /api/v1/agent/keysA request the owner key signs
The account's API/api/v1/agent/account, /ask, /withdraw, /exportAuthorization: Bearer tgk_...
MCP server/mcpStreamable HTTP, with the account's key
MCP server card/mcp/server-cardWhat a directory reads before connecting

Every address is on https://tragent.fyi.

Where Tragent is listed

Other ways to use Tragent

WayForState
Ask a question, pay per answerAny agent that needs research: an inference layer, with nothing to sign up forAbove
An account of the agent's ownAn agent that decides and acts: its own Tragent and wallet, a decision and wallet layerAbove
An account's Tragent as an MCP serverAssistants, harnesses and coding agents that add tools with MCP, with an account's API keyAbove
Sign in to your own Tragent from Claude, ChatGPT or CursorPeople who want their own Tragent (portfolio, alerts, their wallet) inside their assistantComing next
The Tragent appPeople: a personal trading agent with its own wallettragent.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.