Rig
Rig is a Rust library for building LLM-powered applications that focuses on ergonomics and modularity.
More information about this crate can be found in the crate documentation.
Table of contents
Features
- Portable contracts for agent runtimes, including completions, messages, tools, and memory
- Full GenAI Semantic Convention compatibility
- 20+ model providers, all under one singular unified interface
- 10+ vector store integrations, all under one singular unified interface
- Full support for LLM completion and embedding workflows
- Support for transcription, audio generation and image generation model capabilities
- Integrate LLMs in your app with minimal boilerplate
- Full WASM compatibility (core library only)
Installation
WASM target support
rig-core supports the browser-oriented wasm32-unknown-unknown target. When
the pdf feature is enabled, the host must provide the Web Crypto API's
Crypto.getRandomValues implementation, as modern browsers, Web Workers, and
Node.js 19 or later do. WASI targets are not supported.
Simple example
use ;
async
Note using #[tokio::main] requires you enable tokio's macros and rt-multi-thread features
or just full to enable all features (cargo add tokio --features macros,rt-multi-thread).
You can find more examples in the repository-level examples/ directory. Many provider-specific examples now also live as ignored live integration tests under the repository-level tests/providers directory, organized by provider. When running those provider-backed tests, prefer provider-specific targets such as cargo test -p rig --test openai -- --ignored --test-threads=1 to avoid rate-limiting. More detailed walkthroughs are regularly published on our Dev.to blog and added to Rig's official documentation at docs.rig.rs.
Integrations
Rig supports the following LLM providers out of the box:
- Anthropic
- Azure OpenAI
- ChatGPT and GitHub Copilot auth-backed clients
- Cohere
- DeepSeek
- Gemini
- Groq
- Hugging Face
- Hyperbolic
- Llamafile
- MiniMax
- Mira
- Mistral
- Moonshot
- Ollama
- OpenAI
- OpenRouter
- Perplexity
- Together
- Venice
- Voyage AI
- xAI
- Xiaomi MiMo
- Z.ai
Vector stores are available as separate companion-crates and as feature-gated modules on the root rig facade:
= { = "0.36.0", = ["lancedb", "fastembed"] }
- MongoDB:
rig-mongodb - LanceDB:
rig-lancedb - Neo4j:
rig-neo4j - Qdrant:
rig-qdrant - SQLite:
rig-sqlite - SurrealDB:
rig-surrealdb - Milvus:
rig-milvus - ScyllaDB:
rig-scylladb - AWS S3Vectors:
rig-s3vectors - HelixDB:
rig-helixdb - Cloudflare Vectorize:
rig-vectorize
The following providers are available as separate companion-crates:
- AWS Bedrock:
rig-bedrock - Fastembed:
rig-fastembed - Google Gemini gRPC:
rig-gemini-grpc - Google Vertex:
rig-vertexai
Who is using Rig?
Below is a non-exhaustive list of companies and people who are using Rig:
- St Jude - Using Rig for a chatbot utility as part of
proteinpaint, a genomics visualisation tool. - Coral Protocol - Using Rig extensively, both internally as well as part of the Coral Rust SDK.
- VT Code - VT Code is a Rust-based terminal coding agent with semantic code intelligence via Tree-sitter and ast-grep. VT Code uses
rigfor simplifying LLM calls and implement model picker. - Dria - a decentralised AI network. Currently using Rig as part of their compute node.
- Nethermind - Using Rig as part of their Neural Interconnected Nodes Engine framework.
- Neon - Using Rig for their app.build V2 reboot in Rust.
- Listen - A framework aiming to become the go-to framework for AI portfolio management agents. Powers the Listen app.
- Cairnify - helps users find documents, links, and information instantly through an intelligent search bar. Rig provides the agentic foundation behind Cairnify’s AI search experience, enabling tool-calling, reasoning, and retrieval workflows.
- Ironclaw - A secure personal AI assistant
Are you also using Rig in production? Open an issue to have your name added!