Choose the crates your integration needs. The links below open generated Rust API documentation for the core library and its optional supporting components.
Use libsy to construct the model pool, run built-in routing algorithms, implement a custom algorithm, or handle requested work through the Step stream.
Open the generated libsy API documentation
Use protocol types for normalized conversations, response streams, routed LLM clients, decisions, metadata, and wire-format identifiers.
Open the generated protocol API documentation
Use translation to convert requests, responses, and streams between OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages formats.
Open the generated translation API documentation
Use the optional HTTP clients for LLM and decision calls, or the supplied execution helpers when your application does not drive the step stream itself.
Open the generated client API documentation
Use the optional runner to load TOML configuration, resolve named routes, and
execute them inside a serving integration. See
Runner
and the configuration reference.
Open the generated runner API documentation
For field meanings and provider API mappings, use the LLM protocol reference or decision protocol reference.
Use the Rust quickstart for compatible dependency versions. Mechanics of Libsy explains how these crates work together during a run.
Import algorithms and orchestration types from switchyard_libsy. Import
requests, responses, metadata, decisions, and LLM client traits from
switchyard_protocol. Keep both dependencies on compatible versions.
Add switchyard-translation when your application directly converts requests,
responses, or streams between provider formats. Use a version compatible with
your other Switchyard dependencies.
The runner and HTTP client are optional for direct libsy integration. Your host can construct the algorithm and execute the requested work itself. The demo server is a reference application around the runner; Python bindings expose the same routing core to Python applications.