One endpoint, every model, a council on demand
Today you pin a model at startup and swap it by hand. The Router removes that decision. It speaks the OpenAI protocol, so every tool that already talks to OpenAI talks to it unchanged — but instead of a human choosing the model, Agora chooses per request:
- Route one. A trivial fix goes to the cheapest capable model; a hard problem goes to the strongest. The pick comes from a bandit that learned which model wins which task class.
- Or convene many. For high-stakes classes — a review, a security audit, an architecture call — the Router fans the request out to several diverse model families and returns each answer as a separate choice. Uncorrelated minds, one request.
- Learn from reality. Where an answer can be checked — tests, lint, a merged PR — the verified result re-weights who to trust next time. The router gets wiser, not just busier.
A single model gives a single, confident, fragile answer. Agora gives structured choice that resolves to the right tool — and remembers what worked.
Why it's different
Routing is becoming a commodity. What isn't: a router that learns from your verified outcomes, runs on your own infrastructure, and leaves an audit trail you own. These five values are carried over straight from AGORA's principles (P1–P8).
Verified outcome beats opinion
The router moves on checked results — a passing test, a merged PR — never on a benchmark or a “did this feel good” vote. What can be proven outranks what is said most fluently.
Explore, never freeze
A Thompson-sampling bandit keeps a floor under every model, so it never freezes yesterday's winner. Models drift; the router keeps testing instead of trusting a stale champion.
A council for the hard calls
When the stakes justify it, several model families answer the same request — and a protected dissenter keeps a seat that can't be voted away. Disagreement is the product.
Measure the system, not the people
Aggregates only — where work is stuck, which model wins what. No per-person scoring, ever. Privacy-first, audit-ready, no card data within the walls.
Yours to run, yours to audit
Self-hosted: data sovereignty by construction. It learns on your outcomes, not population averages, and every routing decision is a record you keep — not the vendor's.
Advice, not authority
The router proposes; it never enacts. Irreversible actions stay behind deterministic controls — a forum's consensus improves a decision, it does not make an action safe.
Against the field
| Capability | Static routers (OpenRouter · RouteLLM · Bedrock · Azure) | AgoraRouter |
|---|---|---|
| Picks a model for you | yes (static rules / pre-trained) | yes — per-request bandit |
| Learns from your verified outcomes | no — preference data or frozen weights | yes — closed feedback loop |
| Convenes a multi-model council | no | yes — for high-stakes classes |
| Client-owned decision audit | platform logs at best | yes — the trail is yours |
| Self-hosted / data sovereignty | mostly SaaS / vendor-locked | yes |
How a request is routed
Classify
The last user message is mapped to a task class (refactor, debug, review…). You can pin it with an X-Task-Class header.
Select
The bandit samples its posterior for that class and picks the model. Or you pin a model and it obeys.
Convene?
High-stakes class → fan out to N diverse families; their answers come back as multiple choices.
Return + learn
Plain OpenAI JSON back, plus an agora record of the decision. Verified outcomes re-weight the next pick.
The decision is echoed in both the response body (agora) and headers (X-Agora-Model, X-Agora-Task-Class, X-Agora-Route-Basis) — so you always know what answered and why.
1Get a key, then run one script
The Router is billed to your own key's budget — get one (self-service) and the scripts wire every agent for you.
Your key
Mint a personal key at https://agora-keys.legate.bot with your @payneteasy.com email. The Router needs scope route.complete and a budget — the default $5/mo key already has both. It looks like agk_live_….
One-shot setup script
The script sets your env vars and writes the config for Continue + Aider, and prints the two clicks for the GUI agents. It backs up every file it touches and deletes nothing.
macOS / Linux
export AGORA_KEY=agk_live_YOUR_KEY curl -fsSL https://agorarouter.com/assets/agora-router-setup.sh -o agora-router-setup.sh bash agora-router-setup.sh source ~/.zshrc # or ~/.bashrc
Windows · PowerShell
$env:AGORA_KEY = "agk_live_YOUR_KEY" irm https://agorarouter.com/assets/agora-router-setup.ps1 -OutFile agora-router-setup.ps1 .\agora-router-setup.ps1
Smoke test
curl https://agora-mcp.legate.bot/v1/chat/completions \
-H "Authorization: Bearer $AGORA_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Say hi in one word."}]}'A clean reply carries an agora field showing the model it routed to. A 401 means the key/header is wrong; 402 no_billing_handle means the key has no budget.
2Per-agent configuration
If you'd rather wire one agent by hand. Everything below is just “OpenAI Compatible · this Base URL · this key · model auto”.
Cline / Roo Code GUI
In the provider dropdown choose OpenAI Compatible and fill:
| Field | Value |
|---|---|
| Base URL | https://agora-mcp.legate.bot/v1 |
| API Key | agk_live_YOUR_KEY |
| Model ID | auto |
Continue (VS Code / JetBrains)
Add to ~/.continue/config.yaml (the script writes this for you):
models:
- name: AgoraRouter (auto)
provider: openai
model: auto
apiBase: https://agora-mcp.legate.bot/v1
apiKey: agk_live_YOUR_KEY
roles: [chat, edit, apply]Aider
export OPENAI_API_BASE=https://agora-mcp.legate.bot/v1 export OPENAI_API_KEY=agk_live_YOUR_KEY aider --model openai/auto
Cursor
- Settings → Models → enable OpenAI API Key.
- Tick Override OpenAI Base URL → https://agora-mcp.legate.bot/v1.
- Paste your agk_live_… key; add a custom model named auto.
Generic — OpenAI SDK
from openai import OpenAI
client = OpenAI(base_url="https://agora-mcp.legate.bot/v1",
api_key="agk_live_YOUR_KEY")
r = client.chat.completions.create(
model="auto", # the Router decides
messages=[{"role":"user","content":"Refactor this loop."}])
print(r.choices[0].message.content)
print(r.model) # which model actually answered3OpenAPI specification
The Router is fully described by an OpenAPI 3.1 document — two endpoints, POST /v1/chat/completions and GET /v1/models, with the Agora extensions (the model: "auto" contract, the X-Task-Class header, ensemble choices, and the agora decision record). Import it into Postman, Insomnia, an SDK generator, or any OpenAPI viewer.
| Method · Path | What it does |
|---|---|
| POST /v1/chat/completions | Chat completion; model chosen by the Router (or pinned). Returns OpenAI shape + agora; high-stakes classes return several choices. |
| GET /v1/models | Routable catalogue: auto plus the candidate aliases you may pin. |