Rig is a Rust library for building scalable, modular LLM-powered applications. It provides agent runtimes, provider abstractions, and multiple integrations for model and vector store backends.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
Rig is a Rust library for building scalable, modular, and ergonomic LLM-powered applications.
How it works
Rig separates portable provider/backend contracts from agent orchestration. The root rig facade re-exports both rig-core (provider-neutral messages, completion models, portable tools, memory and vector-store contracts) and rig-agent (builder, prompt/streaming traits, hooks, tools, and the AgentRun state machine). It supports multiple integrations via per-feature crates (e.g., rig-bedrock, rig-s3vectors, rig-fastembed, rig-qdrant, etc.).
Getting started
cargo add rig
# or: cargo add rig-core
Simple example
use rig::prelude::*;
use rig::providers::openai;
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
// Create OpenAI client
let client = openai::Client::from_env()?;
// Create agent with a single context prompt
let comedian_agent = client
.agent(openai::GPT_5_2)
.preamble("You are a comedian here to entertain the user using humour and jokes.")
.build();
// Prompt the agent and print the response
let response = comedian_agent.prompt("Entertain me!").await?;
println!("{response}");
Ok(())
}
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 each crate's examples directory, and provider-specific integration coverage under tests/providers. See tests/README.md for test target, replay, record, and cassette safety commands. More detailed use case walkthroughs are regularly published on the Rig Dev.to Blog and in Rig's official documentation at rig.rs/docs.
Supported Integrations
The root rig facade exposes companion crates behind one feature per integration. Examples of integration crates include:
- rig-bedrock
- rig-s3vectors
- rig-candle
- rig-vectorize
- rig-fastembed
- rig-gemini-grpc
- rig-vertexai
- rig-helixdb
- rig-lancedb
- rig-memory
- rig-milvus
- rig-mongodb
- rig-neo4j
- rig-postgres
- rig-qdrant
- rig-scylladb
- rig-sqlite
- rig-surrealdb
rig::memory is available without the memory feature; it contains core memory traits and an in-memory backend re-exported from rig-core. Enabling features = ["memory"] adds reusable history-shaping policy types from the rig-memory crate.
We also have rig-onchain-kit for Rig Onchain Kit functionality.
Get started (additional context)
Rig targets both portable provider contracts and agent orchestration, with explicit separation between rig-core (providers, memory, vector stores, etc.) and rig-agent (agent runtime, prompts, hooks, and state machine).
Features (highlights)
- Agentic workflows with multi-turn streaming and prompting
- Default classic agent runtime
- GenAI Semantic Convention compatibility
- 20+ model providers under one interface
- 10+ vector store integrations under one interface
- Full support for LLM completion and embedding workflows
- Support for transcription, audio generation and image generation model capabilities
- WASM support for portable core and classic runtime (target matrix detailed in crate READMEs)






