AutoAgents
A Modern Multi-Agent Framework in Rust
Documentation | Examples | Contributing
🚀 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)
🔧 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
- Edge: Local inference with ONNX models
🌐 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 |
|---|---|
| Mistral-rs | ⚠️ Under Development |
| Burn | ⚠️ Experimental |
| Onnx | ⚠️ Experimental |
| Ollama | ✅ |
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):
Linux/Windows:
# Using npm
Clone and Setup
# Clone the repository
# Install Git hooks using lefthook
# Build the project
# Run tests to verify setup
The lefthook configuration will automatically:
- Format code with
cargo fmt - Run linting with
cargo clippy - Execute tests before commits
🚀 Quick Start
Basic Usage
use SlidingWindowMemory;
use ;
use Task;
use ;
use Error;
use ;
use LLMProvider;
use OpenAI;
use LLMBuilder;
use ;
use ;
use Value;
use Arc;
/// Math agent output with Value and Explanation
pub async
async
AutoAgents CLI
Command-line interface for running and serving AutoAgents workflows from YAML.
Installation
The binary will be available at target/release/autoagents.
Usage
Run a Workflow
Execute a workflow from a YAML file:
kind: Direct
name: ResearchAgent
stream: false
description: "A research agent designed to search, retrieve, and summarize information from the web."
workflow:
agent:
name: ResearchAgent
description: "A deep research agent capable of gathering accurate information, summarizing sources, and providing references."
instructions: |
You are a research expert. Your task is to find accurate and up-to-date information related to the user's query.
1. Search for relevant sources on the web.
2. Extract key insights and summarize them concisely.
3. Provide references and links to original sources.
4. Make sure to cross-verify facts and avoid unverified information.
5. Present the final answer in a structured and clear manner.
executor: ReAct
memory:
kind: sliding_window
parameters:
window_size: 100
model:
kind: llm
backend:
kind: Cloud
provider: OpenAI
model_name: gpt-4o-mini
parameters:
temperature: 0.2
max_tokens: 1500
tools:
- name: brave_search
output:
type: text
output:
type: text
Serve Workflows over HTTP
Start an HTTP server to serve workflows via REST API:
Optional arguments:
--name <NAME>- Custom name for the workflow (defaults to filename)--host <HOST>- Host to bind to (default: 127.0.0.1)--port <PORT>- Port to bind to (default: 8080)
Examples
# Run a direct workflow
# Serve a workflow on custom port
# serve from directory
# Serve with custom name
📚 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.
Wasm Agent
Compile agent runtime into WASM module and load it in a browser web app.
🏗️ 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-burn/ # LLM provider implementations using Burn
│ ├── autoagents-mistral-rs/ # LLM provider implementations using Mistral-rs
│ ├── autoagents-onnx/ # Edge Runtime Implementation using Onnx
│ └── autoagents-derive/ # Procedural macros
│ └── autoagents-cli/ # AutoAgents CLI
│ └── autoagents-serve/ # Crate responsible for running and serving YAML based workflows
├── 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 --
# Run tests with coverage (requires cargo-tarpaulin)
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/Ghau8xYn
📊 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