Expand description
§A.R.E.S - Agentic Retrieval Enhanced Server
A production-grade agentic chatbot server built in Rust with multi-provider LLM support, tool calling, RAG, MCP integration, and advanced research capabilities.
§Overview
A.R.E.S can be used in two ways:
- As a standalone server - Run the
ares-serverbinary - As a library - Import components into your own Rust project
§Quick Start (Library Usage)
Add to your Cargo.toml:
[dependencies]
ares-server = "0.2"§Basic Example
ⓘ
use ares::{Provider, LLMClient};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create an Ollama provider
let provider = Provider::Ollama {
base_url: "http://localhost:11434".to_string(),
model: "llama3.2:3b".to_string(),
};
// Create a client and generate a response
let client = provider.create_client().await?;
let response = client.generate("Hello, world!").await?;
println!("{}", response);
Ok(())
}§Using Tools
ⓘ
use ares::{ToolRegistry, tools::calculator::Calculator};
use std::sync::Arc;
let mut registry = ToolRegistry::new();
registry.register(Arc::new(Calculator));
// Tools can be used with LLM function calling
let tool_definitions = registry.definitions();§Configuration-Driven Setup
ⓘ
use ares::{AresConfigManager, AgentRegistry, ProviderRegistry, ToolRegistry};
use std::sync::Arc;
// Load configuration from ares.toml
let config_manager = AresConfigManager::new("ares.toml")?;
let config = config_manager.config();
// Create registries from configuration
let provider_registry = Arc::new(ProviderRegistry::from_config(&config));
let tool_registry = Arc::new(ToolRegistry::with_config(&config));
let agent_registry = AgentRegistry::from_config(
&config,
provider_registry,
tool_registry,
);§Feature Flags
| Feature | Description |
|---|---|
ollama | Ollama local inference (default) |
openai | OpenAI API support |
llamacpp | Direct GGUF model loading |
local-db | Local SQLite database (default) |
turso | Remote Turso database |
qdrant | Qdrant vector database |
mcp | Model Context Protocol support |
§Modules
agents- Agent framework for multi-agent orchestrationapi- REST API handlers and routesauth- JWT authentication and middlewaredb- Database abstraction (SQLite, Turso)llm- LLM client implementationstools- Tool definitions and registryworkflows- Declarative workflow enginetypes- Common types and error handling
§Architecture
A.R.E.S uses a hybrid configuration system:
- TOML (
ares.toml): Infrastructure config (server, auth, providers) - TOON (
config/*.toon): Behavioral config (agents, models, tools)
Both support hot-reloading for zero-downtime configuration changes.
Re-exports§
pub use agents::AgentRegistry;pub use agents::AgentRegistryBuilder;pub use db::TursoClient;pub use llm::client::LLMClientFactoryTrait;pub use llm::ConfigBasedLLMFactory;pub use llm::LLMClient;pub use llm::LLMClientFactory;pub use llm::LLMResponse;pub use llm::Provider;pub use llm::ProviderRegistry;pub use tools::registry::ToolRegistry;pub use types::AppError;pub use types::Result;pub use utils::toml_config::AresConfig;pub use utils::toml_config::AresConfigManager;pub use utils::toon_config::DynamicConfigManager;pub use workflows::WorkflowEngine;pub use workflows::WorkflowOutput;pub use workflows::WorkflowStep;
Modules§
- agents
- AI agent orchestration and management. AI agent orchestration and management.
- api
- HTTP API handlers and routes. HTTP API handlers and routes.
- auth
- JWT authentication and middleware. JWT authentication and middleware.
- cli
- Command-line interface and scaffolding. CLI module for A.R.E.S
- db
- Database clients (Turso/SQLite, Qdrant). Database clients and vector stores.
- llm
- LLM provider clients and abstractions. LLM provider clients and abstractions.
- mcp
mcp - Model Context Protocol (MCP) server integration.
- memory
- Conversation memory and context management. Memory management module for conversation context and user memory.
- rag
- Retrieval Augmented Generation (RAG) components. Retrieval Augmented Generation (RAG) components.
- research
- Multi-agent research coordination. Multi-agent research coordination.
- tools
- Built-in tools (calculator, web search). Built-in tools (calculator, web search).
- types
- Core types (requests, responses, errors). Core types used throughout the A.R.E.S server.
- utils
- Configuration utilities (TOML, TOON). Configuration utilities (TOML, TOON).
- workflows
- Workflow engine for agent orchestration. Workflow Engine Module
Structs§
- AppState
- Application state shared across handlers