> This page is for version Dev.
> For other versions, use one of these documentation indexes:
> - Latest (v0.4.0) (default): https://docs.nvidia.com/nemo/switchyard/latest/llms.txt
> - Dev: https://docs.nvidia.com/nemo/switchyard/dev/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/switchyard/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/switchyard/_mcp/server.

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

Choose where routing belongs in your application. Use an existing integration,
or embed libsy and keep your current model clients.

## Choose a Path \[#choose-a-path]

| Goal                                                | Start here                                                                                                                                                                                                                                | What you own                                                                                                                                                                |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Use routing through an inference provider           | [Switchyard on OpenRouter](https://openrouter.ai/docs/guides/routing/routers/switchyard-router)                                                                                                                                           | Your API requests and provider account. Follow the provider's available algorithms and controls.                                                                            |
| Add routing to your gateway                         | [NeMo Relay](/nemo/switchyard/dev/integrate-switchyard/gateways/nemo-relay) or the experimental [LiteLLM integration](https://github.com/NVIDIA-NeMo/Switchyard/blob/bc716b420f3f76a77c0e93dde08c14b97ec2120f/examples/litellm/README.md) | Gateway deployment, credentials, and operation. Check each integration's limits.                                                                                            |
| Embed routing in a gateway, harness, or application | [Rust quickstart](/nemo/switchyard/dev/get-started/getting-started), then [Mechanics of Libsy](/nemo/switchyard/dev/integrate-switchyard/mechanics-of-libsy)                                                                              | Model execution and application lifecycle. [Python bindings](/nemo/switchyard/dev/integrate-switchyard/embed-in-your-gateway-or-harness#python-bindings) use the same core. |

## Try With a Local Agent \[#try-with-a-local-agent]

The [reference server](/nemo/switchyard/dev/local-demo/run-the-reference-server) gives you a quick way to
try routing with your own models. It demonstrates libsy, protocol conversion, and
configured execution. It is for local demos and personal use, not a supported
production deployment or a service to scale.

Use it with [Claude Code or Codex](/nemo/switchyard/dev/local-demo/local-agents/claude-code-and-codex),
[pi](/nemo/switchyard/dev/local-demo/local-agents/pi), or [Oh My Pi](/nemo/switchyard/dev/local-demo/local-agents/oh-my-pi).

## Explore \[#explore]

* [Benchmarks](/nemo/switchyard/dev/evaluate-and-tune/benchmarks): compare Terminal-Bench 2.1 and DeepSWE results and open their routing configs
* [Mechanics of Libsy](/nemo/switchyard/dev/integrate-switchyard/mechanics-of-libsy): understand steps, calls, and outcomes
* [Switchyard Protocols](/nemo/switchyard/dev/integrate-switchyard/switchyard-protocols/switchyard-protocols): connect your model data to libsy
* [Routing Algorithms](/nemo/switchyard/dev/routing/algorithms/overview): choose how requests select a model
* [Tuning](/nemo/switchyard/dev/evaluate-and-tune/tuning/tuning): find a configuration that meets your objective on your workload
* [Host Integration](/nemo/switchyard/dev/integrate-switchyard/embed-in-your-gateway-or-harness): connect your clients and application lifecycle
* [Rust API](/nemo/switchyard/dev/reference/rust-api): browse the core library, protocols, translation, clients, and runner
* [Context-Window Handling](/nemo/switchyard/dev/reference/context-window-handling): configure eviction and retry behavior
* [Troubleshooting](/nemo/switchyard/dev/reference/troubleshooting): symptoms, silent misconfigurations, and fixes

## Reference \[#reference]

* [`switchyard-libsy` API](https://nvidia-nemo.github.io/Switchyard/rust/switchyard_libsy/): embeddable routing algorithms
* [`switchyard-protocol` API](https://nvidia-nemo.github.io/Switchyard/rust/switchyard_protocol/): provider-neutral model data
* [`switchyard-translation` API](https://nvidia-nemo.github.io/Switchyard/rust/switchyard_translation/): provider-format conversion
* [`switchyard-llm-client` API](https://nvidia-nemo.github.io/Switchyard/rust/switchyard_llm_client/): optional HTTP clients and execution helpers
* [`switchyard-runner` API](https://nvidia-nemo.github.io/Switchyard/rust/switchyard_runner/): configured route construction and execution
* [`switchyard-nemo-relay-plugin`](https://github.com/NVIDIA-NeMo/Switchyard/blob/bc716b420f3f76a77c0e93dde08c14b97ec2120f/crates/switchyard-nemo-relay-plugin/README.md): native plugin build and configuration
* [Dynamo / agentgateway](https://github.com/NVIDIA-NeMo/Switchyard/blob/bc716b420f3f76a77c0e93dde08c14b97ec2120f/examples/dynamo-preproc/README.md): Switchyard PreProc integration example
* [Component responsibilities](/nemo/switchyard/dev/reference/rust-api#crate-boundary): choose the crates your integration needs
* [Demo server CLI](/nemo/switchyard/dev/reference/demo-server/cli): local server commands and options