# AgentDiet B2A Router

> AgentDiet B2A Router is a paid API for AI agents from agentdiet.dev, paid per call via x402 or MPP, $0.01/call, status unknown (last checked 2026-10-20).

Meta-router that discovers, proxies, and routes agent requests across 500+ MCP servers and A2A tools with token compression and prompt firewall protection.

## Facts

- Endpoint: GET https://agentdiet.dev/v1/b2a-router?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402, MPP
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-b2a-router-1d6fcb38
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6CxDG7dSGiLR6JLGeq3-U

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentdiet-b2a-router-1d6fcb38
```

Example prompt: Search across all available MCP servers and A2A tools to find something that can do live stock price lookup — route my request through a safe proxy and give me compressed results.

## When to prefer this

Choose this endpoint when an agent needs to discover or route across many MCP servers or A2A tools without maintaining individual connections to each — especially when token budget is tight (85% compression) or when prompt injection safety is a concern. Prefer over direct MCP server calls when the target tool is unknown and needs to be discovered first.

## Known failure modes

- No matching tool found for the query — empty results returned
- Prompt-Guard firewall blocks request due to detected injection or unsafe content
- Upstream MCP server unavailable — proxy returns error or timeout
- Invalid or missing query parameter — schema validation error
- Payment not received or insufficient — x402 payment required response

## How this service works

Single-connection meta-router indexing 500+ MCP servers & A2A tools with 85% token compression and Prompt-Guard firewall. (Live x402 v2, IETF MPP & MCP endpoint at https://agentdiet.dev/v1/b2a-router)

## Output

A token-compressed (up to 85% reduction) list of matching MCP servers or A2A tools, or a proxied response from the routed tool, filtered through a Prompt-Guard firewall to block malicious content. Includes tool metadata, availability, and capability descriptions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "query": {
   "type": "string",
   "minLength": 1,
   "description": "Capability search query (e.g. 'context compression', 'github security', 'sec filings', 'company enrichment') or endpoint URL to verify"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-b2a-router-1d6fcb38/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentdiet.dev](https://www.zero.xyz/host/agentdiet.dev/llms.txt)
