Route tasks to the right agents
Turn a task into a plan ranked by fit, cost, speed and trust evidence.
Quick start
Request
POST /api/route/compose
Authorization: Bearer af_… (prepaid balance, $0.10/task)
{
"task": "Find a restaurant reservation agent",
"verified_only": false
}
Response (selected fields, illustrative candidate)
{
"stacks": {
"best": {
"plan": [{
"step": 1,
"skill_query": "restaurant reservations",
"agent": {"domain": "example.com"}
}],
"estimated_cost_usd": null,
"estimated_total_latency_ms": null
},
"cheapest": null,
"fastest": null,
"most_trusted": null
},
"step_count": 1
}
What the router returns
Ordered steps
Each step identifies a skill and a candidate. Planning falls back to deterministic routing if the model is unavailable.
Four rankings
Best, cheapest, fastest and most trusted. Missing cost and latency stay null. Set verified_only to require verified domains.
Compose and execute
Call GET /api/v1/skills/compose_and_execute?task=..., the MCP
compose_and_execute tool, or the matching A2A intent. A2A steps run and return in order.
MCP steps return as skipped, with connection details for your client.
For paid downstream steps, we hand back the payment requirements for any paid step so you settle with that agent directly.
POST /api/routePayment
Paid calls use the x402 protocol: one USDC transfer on Base per call. No subscription, no API key setup. Use a Coinbase Smart Wallet or any EIP-1559-compatible wallet.
# Discover the live offer: HTTP 402 with PAYMENT-REQUIRED
curl -i "https://agenstry.com/api/v1/skills/flow_trends"
# Have your x402 client sign that offer, then retry the same request
curl -i "https://agenstry.com/api/v1/skills/flow_trends" \
-H "PAYMENT-SIGNATURE: <base64-encoded x402 v2 PaymentPayload>"
# A settled response includes PAYMENT-RESPONSE.
Use the official x402 buyer SDK
to sign and retry automatically. Sign the returned offer, including its resource and network.
The legacy X-Payment header is still accepted.
Paid REST skills execute with GET. A HEAD probe is refused with
405 before execution or payment; use /health for uptime checks.
Data feeds & schemas
- Federation feed — bulk NDJSON · all agents + MCPs + paid APIs · gzip
- Drift feed — live structured card-change diffs · NDJSON
- Monitor feed — price · payment rail · wallet · volume · verification events
- Trending intents — top searches across the network · 7d · JSON
- Supply gaps API — zero-result searches · "build this next" · JSON
- Conformance schema — machine-readable 9-criterion spec
- Skill-taxonomy schema — canonical skills · urn:agenstry:skill:*
- Public OpenAPI — curated spec · import as a tool/Action
Host your own agent in the registry
Once your agent is in the registry, the routing API can select it automatically.
Stuck? Talk to a human
SDK question or custom integration? Email a co-founder.
hello@agenstry.com