0xPlaygrounds/rig

โ–ฒ 19 stars todayโ˜… 9,189โ‘‚ 1,026

โš™๏ธ๐Ÿฆ€ Build modular and scalable LLM Applications in Rust

About 0xPlaygrounds/rig

0xPlaygrounds/rig is an open-source project on GitHub, mainly written in Rust. โš™๏ธ๐Ÿฆ€ Build modular and scalable LLM Applications in Rust It currently holds 9,189 stars and 1,026 forks with 63 open issues, and was last pushed on 2026-11-19 (repository created 2024-06-05).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #58 with 19 new stars today.

GitHub Repository Details

Repository 0xPlaygrounds/rig ยท default branch main ยท size 175852 KB ยท watchers 58 ยท source: GitHub REST API and repository README

README

https://github.com/0xPlaygrounds/rig/blob/HEAD/Rig

crates.io docs.rs Discord https://github.com/0xPlaygrounds/rig/blob/HEAD/Ryzome

Rig is a Rust library for building applications on large language models. It also ships rig, a terminal coding agent built on the library that you extend with Bevy plugins.

The coding agent

cargo install rig
rig

This installs the launcher. Until the next release it is 0.46.0, and its guide is on its tag. The agent guide describes main and how to install it from a checkout. The agent needs Rust 1.97.1 or newer and runs on Linux and macOS.

The first rig builds the agent, which takes several minutes, and opens it. Run /login to sign in or save an API key, or export one such as OPENAI_API_KEY before starting. /model picks a model and /help lists the commands. rig -p "fix the failing test" answers one prompt and exits.

Its tools, commands, sessions, sign-in and terminal view are each a plugin, so any of them can be turned off, replaced or added to. /reload rebuilds the agent with your changes and keeps the session.

settings and scripting. plugin and points at working examples of each kind.

The library

cargo add rig anyhow
cargo add tokio --features macros,rt-multi-thread
use rig::prelude::*;
use rig::providers::openai::{self, OpenAI};

[tokio::main]

async fn main() -> anyhow::Result<()> { // Reads OPENAI_API_KEY. let model = OpenAI::from_env()?.completion(openai::GPT_6_2_SOL); let agent = AgentBuilder::new(model) .preamble("You are a comedian.") .build();

let response = agent.prompt("Entertain me!").await?; println!("{}", response.output()); Ok(()) }

Rig puts over 20 model providers and a dozen vector stores behind one interface. It has agents with tools, streaming and typed hooks. It covers completion, embedding, transcription, audio and image models and follows the OpenTelemetry GenAI conventions. rig-core and rig-agent build for browser WASM. See examples/, the guides and the API reference.

Crates

The rig crate re-exports rig-core. Its default features add rig-agent, the derive macros, the reqwest HTTP client with rustls and, on native targets, the rig launcher (feature cli, from rig-cli); default-features = false leaves them out. Each crate in the list below is a feature named after it without rig-:

cargo add rig --features memory,fastembed
rig-memory (saved conversations), rig-cassette (record and replay), rig-rmcp (MCP tools). rig-vertexai, rig-gemini-grpc, rig-candle (local models), rig-fastembed (local embeddings), rig-typesafeai (TypeSafe Jev judgments).

The vector stores, such as LanceDB, Qdrant and PostgreSQL, are companion crates behind features too; docs.rs lists every feature.

Internals: rig-core (messages, models, tools, providers), rig-derive (feature derive), rig-http (transport traits), rig-reqwest (feature reqwest) and rig-tungstenite (feature websocket).

Coding agent: rig-cli (feature cli, the library of the rig binary) and, not facade features, rig-harness, rig-harness-protocol, rig-ecs, rig-tools, rig-markdown, and the plugins rig-basics, rig-tui, rig-fold, rig-steel, rig-mcp-client, rig-acp, rig-inspect, rig-traffic and rig-claude-cloak.

Community

Ask questions on Discord. CONTRIBUTING.md says how to contribute, and awesome-rig lists projects built on Rig.

Rig is pre-1.0, so releases break APIs. The changelog and migration notes say what changed. Rig is MIT licensed.

https://github.com/0xPlaygrounds/rig/blob/HEAD/Built by Playgrounds

GitHub Stars & Activity

9,189Stars
1,026Forks
63Open issues
RustLanguage

GitHub Popularity

GitHub stars9,189
Forks1,026
Open issues63
Primary languageRust
LicenseMIT
Stars gained today19
Created2024-06-05
Last pushed2026-11-19

Trending History

Daily boardrank #58 ยท โ–ฒ 19 stars

Related AI Projects

1

rtk-ai / rtk

Rustโ˜… 87,593โ‘‚ 5,627โ–ฒ 100 stars
โ†’
2

janhq / jan

Rustโ˜… 46,048โ‘‚ 3,245โ–ฒ 36 stars
โ†’
3

t8y2 / dbx

Rustโ˜… 31,224โ‘‚ 2,841โ–ฒ 95 stars
โ†’
4

EL4CTEO / fast-anything

Rustโ˜… 3,034โ‘‚ 194
โ†’
5

erkamyaman / safe-anything

Rustโ˜… 431โ‘‚ 31
โ†’
6

mattpocock / skills

Shellโ˜… 331,272โ‘‚ 27,830โ–ฒ 759 stars
โ†’
7

obra / superpowers

Shellโ˜… 324,910โ‘‚ 28,822โ–ฒ 838 stars
โ†’
8

affaan-m / ECC

JavaScriptโ˜… 309,467โ‘‚ 45,523โ–ฒ 649 stars
โ†’

More AI Rankings