Overview
Experiential is an open-source gateway and router for agent workflows. It does three things: it puts hosted, BYOK, local and custom models behind one OpenAI-compatible API; it controls which users and agents may use which models, for which use cases, and how much they can spend; and it turns production traffic into a custom router — or a custom model — optimised for quality, speed and cost.
The local gateway is a pip install and a single command. On first run a setup wizard walks through provider connections, model and reasoning-effort selection, then shows defaults for the public alias, the identity and a command budget before printing a one-time key. From there the gateway serves the usual /v1/chat/completions surface on loopback, backed by a compiled native data plane, and a Python helper loads a fitted project router as an ordinary OpenAI client.
The optimisation path starts from OpenTelemetry traces of your existing agent: exp build walks you through providers, models and budget and constructs a simulation from those traces, against which a router is optimised; exp optimize model then fine-tunes an open-source model you own. A hosted gateway serving the same OpenAI-compatible and Anthropic Messages APIs is available if you would rather not run one, and the repository ships copy-paste setup prompts you can hand to a coding agent. Anonymous aggregate product telemetry is on by default and can be turned off with exp config telemetry disable.
What it does
- One OpenAI-compatible API over hosted, BYOK, local and custom models, with the hosted gateway also serving the Anthropic Messages API
- Per-identity governance: which users and agents can reach which models, for which use cases, and under what spend budget
- Router fitting from your own OpenTelemetry traces — exp build constructs a simulation and optimises a router against it
- exp optimize model fine-tunes an open-source model you own from the traffic the router collected
- Local single-command gateway with a first-run setup wizard, a compiled native data plane, and a one-time issued key
- exp.load_router() returns a fitted project router as an official OpenAI client backed by its own private gateway
Getting started
Install the package and run exp; the first-run wizard handles providers, the public alias, the identity and a command budget, then prints a one-time key.
Start a local gateway
The wizard persists every selected provider connection and prints the key once. Choose a public alias such as opus-5 during setup.
pip install experiential
expSend a request
The gateway serves the OpenAI chat-completions surface on loopback at port 8000.
export EXP_GATEWAY_KEY=...
curl http://127.0.0.1:8000/v1/chat/completions \
-H "Authorization: Bearer $EXP_GATEWAY_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"opus-5","messages":[{"role":"user","content":"Help me"}]}'Build a router from your traces
Collect OpenTelemetry traces from your current agent, then build a project: the command walks through providers, models and budget and asks for the trace file. A public terminal-tasks OTLP dataset is available if you just want to try it.
exp build support-agentLoad the fitted router from Python
load_router returns an official OpenAI client backed by the router's own private gateway.
import exp
with exp.load_router("my-project") as client:
response = client.chat.completions.create(
model="my-project",
messages=[{"role": "user", "content": "hello"}],
)Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Give a team one endpoint and one key format across several model providers, without rewriting each agent for each vendor
- Cap what an individual agent or user can spend, and restrict which models it may reach, before the bill arrives
- Repoint existing coding agents (Claude Code, Cursor, Codex, Aider) at a gateway you control so their traffic is logged and governed
- Turn recorded production traces into a cheaper routing policy, or into a fine-tuned open-source model you own
How Experiential compares
Experiential alongside other open-source gateways & routing tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| OmniRoute | ★ 68.5k | A local-first AI gateway that fronts hundreds of model providers with one OpenAI-compatible endpoint, quota-aware auto-fallback, many routing strategies and prompt compression. |
| LiteLLM | ★ 59.2k | A Python SDK and proxy server that gives one OpenAI-compatible API to 100+ LLM providers, with cost tracking, budgets, fallbacks, rate limiting, and an admin UI. |
| Free Claude Code | ★ 55.5k | A local proxy that points Claude Code, Codex, Pi, OpenCode, Cline and other agent CLIs at 50 free, paid, subscription or local model providers, with automatic failover and an admin UI. |
| Kong Gateway | ★ 44.2k | A Lua/NGINX API gateway whose AI Gateway plugins put one universal endpoint in front of OpenAI, Anthropic, Gemini, Bedrock and other providers, with semantic routing, caching and MCP traffic governance. |
| 9Router | ★ 29.4k | Local OpenAI-compatible router for coding CLIs that tracks per-provider quota, falls back from subscription to cheap to free models, and compresses tool results to cut tokens. |
| Apache APISIX | ★ 17.1k | A cloud-native API gateway whose AI plugins add multi-provider LLM proxying, load balancing, retries and fallbacks, token-based rate limiting, and content moderation. |
| OpenCodex | ★ 15.6k | Local proxy that translates the Codex Responses API to 40+ providers, so Codex CLI, Claude Code and Grok Build can run on any model, with routing combos, failover and account pooling. |
| Experiential | ★ 5.3k | One OpenAI-compatible control plane over hosted, BYOK, local and custom models |