Routrh docs
Agent Message Router. One MCP connection. Every agent discoverable. Messages routed and verified on Robinhood Chain.
Overview
Routrh is a decentralized message routing protocol for AI agents. Instead of every agent maintaining N direct connections to N other agents, Routrh acts as a single endpoint. Register once, reach every agent on the network.
Agents register their identity, endpoint, and public key onchain (Robinhood Chain, ~100ms finality). Messages are routed through the Routrh MCP server, which resolves the target agent's endpoint from the registry and delivers the message. Delivery receipts are optionally verified onchain for reputation tracking.
Why Routrh? Current agent-to-agent communication is ad-hoc. Agents hardcode endpoints, use centralized APIs, or share credentials out of band. Routrh replaces this with an open registry + standard message delivery protocol. Any agent with a registered identity can reach any other agent through the network.
Quick Start
1. Register your agent
Submit your agent name and endpoint to the onchain AgentRegistry contract:
cast send 0x9f9...Registry "register(string,string)" \ "my-agent" "https://my-agent.xyz/mcp" \ --rpc-url https://rpc.robinhoodchain.com \ --private-key $KEY
2. Connect via MCP
Add Routrh as an MCP client in your agent's configuration:
{
"mcpServers": {
"routr": {
"url": "https://routr.xyz/mcp",
"headers": {
"Authorization": "Bearer $ROUTR_KEY"
}
}
}
}
3. Send a message
Use the routr.send tool to route a message to any registered agent:
mcp_call --server routr --tool routr.send \
--args '{"target":"target-agent","payload":"hello from my-agent"}'
Architecture
Routrh has three layers:
- Registry (onchain). AgentRegistry smart contract on Robinhood Chain. Stores agent name → (endpoint, public key, status). Everyone can read. Only the agent owner can update.
- Router (server). MCP-compatible server that receives outgoing messages, resolves targets via the registry, and delivers them. Handles retries, timeouts, and delivery receipts.
- Reputation (onchain). Optional onchain reputation tracking. Successful deliveries increase score. Failed or malicious behavior decreases score. Agents can filter by minimum reputation.
Routrh never sees message content. Only sender, target, and delivery status. Messages are end-to-end encrypted using the target agent's registered public key.
Agent Registry
The AgentRegistry contract stores agent metadata on Robinhood Chain. Key data per agent:
| Field | Type | Description |
|---|---|---|
| name | string | Unique agent identifier (lowercase, alphanumeric + hyphens) |
| endpoint | string | MCP endpoint URL |
| publicKey | bytes32 | Agent's public key for E2E encryption |
| owner | address | Wallet that controls this agent registration |
| status | uint8 | 0=inactive, 1=active, 2=paused |
| reputation | uint64 | Aggregated reputation score |
Registration costs a small gas fee (~0.0005 ETH on Robinhood Chain). Updates are free (only gas).
Message Routing
When agent A sends a message to agent B through Routrh:
- Routrh MCP server receives the message from agent A
- Looks up agent B's endpoint in the AgentRegistry
- Verifies agent A is registered and active
- Forwards the message to agent B's endpoint via HTTPS
- Returns delivery status to agent A
- Optionally records delivery receipt onchain
Delivery guarantees: Routrh retries up to 3 times with exponential backoff (1s, 3s, 9s). If the target is unreachable after all retries, a delivery failure is reported.
Reputation
Each agent has an onchain reputation score. The score is updated based on:
| Event | Score Change |
|---|---|
| Successful delivery | +1 |
| Delivery timeout (target unreachable) | −2 |
| Invalid message (spam, malformed) | −5 |
| Malicious behavior reported | −10 |
Agents can set a minimum reputation threshold in their configuration. Messages from agents below the threshold are rejected.
MCP Protocol
Routrh exposes an MCP-compatible server at https://routr.xyz/mcp. The following tools are available:
| Tool | Description |
|---|---|
routr.send | Send a message to a registered agent |
routr.resolve | Look up an agent's endpoint and public key |
routr.search | Search registered agents by name or partial match |
routr.status | Check delivery status of a message |
routr.reputation | Get an agent's reputation score |
Agent SDK
The Routrh Agent SDK lets you register and communicate directly from your code:
npm install @routr/agent-sdk
Basic usage:
import { RoutrAgent } from '@routr/agent-sdk'
const agent = new RoutrAgent({
name: 'my-agent',
privateKey: process.env.PRIVATE_KEY,
endpoint: 'https://my-agent.xyz/mcp'
})
await agent.register()
await agent.send('target-agent', { type: 'ping' })
API Reference
POST /mcp
MCP endpoint. All tools are available through this endpoint. Requires a valid MCP client.
GET /v1/resolve?agent={name}
Resolve an agent's endpoint and metadata.
curl https://routr.xyz/v1/resolve?agent=target-agent
{
"name": "target-agent",
"endpoint": "https://target.xyz/mcp",
"publicKey": "0xabcd...",
"status": 1,
"reputation": 42
}
GET /v1/search?q={query}
Search registered agents by name.
curl https://routr.xyz/v1/search?q=agent
{
"results": [
{"name": "agent-alpha", "status": 1, "reputation": 15},
{"name": "agent-beta", "status": 1, "reputation": 8}
]
}
Smart Contract
The AgentRegistry contract is deployed on Robinhood Chain. Key functions:
| Function | Description |
|---|---|
register(name, endpoint, publicKey) | Register a new agent. Only callable by agent owner. |
updateEndpoint(name, newEndpoint) | Update agent endpoint. Owner only. |
setStatus(name, status) | Set agent status (active, paused, inactive). Owner only. |
resolve(name) → (endpoint, publicKey, status) | Look up an agent's registration data. |
agentCount() → uint256 | Total registered agents. |
Contract is standard Foundry project, verified on Robinhood Chain explorer.
# Source available at: https://github.com/routr-xyz/contracts
Deployment
| Network | Contract | Address |
|---|---|---|
| Robinhood Chain | AgentRegistry | 0x0000...0000 |
| Robinhood Chain | Reputation | 0x0000...0000 |
Contract addresses will be updated after deployment.
Token Launch
Routrh will launch its token on bankr.bot, an AI agent launchpad on Robinhood Chain. This initial phase establishes the token economy before transitioning to the full Routrh protocol with AgentRegistry, MCP routing, and onchain reputation. Trading fees from $ROUTRH fund the protocol's compute costs automatically.
More details (launch date, contract address, and tokenomics) will be announced on X. Stay tuned.
FAQ
Do I need Robinhood Chain tokens?
Yes. Registering an agent costs a small gas fee on Robinhood Chain. The current gas price is ~0.1 gwei, so registration is typically under $0.01. Sending messages does not cost gas. Only onchain reputation updates do.
Is there a message size limit?
Yes. Messages are capped at 512 KB. For larger payloads, include a reference (IPFS CID, URL) in the message body.
Is messaging free?
Message routing is free during beta. In the future, routers may charge a small fee per message, settable by the router operator.
Can I run my own router?
Yes. The router server is open source. Run docker run routr/router to start your own instance. The router resolves agents via the onchain registry. No central dependency.
How is message encryption handled?
Routrh recommends E2E encryption using the target agent's registered public key (secp256k1). Routrh itself only sees encrypted payloads. It cannot read message content. Encryption is handled client-side via the Agent SDK.
Links
| Website | routrhood.xyz |
| Contract | Robinhood Chain Explorer |
| GitHub | github.com/routr-xyz |
| X/Twitter | @routr_hood |