Skip to navigation

Switchyard

View as Markdown

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

GoalStart hereWhat you own
Use routing through an inference providerSwitchyard on OpenRouterYour API requests and provider account. Follow the provider’s available algorithms and controls.
Add routing to your gatewayNeMo Relay or the experimental LiteLLM integrationGateway deployment, credentials, and operation. Check each integration’s limits.
Embed routing in a gateway, harness, or applicationRust quickstart, then Mechanics of LibsyModel execution and application lifecycle. Python bindings use the same core.

Try With a Local Agent

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, pi, or Oh My Pi.

Explore

Reference