Artificial Intelligence · Open source · Rust
Build AI agents
in Rust
A modular, high-performance library for LLM apps and agents. One unified API across 20+ providers, type-safe tools and structured output — production-ready.
$
cargo add rig8K+GitHub stars
2.7M+Downloads
230+Contributors
79K+ stars across 204+ repos
use rig::{completion::Prompt, providers::openai};
let openai = openai::Client::from_env()?;
let agent = openai.agent("gpt-5.5")
.preamble("You are a helpful assistant.")
.build();
let response = agent
.prompt("What is Rust?")
.await?;output
routing: openai/gpt-5.5 · tokens: 128 · 42ms · response streamed OK
Trusted byteams shipping AI in production
St. Jude Children's Research Hospital
Coral Protocol
Dria
Nethermind
App.build (Neon)
Grafbase
Ryzome
OpenAgents
MCP Rust SDK
Probe
Linera
Microsoft Agent Governance Toolkit
NEAR AI
ilert
Archestra
Syncable
Con
ChatShell
Cairnify
Refresh Agent
nitpikModel Providers20+ supported
Cohere
EternalAI
Google Gemini
Galadriel
Groq
Mira
TogetherAI
AWS BedrockVector Stores10+ supported
MongoDB
LanceDB
Neo4j
Qdrant
Milvus
PostgreSQLQuick install
Add Rig in one line
Drop it into any Cargo project. Ship it as a single binary or compile to WASM for server, edge, and browser environments.
Then read the quickstartbash
$cargo add rigUse cases
What developers build with Rig
One set of composable primitives, from a single-file script to a production agent, running on servers, at the edge, and in the browser.
- Coding agents & terminal tools
- RAG & document Q&A
- Multi-agent workflows & data pipelines
- MCP servers & tool integrations
- Single-binary & WASM deployments
