Favicon of Rig

Rig

A Rust AI agent library with optional local model support through Candle, a shared API for cloud providers, type-safe tools and structured output.

Screenshot of Rig website

Rig is a Rust library for developers building AI agents and LLM applications. It provides a shared interface across model providers and vector stores for applications that need to work with different backends.

  • Local and cloud models: The optional Candle integration runs Llama, SmolLM2 and Qwen3 locally; integrations with AWS Bedrock and Google Vertex AI send model calls to those external services.
  • Agent conversations: Agents can call type-safe tools, return structured output and stream responses across multiple turns, with conversation memory and optional history policies.
  • Document search: Build embedding and vector search workflows using the built-in in-memory store or optional integrations with Qdrant, LanceDB, PostgreSQL and Milvus.
  • Audio and images: Add transcription, audio generation and image generation when the chosen model backend supports those capabilities.
  • Recording and replay: The optional cassette feature lets developers record agent execution, replay it, check replay compatibility and retain checkpoints.

Rig is open source under the MIT license and becomes part of your own Rust application. Its portable core and default classic agent runtime support browser WebAssembly. MCP support is limited to native applications, and WASI isn't supported.

Similar to Rig