Orchestra-rs
A Rust crate for building AI agent workflows and applications. Orchestra-rs provides a powerful, type-safe framework for orchestrating production-ready applications powered by Large Language Models (LLMs).
Vision
The goal of Orchestra-rs is to be the LangChain of the Rust ecosystem. We aim to provide a composable, safe, and efficient set of tools to chain together calls to LLMs, APIs, and other data sources. By leveraging Rust's powerful type system and performance, Orchestra-rs empowers developers to build reliable and scalable AI applications and intelligent agents with confidence.
Features
- ๐ Type-safe LLM interactions - Leverage Rust's type system for reliable AI applications
- ๐ Multiple provider support - Currently supports Google Gemini, with more providers coming
- ๐ ๏ธ Flexible configuration - Builder patterns and validation for model configurations
- ๐ Rich message types - Support for text, mixed content, and future tool calling
- ๐งช Comprehensive testing - Built-in mock providers and extensive test coverage
- โก Async/await support - Built for modern async Rust applications
- ๐ Error handling - Comprehensive error types with context
Quick Start
Add Orchestra-rs to your Cargo.toml:
[]
= { = "." } # Will be published to crates.io soon
= { = "1.0", = ["full"] }
Basic Usage
use ;
async
Advanced Configuration
use ;
async
Chat with History
use ;
async
Using Presets
use ;
async
Supported Providers
Google Gemini
Currently supported models:
gemini-2.5-flash-litegemini-2.5-progemini-2.5-flashgemini-2.0-flash-litegemini-2.0-flashgemini-1.5-pro
Setup:
- Get an API key from Google AI Studio
- Set the environment variable:
GEMINI_API_KEY=your-api-key
Coming Soon
- OpenAI GPT models
- Anthropic Claude
- Local models via Ollama
- Azure OpenAI
Architecture
Orchestra-rs is built with a modular architecture:
- Core Types: Message types, model configurations, and error handling
- Providers: Pluggable LLM provider implementations
- LLM Interface: High-level interface for interacting with any provider
- Configuration: Flexible configuration with validation and presets
Error Handling
Orchestra-rs provides comprehensive error handling with context:
use ;
async
Testing
Orchestra-rs includes comprehensive testing utilities:
use ;
async
Architecture Documentation
For a detailed overview of the library's architecture, please refer to the architecture documentation.
Project Status
๐ฑ Early Development Stage
Orchestra-rs is in active development. The core APIs are stabilizing, but may still change. This is a great time to get involved and help shape the future of the framework.
Roadmap
- Core message and configuration types
- Google Gemini provider
- Comprehensive error handling
- Testing utilities and mock providers
- Tool calling support
- Streaming responses
- Additional providers (OpenAI, Anthropic, etc.)
- Agent workflows and chains
- Memory and context management
- Plugin system
License
This project is licensed under the MIT License - see the LICENSE file for details.