Cut Your Agent's Chain-Data Token Bill in Half
Same JSON-RPC, same endpoint, one request header. Agent RPC returns decoded, compact responses measured at 48.4% fewer input tokens against our live production endpoint. That is the token-weighted aggregate for the run; per-method reductions run from 23% to 69% across the methods that reach tier 2.
{
"blockNumber": "0x17ee5d9",
"from": "0x05ff…f381",
"to": "0x2744…a22b",
"gasUsed": "0x135b3",
"effectiveGasPrice": "0x8b485351",
"status": "0x1",
"logsBloom": "0x00000004…512 hex chars…0000",
"logs": [
{
"address": "0xa0b8…eb48",
"topics": [
"0xddf252ad…f523b3ef",
"0x000…b487a22b",
"0x000…31c3e7fa"
],
"data": "0x000…6fc23ac00",
"blockNumber": "0x17ee5d9",
"transactionHash": "0x4d41…cbc0",
"logIndex": "0x0"
}
]
}{
"jsonrpc": "2.0", "id": 1,
"result": {
"tx": "0x4d41…cbc0",
"tx_index": "20",
"block": "25093593",
"block_hash": "0x84d0…398b4",
"from": "0x05ff…f381",
"to": "0x2744…a22b",
"status": "success",
"gas_used": "79283",
"gas_price": "2336772945",
"logs": [
{
"contract": "0xa0b8…eb48",
"event": "Transfer",
"args": { "from": "0x2744…a22b", "to": "0xfa21…e7fa", "value": "30000000000" }
}
]
}
}Real Numbers From Live Traffic
Agent RPC is token-optimized JSON-RPC delivery for AI agents, powered by the open TORPC format. The figures below come from a measured run against our live production endpoint. We compare only against raw JSON-RPC, never against other providers.
| EVM method | Raw tokens | Tier 2 tokens | Reduction |
|---|---|---|---|
| eth_getBlockReceipts | 384,235 | 152,562 | −60.3% |
| eth_getBlockByNumber | 231,032 | 137,781 | −40.4% |
| eth_getTransactionReceipt | 4,570 | 1,624 | −64.5% |
| eth_getTransactionByHash | 1,819 | 564 | −69.0% |
How Does Agent RPC Work?
No SDK migration, no new endpoint. Agent RPC rides the JSON-RPC envelope you already send. Opt in with one header, or drop in the MCP server.
Opt In With a Header
Add one request header. The response comes back compacted, and an echoed Token-Tier header tells you exactly what you got.
# opt in to tier 2 semantic decode (no API key needed on this endpoint)
curl https://rpc.ankr.com/monad_mainnet \
-H 'Content-Type: application/json' \
-H 'Accept-Token-Tier: 2' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["latest",false]}'
# response headers
Token-Tier: 2
Vary: Accept-Token-Tier, Rpc-Compress, Rpc-DecodePick Your Tier
Three levels of compaction, from byte-identical raw to fully decoded semantics. Choose per request.
| Tier | What it does | Tokens |
|---|---|---|
| 0 · raw | Untouched JSON-RPC. Byte-for-byte what the node returns. | baseline |
| 1 · mechanical | Mechanical compression: strips padding, dedupes, trims zero-hex. Reversible on the fields it keeps. | −35.3% |
| 2 · semantic | ABI-decodes each log into named events and typed args: {contract, event, args}. Lossy by design. | −48.4% |
Raw is one re-query away: re-issue the same request without the header for the original bytes, and pin a block if you need that reproducible later. Decoding is deterministic: the same input always decodes the same way.
Or Skip HTTP Entirely
Drop the MCP server into your agent runtime and tier negotiation happens for you. Here is the config it uses.
{
"mcpServers": {
"ankr-agent-rpc": {
"command": "npx",
"args": ["-y", "@w3tech.io/agent-rpc-mcp"],
"env": {
"ANKR_API_KEY": "<your-key>"
}
}
}
}One Header, Three Ways to Use It
Ship Without Burning Budget
Ship an agent that reads the chain without burning your model budget. Free tier, one request header, works with Claude Code, Cursor, LangChain, and any JSON-RPC client. The MCP server is live, and its config block is in step 3 below.
Run Agents at Volume
Run copilots, trading agents, and LLM data pipelines at volume. Token-tier responses cut the input-token line of your model bill; per-key usage telemetry shows finance what you are spending it on.
Agent-Ready RPC on Day One
Building a chain for the agent economy? Ship agent-ready RPC on day one: we run the Agent RPC stack on your network's endpoints, token-tier compression and MCP server, under your brand, built on the open spec.
Wallet Copilots
"Explain this transaction" in ~250 tokens, not a wall of hex.
Trading & Risk Agents
Read positions across chains cheaply enough to poll in a loop.
Indexing + LLM Pipelines
Semantic pre-decode at ingest keeps downstream prompts small.
Support Bots
Transaction status with reason, no hex archaeology.
Why JSON-RPC Wastes Tokens
JSON-RPC was built for UIs, not LLMs. Hex padding, logsBloom, undecoded topics. A receipt is mostly bytes a model has to reason through before it can answer. TORPC strips and decodes server-side, deterministically.
When your agent runs code-execution sandboxes, raw data may never enter the model context, and TORPC still cuts the tokens that do cross into context, plus the bandwidth and parse time on the way there.
We published the cases where it doesn't help, too. See where it doesn't help →
// before: raw, undecoded
"logsBloom": "0x0020…512 hex chars…000",
"topics": ["0xddf252ad…", "0x0000…7a16"],
"data": "0x0000…1bc16d674ec80000",
// after: TORPC tier 2 (decoded logs)
"contract": "0xa0b8…eb48",
"event": "Transfer",
"args": { "from": "0x2744…a22b",
"to": "0xfa21…e7fa",
"value": "30000000000" }
// 696 tokens → 292. The model reads
// decoded logs, not raw bytes.An Open Spec, Not a Lock-In
TORPC, the open Token Optimized RPC specification, is CC0. The reference implementation is Apache-2.0, which carries an express patent grant. Conformance vectors are public, so an implementation can be checked against the spec rather than against us. The suite is an early scaffold today.
The production encoder runs inside Ankr's edge; the spec, decoder, and test vectors are public so any provider or client can implement the format.
Included in Every Paid Plan
Token tiers are included in every paid Ankr plan, and they also work with a free key on any blockchain your free tier can reach. You pay for requests, not for the savings.
See Ankr PricingFrequently Asked Questions
Accept-Token-Tier header: LangChain, Vercel AI SDK, Coinbase AgentKit, viem, ethers, or plain curl. No SDK is required. The MCP server is live for MCP-compatible clients (Claude Code, Claude Desktop, Cursor, Windsurf). The TypeScript reference decoder is not on npm yet; its source is in the reference repository.


