rig vs agent.cpp
Rust LLM integrations compared with local C++ agents
rig is a Rust library for composing LLM providers, vector stores, and agent workflows through shared interfaces. agent.cpp is a C++ library for running local GGUF models through llama.cpp; the main distinction is rig’s provider and integration flexibility versus agent.cpp’s local-inference focus.

rig: Build LLM Applications in Rust
Rig is a Rust library for building modular LLM applications, with shared interfaces for model providers, vector stores, and agent workflows. It suits Rust developers who want to integrate multiple LLM services without building each integration from scratch.

agent.cpp: Build Local AI Agents in C++
agent.cpp is a C++ library for building agents that run small language models locally through llama.cpp. It provides an agent loop, tools, callbacks, and support for GGUF models, grammar constraints, and LoRA adapters.
| rig | agent.cpp | |
|---|---|---|
| Language | Rust | C++ |
| License | MIT | MIT |
| Stars | 8.8k | 210 |
| Forks | 989 | 31 |
| Last analyzed | Oct 3, 2026 | Oct 3, 2026 |
Key differences
- rig is written in Rust and supports integrations with more than 20 model providers and more than 10 vector stores; agent.cpp is written in C++ and runs GGUF models locally through llama.cpp.
- rig covers completions, embeddings, agent workflows, and supported audio and image capabilities; agent.cpp focuses on local model-backed agents, tools, callbacks, and text generation.
- rig uses optional provider integrations and requires credentials and a suitable runtime or transport for the chosen integration; agent.cpp avoids external LLM APIs but requires a GGUF model.
- agent.cpp supports GBNF grammar constraints and LoRA adapters; rig’s listed features instead emphasize shared provider and vector store interfaces, streaming, and cassette utilities.
- Both projects use the MIT license. rig has 8.8k stars and 989 forks, while agent.cpp has 210 stars and 31 forks.
Choose rig if you…
- build LLM features in Rust with interchangeable model-provider integrations.
- need vector store integrations alongside completions, embeddings, or agent workflows.
- want multi-turn prompting and streaming, or supported audio and image capabilities.
Choose agent.cpp if you…
- build C++ agents that run GGUF models locally through llama.cpp.
- need tool execution with callbacks, grammar constraints, or LoRA adapters.
- want to explore local agent patterns such as memory, multi-agent delegation, or human review flows.
Compare the numbers side by side, or add more projects
This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.