Experiential is an open source gateway and router for agent workflows:
- Use hosted, BYOK, and local models through one OpenAI-compatible API.
- Control which users and agents can use which models, for which use cases, and how much they can spend.
- Turn production traffic into a custom router or model optimized for quality, speed, and cost.
Start a local OpenAI-compatible gateway. On first run, the setup wizard uses the shared provider,
model, and reasoning-effort selectors, persists every selected provider connection, then shows
defaults for the public alias, identity, and $50.00 command budget before printing a one-time key:
pip install experiential
expChoose a public alias such as support-agent, capture the issued key, and send a request:
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":"support-agent","messages":[{"role":"user","content":"Help me"}]}'Prefer a managed gateway to running one locally? The hosted platform at
platform.experientiallabs.ai serves the same
OpenAI-compatible (and Anthropic Messages) API at https://api.experientiallabs.ai/v1.
See SETUP.md for copy-paste prompts you hand to your coding agent
(Claude Code, Cursor, Codex, and similar); the agent runs the setup for you. It
collects four prompts:
- Upload your LLM traces as telemetry: create an account instantly from your email, then pull or upload your existing LLM traces onto the platform as telemetry.
- Connect your inference provider keys (BYOK): create an account, then connect your own OpenAI, Anthropic, Gemini, Azure, Bedrock, Fireworks, or OpenRouter keys for free pass-through.
- Start calling models on the gateway: make your first
/v1call with the OpenAI and Anthropic SDKs using anxpl_key, and optionally repoint your existing coding agents. - Full onboarding: create an account instantly from your email, connect your keys, import your spend, then repoint every coding agent (Claude Code, Cursor, Codex, Aider, and similar) or Conductor at the gateway.
Create a local gateway programmatically:
import uvicorn
from exp.runtime.gateway.lifecycle import load_local_gateway
gateway = load_local_gateway()
uvicorn.run(gateway.app, lifespan="on")For hosted workers with their own storage and provider services, use the lower-level
exp.create_gateway_runtime(...) composition API.
First, collect OpenTelemetry traces from your current agent. If you just want to try it out, grab the public terminal-tasks OTLP dataset:
curl -L -o traces.otel.jsonl \
https://huggingface.co/datasets/experiential-labs/wmo-terminal-tasks-traces/resolve/540883e451dc13d34fb50fdd36b143cb0f1fb0db/traces.otel.jsonlThen build a project. The build command walks you through providers, models, and budget, and asks for your trace file:
# Build simulation from your agent traces and optimize a router against it
exp build support-agentAfter collecting traces from your router, fine-tune an open source model you own using Tinker.
exp optimize model support-agentAnonymous aggregate PostHog product telemetry is enabled by default. It never includes prompts, traces, actions, observations, paths, model names, credentials, or raw customer content.
exp config telemetry status
exp config telemetry disable
exp config telemetry enableThe preference is stored locally in .exp/settings.toml.
uv sync --extra dev
uv run ruff format --check .
uv run ruff check .
uv run ty check
uv run pytest -qRepository and documentation conventions live in AGENTS.md.
