Home/Rig
Rig logo

Rig

Rig is an open-source Rust library for building LLM applications and agents with one API for providers, typed tools, structured output, streaming, RAG, and multi-agent workflows.

Visit website

Product overview

What is Rig?

Rig is a modular Rust library for building LLM-powered applications and AI agents. It provides a unified API across more than 20 model providers and uses Rust types for tool arguments, structured outputs, errors, and asynchronous execution. The same builder pattern scales from a basic completion to streaming, retrieval-augmented generation, tool execution, and multi-agent workflows.

How to Use Rig

  1. Add the Rig crate to a Rust project.
  2. Configure a supported model provider through environment settings.
  3. Create a provider client and build an agent with instructions.
  4. Attach typed Rust functions as tools or a vector index for retrieval.
  5. Prompt or stream the agent, then add tracing and tests for production workflows.

Core Features

  • Unified provider API: Connects applications to more than 20 model providers.
  • Type-safe tools: Registers ordinary Rust functions with compile-time checked inputs and outputs.
  • Streaming: Exposes token chunks for interactive interfaces and command-line tools.
  • RAG: Adds provider-neutral embeddings and pluggable vector stores.
  • Multi-agent workflows: Routes work, runs specialized agents in parallel, and merges results.
  • Production testing: Supports tracing hooks, mock models, and recorded cassette tests.

Use Cases

  • Coding agents: Build assistants and terminal tools with real tool execution.
  • RAG applications: Retrieve documents from a vector store before generating a response.
  • Data workflows: Process and analyze data with model-powered pipelines.
  • Edge AI applications: Compile a Rust application to a server binary or WebAssembly.

Pricing

Rig is open source, MIT licensed, and free.

Frequently Asked Questions

Which language does Rig use?

Rig is a Rust library and exposes Rust-native builders, types, and async APIs.

Can Rig use local models?

Yes. The provider list includes Ollama alongside hosted providers.

Does Rig support MCP?

The website states that Rig can route to MCP servers through its composable interface.

Back to product directory

Related products

OpenAI Codex is an AI coding product for delegating scoped repository tasks and reviewing the resulting changes.

Claude Code is Anthropic’s AI coding product for iterative repository work through supported development surfaces.

Gemini CLI is Google’s open-source AI agent for terminal workflows and local development tasks.

Newsletter

Keep up with useful AI products

Get a concise selection of new products, practical use cases, and builder updates.