0xPlaygrounds/rig

⚙️🦀 Build modular and scalable LLM Applications in Rust

What it solves

Rig is a Rust library designed to simplify the development of scalable and modular LLM-powered applications. It reduces the boilerplate required to integrate various AI models and vector stores, providing a unified interface for developers to build agentic workflows without being locked into a specific provider.

How it works

Rig separates its architecture into two main components: rig-core, which provides provider-neutral contracts for messages, completion models, and vector stores, and rig-agent, which handles agent orchestration, including prompting, streaming, and state management. This modular approach allows developers to use the root rig facade to access both core abstractions and high-level agent builders.

Who it’s for

Rust developers building AI agents, chatbots, and RAG-based applications who need a consistent API across multiple model providers and vector databases.

Highlights

  • Unified Interface: Access to 20+ model providers and 10+ vector store integrations through a single API.
  • Agentic Workflows: Support for multi-turn streaming, prompting, and a serializable state machine for agent runs.
  • Broad Capability Support: Handles LLM completion, embeddings, transcription, audio generation, and image generation.
  • WASM Compatibility: The portable core and classic runtime are fully compatible with WebAssembly.
  • Standardized Observability: Full compatibility with the GenAI Semantic Convention for OpenTelemetry.