rig: a Rust library for building modular LLM applications with a unified interface for 20+ model providers and 10+ vector stores

rig: a Rust library for building modular LLM applications with a unified interface for 20+ model providers and 10+ vector stores

What it solves

Rig provides a unified, ergonomic interface for building LLM-powered applications in Rust. It eliminates the need for writing repetitive boilerplate code when integrating multiple AI model providers and vector stores, allowing developers to switch between providers without changing their core application logic.

How it works

Rig acts as an abstraction layer (a facade) over various AI services. It provides a singular unified interface for LLM completion, embeddings, and agentic workflows. It supports multi-turn streaming and prompting, and is compatible with the GenAI Semantic Convention for observability.

Who it’s for

Rust developers who want to build scalable, modular AI agents and LLM applications with minimal boilerplate and the flexibility to use different model providers and vector databases.

Highlights

  • Unified Interface: Access to 20+ model providers and 10+ vector store integrations under one API.
  • Agentic Capabilities: Built-in support for multi-turn streaming, prompting, and agentic workflows.
  • Broad Modality Support: Supports text completion, embeddings, transcription, audio generation, and image generation.
  • WASM Compatibility: The core library is fully compatible with WebAssembly.
  • Extensive Integrations: Includes native support for providers like AWS Bedrock, Google Gemini, and vector stores like Qdrant, MongoDB, and PostgreSQL.

Sources