Best AI Agent Frameworks for Rust in 2026: Rig, Swiftide
The short answer
Start with Rig for Rust agents, use Swiftide for retrieval-heavy pipelines, and add the official rmcp crate for MCP tools. As of November 28, 2026:
- Rig: best overall agent and LLM application framework.
- Swiftide: best for streaming indexing and RAG pipelines.
- genai: best thin multi-provider client when you do not want a framework.
- rmcp (official MCP Rust SDK): the standard way to speak MCP.
- langchain-rust and AutoAgents: niche options for LangChain-style chains and multi-agent experiments.
Working in Go or .NET instead? See the best AI agent frameworks for Go and for .NET.
The comparison
| Library | Role | License | GitHub stars | Latest release (Nov 28, 2026) | Pick it for |
|---|---|---|---|---|---|
| Rig (rig-core) | Agents, tools, embeddings, vector stores | MIT | ~9,300 | 0.47.1 (Nov 25, 2026) | Most Rust agent apps |
| Swiftide | Indexing, query and agent pipelines | MIT | ~800 | 0.34.0 (Nov 6, 2026) | RAG and streaming ingestion |
| genai | Multi-provider chat client | Apache-2.0 | ~950 | 0.7.6 (Nov 28, 2026) | One API over many providers |
| async-openai | OpenAI API client | MIT | ~2,000 | 0.43.0 (Nov 1, 2026) | OpenAI-compatible endpoints |
| rmcp | Official MCP SDK | see repo | ~4,200 | 3.12.0 (Nov 26, 2026) | MCP servers and clients |
| langchain-rust | LangChain-style chains | MIT | ~1,400 | v8.0.0 (Nov 3, 2026) | Teams porting LangChain designs |
| AutoAgents | Multi-agent framework | Apache-2.0 | ~800 | 0.4.0 (Jul 8, 2026) | Experiments; slower release pace |
Stars and releases were read from GitHub and crates.io on November 28, 2026.
1. Rig: best overall
Rig describes itself as a library to “build modular and scalable LLM applications in Rust”. Its core idea is a set of traits (completion models, embedding models, vector stores, tools) with many provider implementations, so an agent written against Rig can switch from OpenAI to Anthropic or a local model by changing the client. Agents combine a model, a preamble, tools and optional dynamic context from a vector store. Releases are frequent (0.47.0 on November 20 and 0.47.1 on November 25, 2026), and it is by far the most downloaded crate in this group. It has not reached 1.0, so pin versions and read release notes.
2. Swiftide: best for retrieval pipelines
Swiftide focuses on fast, streaming indexing and query pipelines: load documents, chunk, enrich with an LLM, embed and store, then retrieve and answer, with agent support on top. Pick it when most of your work is getting data into a vector store reliably and quickly. For the retrieval side in general, see how to add a reranker to a RAG pipeline.
3. Thin clients: genai and async-openai
Many Rust services need nothing more than a typed client and a loop. genai (Apache-2.0) offers one interface over OpenAI, Anthropic, Gemini, Ollama, DeepSeek, OpenRouter and more. async-openai is the long-standing typed client for OpenAI’s API and works with any OpenAI-compatible endpoint. Write your own agent loop on top: send messages with tool definitions, run the tools the model requests, append results, repeat.
4. MCP: rmcp
The official Rust SDK for the Model Context Protocol, rmcp, lets a Rust program act as an MCP server (exposing tools and resources to Claude, ChatGPT, Cursor and other clients) or as a client calling other MCP servers. Version 3.12.0 shipped on November 26, 2026. A community alternative, rust-mcp-sdk, is smaller.
Local inference from Rust
For on-device or self-hosted models, mistral.rs runs quantized models with an OpenAI-compatible server, and candle is Hugging Face’s minimalist ML framework for Rust. See the best on-device LLM runtimes for how these compare with llama.cpp and MLX.
How to choose
- Agent with tools and retrieval → Rig.
- Ingestion and RAG at volume → Swiftide.
- One or two model calls in a service → genai or async-openai.
- Expose your service to AI assistants → rmcp.
Last verified: November 28, 2026.