Switchyard¶
Switchyard helps an AI agent choose which model handles each request. Embed its Rust core, libsy, in your gateway or agent harness. Your application keeps its model clients, credentials, and service.
Start with the Rust quickstart: add the crates, run a routing example, and send the selected request through your model client.
Choose a Path¶
| Goal | Path | Start here |
|---|---|---|
| Add routing to your Rust gateway or application | libsy | Rust quickstart |
| Use libsy from Python | Python Bindings | Python embedding |
| Evaluate routing locally with your own models | Local Evaluation | Run the demo server |
| Route Codex or Claude Code using your existing login | Server Path | Single-provider coding agents |
| Add Switchyard routing to NeMo Relay | Native Plugin Path | Use Switchyard with NeMo Relay |
| Point the pi coding agent at the standalone proxy | Server Path | Use Switchyard with pi |
| Point Oh My Pi at the standalone proxy | Server Path | Use Switchyard with Oh My Pi |
The standalone server is for demos, evaluation, and personal use. It is not a supported production deployment path. Its HTTP API supports OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages.
Explore¶
- Benchmarks: compare Terminal-Bench 2.1 and DeepSWE results and open their routing configs
- Core Concepts: learn the LLM client, target, and route layers
- Routing Algorithms: choose how requests select a model
- Architecture: understand libsy and the proxy components
- Server CLI Reference: inspect
switchyard-servercommands and options - Rust API: browse libsy, protocol, and translation crate documentation
- Context-Window Handling: configure eviction and retry behavior
- Tuning: the loop from verifying routing to recording a result
- Troubleshooting: symptoms, silent misconfigurations, and fixes
Reference¶
switchyard-server: server configuration, endpoints, and metricsswitchyard-libsy: embeddable routing algorithmsswitchyard-protocol: provider-neutral API typesswitchyard-translation: protocol translationswitchyard-nemo-relay-plugin: native plugin build and configuration- Dynamo / agentgateway: Switchyard PreProc integration example