autoagents
Library Listed
Agent Framework for Building Autonomous Agents
- Downloads
- 8,627
- Dependents
- 4
- Stars
- 779
- Forks
- 95
- Contributors
- 26
- Commits
- 345
- Latest release
- 0.4.0 ·
About

A production-grade multi-agent framework in Rust
English | 中文 | 日本語 | Español | Français | Deutsch | 한국어 | Português (Brasil)
Translations may lag behind the English README.
Documentation | Examples | Contributing
Like this project? Star us on GitHub
Overview
AutoAgents is a modular, multi-agent framework for building intelligent systems in Rust. It combines a type-safe agent model with structured tool calling, configurable memory, and pluggable LLM backends. The architecture is designed for performance, safety, and composability across server and edge, and serves as the foundation for a high-level agent harness.
Read the full README
Key Features
- Agent execution: ReAct and basic executors, streaming responses, and structured outputs
- Tooling: Derive macros for tools and outputs, plus a sandboxed WASM runtime for tool execution
- Memory: Sliding window memory with extensible backends
- LLM providers: Cloud and local backends behind a unified interface
- LLM Guardrails: Guardrail implementation for safeguarding LLM inference
- LLM Optimization: Build LLM pipelines with optimization passes like cache and retry for faster, more reliable inference
- Multi-agent orchestration: Typed pub/sub communication and environment management
- Speech-Processing: Local TTS and STT support
- Observability: OpenTelemetry tracing and metrics with pluggable exporters
Supported LLM Providers
Cloud Providers
| Provider | Feature | Chat | Streaming | Tool Calls | Structured Output | Vision / Multimodal |
|---|---|---|---|---|---|---|
| OpenAI | openai | Yes | Yes | Yes | Yes | Image URLs and inline images; PDFs are rejected with a typed error. |
| OpenRouter | openrouter | Yes | Yes | Yes | Yes | OpenAI-compatible image inputs; PDFs are rejected with a typed error. |
| Requesty | requesty | Yes | Yes | Yes | Yes | OpenAI-compatible image inputs; PDFs are rejected with a typed error. |
| Anthropic | anthropic | Yes | Yes | Yes | Yes | Images, image URLs, and PDFs use Anthropic content blocks. |
| DeepSeek | deepseek | Yes | Yes | Yes | Yes | OpenAI-compatible image inputs; PDFs are rejected with a typed error. |
| xAI | xai | Yes | Yes | No | Model-dependent | Text-only chat; multimodal input returns LLMError::InvalidRequest. |
| Phind | phind | Yes | No* | No | No | Text-only chat; multimodal input returns LLMError::InvalidRequest. |
| Groq | groq | Yes | Yes | Yes | Yes | OpenAI-compatible image inputs; PDFs are rejected with a typed error. |
google | Yes | Yes | Yes | Yes | Inline images and PDFs; image URLs are rejected with a typed error. | |
| Azure OpenAI | azure_openai | Yes | No* | Yes | Yes | Image URLs; PDFs and raw inline images are rejected with typed errors. |
| MiniMax | minimax | Yes | Yes | Yes | No | OpenAI-compatible image inputs; PDFs are rejected with a typed error. |
Local Providers
| Provider | Crate / Feature | Chat | Streaming | Tool Calls | Structured Output | Vision / Multimodal | Local Inference |
|---|---|---|---|---|---|---|---|
| Ollama | ollama | Yes | Yes | Yes | Yes | Model-dependent | Yes, via Ollama server |
| Mistral-rs | autoagents-mistral-rs | Yes | Yes | Yes | Yes | Vision models supported | Yes, embedded runtime |
| Llama-Cpp | autoagents-llamacpp | Yes | Yes | Yes | Yes | Vision models supported with projector files | Yes, embedded runtime |
Experimental Providers
See https://github.com/liquidos-ai/AutoAgents-Experimental-Backends
| Provider | Status |
|---|---|
| Burn | ⚠️ Experimental |
| Onnx | ⚠️ Experimental |
Provider support is actively expanding based on community needs.
* Providers marked No for streaming use the default ChatProvider::chat_stream implementation, which returns LLMError::Generic("Streaming not supported for this provider") rather than panicking.
Installation
Prerequisites
- Rust (latest stable recommended)
- Cargo package manager
- LeftHook for Git hooks management
- Python 3.9+ (required for Python bindings)
- uv for Python environment and package management
- maturin (required to build/install local Python bindings from source)
Prerequisite
sudo apt update
sudo apt install build-essential libasound2-dev alsa-utils pkg-config libssl-dev -y
Install LeftHook
macOS (Homebrew):
brew install lefthook
Linux/Windows (npm):
npm install -g lefthook
Clone and Build
git clone https://github.com/liquidos-ai/AutoAgents.git
cd AutoAgents
lefthook install
cargo build --workspace --features full
Hardware-specific accelerator features such as CUDA, Vulkan, and Metal require the matching local toolchains and platforms. Enable those features only for the specific backend you are building.
Python Bindings
AutoAgents ships Python bindings to PyPI. Install the base package and add backends via extras:
pip install autoagents-py # core + cloud LLM providers
pip install "autoagents-py[llamacpp]" # + llama.cpp CPU
pip install "autoagents-py[llamacpp-cuda]" # + llama.cpp CUDA
pip install "autoagents-py[llamacpp-metal]" # + llama.cpp Metal (macOS)
pip install "autoagents-py[llamacpp-vulkan]" # + llama.cpp Vulkan
pip install "autoagents-py[mistralrs]" # + mistral-rs CPU
pip install "autoagents-py[mistralrs-cuda]" # + mistral-rs CUDA
pip install "autoagents-py[mistralrs-metal]" # + mistral-rs Metal (macOS)
pip install "autoagents-py[guardrails]" # + Guardrails
pip install "autoagents-py[llamacpp-cuda,guardrails]" # combine extras
Development install from this repo:
uv venv --python=3.12
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -U pip "maturin>=1.13.3,<2" pytest pytest-asyncio pytest-cov
# Clean, build, and install all CPU bindings into the active venv
make python-bindings-build
# Clean, build, and install CPU + CUDA bindings
make python-bindings-build-cuda
The Make targets remove stale editable-install extension artifacts before
rebuilding, which avoids loading out-of-date .abi3.so files from the source
tree.
Example scripts:
- Core cloud example:
bindings/python/autoagents/examples/openai_agent.py - llama.cpp example:
bindings/python/autoagents-llamacpp/examples/llamacpp_agent.py - mistral-rs example:
bindings/python/autoagents-mistralrs/examples/mistral_rs_agent.py
Run Tests
cargo test --features "full" --workspace
Quick Start
use autoagents::core::agent::memory::SlidingWindowMemory;
use autoagents::core::agent::prebuilt::executor::{ReActAgent, ReActAgentOutput};
use autoagents::core::agent::task::Task;
use autoagents::core::agent::{AgentBuilder, AgentDeriveT, AgentOutputT, DirectAgent};
use autoagents::core::error::Error;
use autoagents::core::tool::{ToolCallError, ToolInputT, ToolRuntime, ToolT};
use autoagents::llm::LLMProvider;
use autoagents::llm::backends::openai::OpenAI;
use autoagents::llm::builder::LLMBuilder;
use autoagents_derive::{agent, tool, AgentHooks, AgentOutput, ToolInput};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::sync::Arc;
#[derive(Serialize, Deserialize, ToolInput, Debug)]
pub struct AdditionArgs {
#[input(description = "Left Operand for addition")]
left: i64,
#[input(description = "Right Operand for addition")]
right: i64,
}
#[tool(
name = "Addition",
description = "Use this tool to Add two numbers",
input = AdditionArgs,
)]
struct Addition {}
#[async_trait]
impl ToolRuntime for Addition {
async fn execute(&self, args: Value) -> Result<Value, ToolCallError> {
println!("execute tool: {:?}", args);
let typed_args: AdditionArgs = serde_json::from_value(args)?;
let result = typed_args.left + typed_args.right;
Ok(result.into())
}
}
#[derive(Debug, Serialize, Deserialize, AgentOutput)]
pub struct MathAgentOutput {
#[output(description = "The addition result")]
value: i64,
#[output(description = "Explanation of the logic")]
explanation: String,
#[output(description = "If user asks other than math questions, use this to answer them.")]
generic: Option<String>,
}
#[agent(
name = "math_agent",
description = "You are a Math agent",
tools = [Addition],
output = MathAgentOutput,
)]
#[derive(Default, Clone, AgentHooks)]
pub struct MathAgent {}
impl From<ReActAgentOutput> for MathAgentOutput {
fn from(output: ReActAgentOutput) -> Self {
let resp = output.response;
if output.done && !resp.trim().is_empty() {
if let Ok(value) = serde_json::from_str::<MathAgentOutput>(&resp) {
return value;
}
}
MathAgentOutput {
value: 0,
explanation: resp,
generic: None,
}
}
}
pub async fn simple_agent(llm: Arc<dyn LLMProvider>) -> Result<(), Error> {
let sliding_window_memory = Box::new(SlidingWindowMemory::new(10));
let agent_handle = AgentBuilder::<_, DirectAgent>::new(ReActAgent::new(MathAgent {}))
.llm(llm)
.memory(sliding_window_memory)
.build()
.await?;
let result = agent_handle.agent.run(Task::new("What is 1 + 1?")).await?;
println!("Result: {:?}", result);
Ok(())
}
#[tokio::main]
async fn main() -> Result<(), Error> {
let api_key = std::env::var("OPENAI_API_KEY").unwrap_or("".into());
let llm: Arc<OpenAI> = LLMBuilder::<OpenAI>::new()
.api_key(api_key)
.model("gpt-4o")
.max_tokens(512)
.temperature(0.2)
.build()
.expect("Failed to build LLM");
let _ = simple_agent(llm).await?;
Ok(())
}
AutoAgents CLI
AutoAgents CLI helps in running Agentic Workflows from YAML configurations and serves them over HTTP. You can check it out at https://github.com/liquidos-ai/AutoAgents-CLI.
Examples
Explore the examples to get started quickly:
Basic
Demonstrates various examples like Simple Agent with Tools, Very Basic Agent, Edge Agent, Chaining, Actor Based Model, Streaming and Adding Agent Hooks.
LLM Pipelines
Demonstrates LLM pipelines with optimization passes such as cache and retry to improve performance and reliability.
Guardrails
Demonstrates configurable input and output guardrails with Block, Sanitize, and Audit policies using an LLMLayer in the pipeline.
MCP Integration
Demonstrates how to integrate AutoAgents with the Model Context Protocol (MCP).
Local Models
Demonstrates how to integrate AutoAgents with the Mistral-rs for Local Models.
Design Patterns
Demonstrates various design patterns like Chaining, Planning, Routing, Parallel and Reflection.
Providers
Contains examples demonstrating how to use different LLM providers with AutoAgents.
WASM Tool Execution
A simple agent which can run tools in WASM runtime.
Coding Agent
A sophisticated ReAct-based coding agent with file manipulation capabilities.
Speech
Run AutoAgents Speech Example with realtime TTS and STT.
Android Local Agent
Example App that runs AutoAgents with Local models in Android using AutoAgents-llamacpp backend
Components
AutoAgents is built with a modular architecture:
AutoAgents/
├── crates/
│ ├── autoagents/ # Main library entry point
│ ├── autoagents-core/ # Core agent framework
│ ├── autoagents-protocol/ # Shared protocol/event types
│ ├── autoagents-llm/ # LLM provider implementations
│ ├── autoagents-telemetry/ # OpenTelemetry integration
│ ├── autoagents-toolkit/ # Collection of ready-to-use tools
│ ├── autoagents-mistral-rs/ # LLM provider implementations using Mistral-rs
│ ├── autoagents-llamacpp/ # LLM provider implementation using LlamaCpp
│ ├── autoagents-speech/ # Speech model support for TTS and STT
│ ├── autoagents-guardrails/ # LLM Guardrails implementation
│ ├── autoagents-qdrant/ # Qdrant vector store
│ └── autoagents-derive/ # Procedural macros
├── examples/ # Example implementations
├── bindings/ # Bindings for different languages
Core Components
- Agent: The fundamental unit of intelligence
- Environment: Manages agent lifecycle and communication
- Memory: Configurable memory systems
- Tools: External capability integration
- Executors: Different reasoning patterns (ReAct, Chain-of-Thought)
Development
Prerequisite
sudo apt update
sudo apt install build-essential libasound2-dev alsa-utils pkg-config libssl-dev -y
Running Tests
cargo test --features default
# Python bindings
make python-bindings-test-clean
# Coverage (requires cargo-tarpaulin)
cargo install cargo-tarpaulin
rustup component add llvm-tools-preview
make coverage-rust
Running Benchmarks
cargo bench -p autoagents-core --bench agent_runtime
Git Hooks
This project uses LeftHook for Git hooks management. The hooks will automatically:
- Format code with
cargo fmt --check - Run linting with
cargo clippy -- -D warnings - Execute Rust tests with
cargo test --features full - Execute Python binding tests with
make python-bindings-test
Contributing
We welcome contributions. Please see our Contributing Guidelines and Code of Conduct for details.
Documentation
- API Documentation: Complete framework docs
- FAQ: Common questions and troubleshooting
- Examples: Practical implementation examples
Community
- GitHub Issues: Bug reports and feature requests
- Discussions: Community Q&A and ideas
- Discord: Join our Discord Community using https://discord.gg/zfAF9MkEtK
Performance
AutoAgents is designed for high performance:
- Memory Efficient: Optimized memory usage with configurable backends
- Concurrent: Full async/await support with tokio
- Scalable: Horizontal scaling with multi-agent coordination
- Type Safe: Compile-time guarantees with Rust's type system
FAQ
See the FAQ in the documentation for installation, providers, executors, environment lifecycle, and troubleshooting.
License
AutoAgents is dual-licensed under:
- MIT License (MIT_LICENSE)
- Apache License 2.0 (APACHE_LICENSE)
You may choose either license for your use case.
Acknowledgments
Built by the Liquidos AI team and wonderful community of researchers and engineers.
Special thanks to:
- The Rust community for the excellent ecosystem
- LLM providers for enabling high-quality model APIs
- All contributors who help improve AutoAgents
Star History
Compatibility
- Runs on
- CUDA, WebGPU, Metal, ROCm, Vulkan
What shows it
- CUDA: autoagents-burn feature cuda, autoagents-llamacpp feature cuda, autoagents-mistral-rs feature cuda, autoagents-onnx feature cuda, autoagents-speech feature cuda, liquid-edge feature cuda
- WebGPU: autoagents-burn feature webgpu
- Metal: autoagents-burn feature metal, autoagents-llamacpp feature metal, autoagents-mistral-rs feature metal
- ROCm: autoagents-burn feature rocm
- Vulkan: autoagents-burn feature vulkan, autoagents-llamacpp feature vulkan
- Native code
- Required
- Binds native code: llama-cpp-sys-2, ort-sys, alsa-sys (feature audio-capture), intel-mkl-src (feature full), rquickjs-sys (feature codeact)
- Python bindings
- No Python binding crate found
- License
- Apache-2.0 OR MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
Agent Framework for Building Autonomous Agents |
8,627 downloads over 30 days | 4 | 779 | 0.4.0 | CUDA, WebGPU, Metal, ROCm, Vulkan | Binds native code: llama-cpp-sys-2, ort-sys, alsa-sys (feature audio-capture), intel-mkl-src (feature full), rquickjs-sys (feature codeact) | Apache-2.0 OR MIT |
|
rust-mcp-sdk Featured
An asynchronous SDK and framework for building MCP-Servers and MCP-Clients, leveraging the rust-mcp-schema for type safe MCP Schema Objects. |
29,764 downloads over 30 days | 51 | 199 | 2.0.0 | GPU support unknown | No native code found | MIT |
|
rs-graph-llm Listed
A high-performance, type-safe framework for building multi-agent workflow systems in Rust |
5,308 downloads over 30 days | 8 | 388 | 0.8.1 | GPU support unknown | No native code found | MIT |
|
A library for running chains of LLMs (such as ChatGPT) in series to complete complex tasks, such as text summation. |
2,575 downloads over 30 days | 1 | 1,602 | 0.13.0 | CUDA | Binds native code: llm-chain-llama-sys. Build uses a native toolchain: bindgen | MIT |
|
floneum Listed
A simple interface for pretrained AI models |
649 downloads over 30 days | 7 | 2,236 | 0.4.0 | CUDA, Metal | Binds native code: alsa-sys, lmdb-master-sys, accelerate-src (feature accelerate), intel-mkl-src (feature mkl), ort-sys (feature voice_detection) and 1 more | Apache-2.0 OR MIT |
|
autogpt Listed
🦀 A Pure Rust Framework For Building AGIs. |
2 downloads over 30 days | 0 | 117 | 0.4.5 | GPU support unknown | Binds native code: ring, zstd-sys, libgit2-sys (feature git), libz-sys (feature git) | MIT |
|
An open protocol that gives AI agents a secure, sandboxed place to run code and use tools — with lean context usage. AXP works alongside MCP |
Not measured | Not applicable | 3 | Not measured | Not measured | Not measured | Apache-2.0 |
All projects in Build LLM apps and agentsAll projects in Run and serve models
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- It has 2 active dependents and 2 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 779 stars, 95 forks and 26 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
What else the check found
- The last activity is on 18 Oct 2026, 22 days ago. The rules expect an update within 365 days. Dormancy rule
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.4.0 base 140, raised to the 365-day floor: E = 365 daysdormancy: last activity 2026-10-18, 22 days ago, E = 365: activefeatured: not featured: active_users 2 < 11 and new_adopters 2 < 9 and repository route stars 779 (needs 4539), forks 95 (needs 434), contributors 26 (needs 79)listed: listed: no archive, new or featured rule applies
Crates15 crates
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption2 active dependents, 2 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 2 | crates.io database dump | Yes | |
| New dependents (365 days) | 2 | crates.io database dump | Yes | |
| Peak active dependents | 2 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 22 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-10-18 | GitHub repository | Yes | |
| Latest release | 2026-07-08 | crates.io database dump | Yes | |
| First release | 2025-02-22 | crates.io database dump | Yes | |
| Latest version | 0.4.0 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 233 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution18 releases, 8,627 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 18 | crates.io database dump | Yes | |
| Downloads over 30 days | 8627 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository779 stars, 95 forks, 26 contributors, 345 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 779 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 95 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 26 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 345 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 OR MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | CUDA, WebGPU, Metal, ROCm, Vulkan | crates.io database dump | No | |
| What shows each backend | CUDA: autoagents-burn feature cuda, autoagents-llamacpp feature cuda, autoagents-mistral-rs feature cuda, autoagents-onnx feature cuda, autoagents-speech feature cuda, liquid-edge feature cuda; WebGPU: autoagents-burn feature webgpu; Metal: autoagents-burn feature metal, autoagents-llamacpp feature metal, autoagents-mistral-rs feature metal; ROCm: autoagents-burn feature rocm; Vulkan: autoagents-burn feature vulkan, autoagents-llamacpp feature vulkan | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: llama-cpp-sys-2, ort-sys, alsa-sys (feature audio-capture), intel-mkl-src (feature full), rquickjs-sys (feature codeact) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 4 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.