AgoraRouter · OpenAI-compatible

The model you don't have to choose

Elige causam, non oraculum— choose the cause, not the oracle

Point any coding agent at one endpoint and send model: "auto". Agora classifies the request, routes it to the right model — or convenes a council of several — and learns which mind wins which task from verified outcomes, not benchmarks.

Base URL · https://agora-mcp.legate.bot/v1

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).

Veritas · P1

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.

Exploratio · P4

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.

Diversitas · P3

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.

Custodia · P5

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.

Dominium · self-host

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.

Probatio · P8

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

CapabilityStatic routers (OpenRouter · RouteLLM · Bedrock · Azure)AgoraRouter
Picks a model for youyes (static rules / pre-trained)yes — per-request bandit
Learns from your verified outcomesno — preference data or frozen weightsyes — closed feedback loop
Convenes a multi-model councilnoyes — for high-stakes classes
Client-owned decision auditplatform logs at bestyes — the trail is yours
Self-hosted / data sovereigntymostly SaaS / vendor-lockedyes

How a request is routed

I

Classify

The last user message is mapped to a task class (refactor, debug, review…). You can pin it with an X-Task-Class header.

II

Select

The bandit samples its posterior for that class and picks the model. Or you pin a model and it obeys.

III

Convene?

High-stakes class → fan out to N diverse families; their answers come back as multiple choices.

IV

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

bash
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

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
The only thing every agent needs: Base URL https://agora-mcp.legate.bot/v1, your agk_live_… key, and model auto. The script just sets those everywhere.

Smoke test

bash
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:

FieldValue
Base URLhttps://agora-mcp.legate.bot/v1
API Keyagk_live_YOUR_KEY
Model IDauto

Continue (VS Code / JetBrains)

Add to ~/.continue/config.yaml (the script writes this for you):

~/.continue/config.yaml
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

bash
export OPENAI_API_BASE=https://agora-mcp.legate.bot/v1
export OPENAI_API_KEY=agk_live_YOUR_KEY
aider --model openai/auto

Cursor

  1. Settings → Models → enable OpenAI API Key.
  2. Tick Override OpenAI Base URLhttps://agora-mcp.legate.bot/v1.
  3. Paste your agk_live_… key; add a custom model named auto.
Cursor routes some features through its own cloud; the override applies to the models you add. For a fully self-routed setup, Cline / Continue / Aider honour the Base URL for every call.

Generic — OpenAI SDK

python
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 answered

3OpenAPI 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 · PathWhat it does
POST /v1/chat/completionsChat completion; model chosen by the Router (or pinned). Returns OpenAI shape + agora; high-stakes classes return several choices.
GET /v1/modelsRoutable catalogue: auto plus the candidate aliases you may pin.
Auth is a bearer agk_live_… key with the route.complete scope; the key's own budget is billed (fail-closed at 429). A compliance gate scrubs cardholder data on the way in and out.