12 releases
Uses new Rust 2024
| new 0.3.2 | Feb 4, 2026 |
|---|---|
| 0.3.1 | Jan 21, 2026 |
| 0.3.0 | Nov 28, 2025 |
| 0.2.4 | Sep 29, 2025 |
| 0.1.0 | Feb 22, 2025 |
#129 in Machine learning
143 downloads per month
Used in 3 crates
(2 directly)
1MB
19K
SLoC
🚀 Overview
AutoAgents is a cutting-edge multi-agent framework built in Rust that enables the creation of intelligent, autonomous agents powered by Large Language Models (LLMs) and Ractor. Designed for performance, safety, and scalability. AutoAgents provides a robust foundation for building complex AI systems that can reason, act, and collaborate. With AutoAgents you can create Cloud Native Agents, Edge Native Agents and Hybrid Models as well. It is built with a modular architecture with swappable components, Memory layer, Executors can be easily swapped without much rework. With our native WASM compilation support, You can depoloy the agent orchestration directly to Web Browser.
✨ Key Features
🤖 Agent Execution
- Multiple Executors: ReAct (Reasoning + Acting) and Basic executors with streaming support
- Structured Outputs: Type-safe JSON schema validation and custom output types
- Memory Systems: Configurable memory backends (sliding window, persistent storage - Coming Soon)
- TTS: Out of the support for Text to Speech with Realtime Playback
🔧 Tool Integration
- Custom Tools: Easy integration with derive macros
- WASM Runtime for Tool Execution: Sandboxed tool execution
🏗️ Flexible Architecture
- Provider Agnostic: Support for OpenAI, Anthropic, Ollama, and local models
- Multi-Platform: Native Rust, WASM for browsers, and server deployments
- Multi-Agent: Type-safe pub/sub communication and agent orchestration
🌐 Deployment Options
- Native: High-performance server and desktop applications
- Browser: Run agents directly in web browsers via WebAssembly (Coming Soon!)
- Edge: Local inference with Llamacpp
🌐 Supported LLM Providers
AutoAgents supports a wide range of LLM providers, allowing you to choose the best fit for your use case:
Cloud Providers
| Provider | Status |
|---|---|
| OpenAI | ✅ |
| OpenRouter | ✅ |
| Anthropic | ✅ |
| DeepSeek | ✅ |
| xAI | ✅ |
| Phind | ✅ |
| Groq | ✅ |
| ✅ | |
| Azure OpenAI | ✅ |
Local Providers
| Provider | Status |
|---|---|
| Ollama | ✅ |
| Mistral-rs | ✅ |
| Llama-Cpp | ✅ |
Experimental Providers
Checkout https://github.com/liquidos-ai/AutoAgents-Experimental-Backends
| Provider | Status |
|---|---|
| Burn | ⚠️ Experimental |
| Onnx | ⚠️ Experimental |
Provider support is actively expanding based on community needs.
📦 Installation
Development Setup
For contributing to AutoAgents or building from source:
Prerequisites
- Rust (latest stable recommended)
- Cargo package manager
- LeftHook for Git hooks management
Install LeftHook
macOS (using Homebrew):
brew install lefthook
Linux/Windows:
# Using npm
npm install -g lefthook
Clone and Setup
# Clone the repository
git clone https://github.com/liquidos-ai/AutoAgents.git
cd AutoAgents
# Install Git hooks using lefthook
lefthook install
# Build the project
cargo build --release
# Run tests to verify setup
cargo test --all-features
The lefthook configuration will automatically:
- Format code with
cargo fmt - Run linting with
cargo clippy - Execute tests before commits
🚀 Quick Start
Basic Usage
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())
}
}
/// Math agent output with Value and Explanation
#[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() {
// Try to parse as structured JSON first
if let Ok(value) = serde_json::from_str::<MathAgentOutput>(&resp) {
return value;
}
}
// For streaming chunks or unparseable content, create a default response
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?;
println!("Running simple_agent with direct run method");
let result = agent_handle.agent.run(Task::new("What is 1 + 1?")).await?;
println!("Result: {:?}", result);
Ok(())
}
#[tokio::main]
async fn main() -> Result<(), Error> {
// Check if API key is set
let api_key = std::env::var("OPENAI_API_KEY").unwrap_or("".into());
// Initialize and configure the LLM client
let llm: Arc<OpenAI> = LLMBuilder::<OpenAI>::new()
.api_key(api_key) // Set the API key
.model("gpt-4o") // Use GPT-4o-mini model
.max_tokens(512) // Limit response length
.temperature(0.2) // Control response randomness (0.0-1.0)
.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 our comprehensive 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.
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.
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-llm/ # LLM provider implementations
│ ├── 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-qdrant/ # Qdrant vector store
│ ├── autoagents-test-utils/ # Common test utils
│ └── autoagents-derive/ # Procedural macros
├── examples/ # Example implementations
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
Setup
For development setup instructions, see the Installation section above.
Running Tests
# Run all tests --
cargo test --all-features
# Run tests with coverage (requires cargo-tarpaulin)
cargo install cargo-tarpaulin
cargo tarpaulin --all-features --out html
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 tests with
cargo test --all-features --workspace --exclude autoagents-burn
Contributing
We welcome contributions! Please see our Contributing Guidelines and Code of Conduct for details.
📖 Documentation
- API Documentation: Complete Framework Docs
- 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
📜 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 with ❤️ by the Liquidos AI team and our amazing community contributors.
Special thanks to:
- The Rust community for the excellent ecosystem
- OpenAI, Anthropic, and other LLM providers for their APIs
- All contributors who help make AutoAgents better
⭐ Star us on GitHub | 🐛 Report Issues | 💬 Join Discussions
Star History
Dependencies
~5–26MB
~337K SLoC