EcoRouter

One router for every paid step your agents take, held to a spending cap.

Airwallex Agentic Banking Hackathon · Inference Sourcing track
OpenAI
Anthropic
Firecrawl
context.dev
Exa
Tavily
Groq
OpenRouter
Together AI
Fireworks AI
Mistral AI
Gemini
DeepSeek
Cohere
Perplexity
Replicate
Hugging Face
Ollama
OpenAI
Anthropic
Firecrawl
context.dev
Exa
Tavily
Groq
OpenRouter
Together AI
Fireworks AI
Mistral AI
Gemini
DeepSeek
Cohere
Perplexity
Replicate
Hugging Face
Ollama

Every model call, search and scrape, sourced at the best live price inside its cap.

The router
ecorouter · research-agent illustration
Run: brief me on a company
each step routed fresh
routed
Steps
Plan the task
reasoning
Find sources
search
Read the pages
scrape
Company facts
context
Write the brief
reasoning
  • cap
  • latency
  • health
Providers
What EcoRouter routes
01  Models
Anthropic
OpenAI
Gemini
Groq
Mistral
DeepSeek
Together
Fireworks

Every model you use

Frontier and open models behind one call. Routed by token price, context size and the time to first token we measured.

02  Tools
Firecrawl scrape
context.dev context
Exa search
Tavily search
Perplexity answers
Cohere rerank

Every tool your agents call

Search, scraping, company context and reranking are paid steps too. They share the same cap as the model calls, so one budget covers the run.

03  Settlement
Funding wallet
balances built
Card per provider
issuing built
FX on quotes
fx built
Card webhooks
receipts built
airwallex
sandbox

Settled on Airwallex

A funding wallet backs the caps and each provider gets its own virtual card with matching limits. Built into the SDK; first live sandbox run next.

How it works
  1. 01  Cap

    Give every agent a cap

    A budget per period, a ceiling per step and the providers it may use. Checked before any provider is called, not reconciled after the invoice.

  2. 02  Quote

    Price the step everywhere

    Each step has a kind. The router keeps a quote per provider for that kind, from published prices plus the latency it measured on recent calls.

  3. 03  Route

    Pick, call, reroute

    The cheapest provider under the latency target and the budget left wins. When a price moves, a provider slows down or the cap runs low, the next step goes elsewhere.

Route a step
Step Reasoning
$0.0500
$0.001$0.0125$0.025$0.0375$0.05
2.0s
0.2s1.4s2.6s3.8s5.0s
Break the current pick
Routed to
Gemini
Cost · left after
$0.0060
Quotes for a reasoning step
ProviderPrice · latency

    Keep providers that are online, allowed, under the budget left and under the latency target. Take the cheapest; ties go to the faster one. If none are left, stop before calling anyone. Example quotes, not live prices.

    Spending caps

    The agent asks. The router decides what it can afford.

    Agents never hold provider keys or a card. Every step passes these checks in order, and the first one that fails stops the step before anything is spent. The agent gets a refusal it can act on.

    Hackathon build. Not audited.

    1. 01 Agent active the owner can pause any agent at once
    2. 02 Step kind allowed an agent only uses the kinds it was given
    3. 03 Provider allowlist only providers approved for this agent
    4. 04 Per-step ceiling no single step above the ceiling
    5. 05 Run budget left the whole run stays inside its cap
    6. 06 Period cap left daily, weekly or monthly spend per agent
    7. 07 Quote fresh prices older than the window are refetched
    8. 08 Latency target slow providers are skipped, not waited on
    9. 09 Provider healthy errors and timeouts take a provider out for a while
    10. 10 Call and meter the real cost replaces the quote on the receipt
    Settlement on Airwallex In the SDK

    Caps enforced twice: at the router, then at the card.

    01

    One funding wallet

    Agent caps are budgets drawn from an Airwallex balance. The SDK refuses caps that add up to more than the wallet holds.

    GET /api/v1/balances/current
    Built
    02

    A virtual card per provider

    Each provider is paid with its own virtual card. Its transaction limits mirror the agent's period cap, so a router bug still cannot overspend at the card.

    POST /api/v1/issuing/cards/create · transaction_limits
    Built
    03

    Prices in any currency

    Providers billing in EUR or other currencies are converted at the live Airwallex rate before the router compares them to the cap.

    GET /api/v1/fx/rates/current
    Built
    04

    Spend reconciled per step

    Card transactions are matched to router receipts. A decline at the card reroutes the next step, the same way a slow provider does.

    issuing.transaction.* webhooks · HMAC-SHA256
    Built

    Built in the SDK and tested offline against the documented API. Not yet run against a live Airwallex sandbox account. Details in plans/airwallex-integration.md.

    Questions
    What is EcoRouter?

    A unified resource router for agentic inference. Your agents ask for a capability, such as a model call, a web search, a scrape or a company lookup, and EcoRouter sends each step to the provider with the best live price and speed that fits the agent's spending cap.

    How is this different from a model router?

    Model routers pick between LLMs. An agent run also pays for search, scraping, context and reranking. EcoRouter prices all of those steps in one place and holds them to one budget, so the cap covers the whole run, not just the tokens.

    What happens when the cap runs out?

    The step stops before any provider is called, and the agent gets a refusal that says which cap was hit and what the cheapest quote was. It can drop the step, use a cheaper kind of step, or ask for more budget.

    When does it reroute?

    Every step is routed fresh. If the last provider raised its price, got slower than the latency target, started failing, or no longer fits the budget left, the next step goes to the next provider that fits.

    Where does Airwallex come in?

    Settlement. The plan is one Airwallex wallet that funds the caps, a virtual card per provider with limits that mirror the period cap, FX on quotes priced in other currencies, and card transaction webhooks reconciled into receipts. All of it is built into the SDK and tested offline; the first run against a live sandbox account is next.

    Are the prices on this page real?

    No. They are example quotes chosen to show how routing behaves. The router will read live provider pricing and measured latency.

    Let your agents check the price first.

    Hackathon build · Airwallex settlement in progress

    Copied to clipboard