Skip to main content

Crate ares_agent

Crate ares_agent 

Source
Expand description

AI agent orchestration and management.

This module provides the agent system for A.R.E.S, including:

  • Agent Trait - Base trait that all agents implement
  • ConfigurableAgent - Dynamic agent created from TOML/TOON configuration
  • AgentRegistry - Registry for creating and managing agent instances
  • Router - Routes requests to appropriate specialized agents
  • Orchestrator - Coordinates multi-step agent workflows

§Architecture

All agents are now created dynamically via ConfigurableAgent, which reads configuration from TOML files. Legacy hardcoded agents have been removed.

§Example

use ares::agents::{Agent, AgentRegistry};

// Create registry from configuration
let registry = AgentRegistry::from_config(config.agents, provider_registry, tools);

// Get an agent instance
let agent = registry.get_agent("product")?;

// Execute with context
let response = agent.execute("Help me with my order", &context).await?;

Re-exports§

pub use config::AgentConfig;
pub use workflows_config::SkillsTomlConfig;
pub use workflows_config::WorkflowConfig;
pub use emergency_stop::EmergencyStop;
pub use execution::request_tenant_ctx;
pub use execution::request_user_scope;
pub use execution::tenant_scope;
pub use execution::user_id_from_ctx;
pub use execution::AgentRequest;
pub use execution::AgentSource;
pub use execution::Execute;
pub use execution::ExecutionResult;
pub use execution::RunTracker;
pub use admit::admit;
pub use plugins::register_plugins;
pub use external_context::ExternalContext;
pub use configurable::ConfigurableAgent;
pub use context_provider::ContextProvider;
pub use context_provider::ContextProviderHandle;
pub use context_provider::NoOpContextProvider;
pub use registry::AgentRegistry;
pub use registry::AgentRegistryBuilder;

Modules§

admit
checkpoint
Checkpoint/crash recovery — serialize agent state, restore on restart. Agent checkpoint/crash recovery system.
config
configurable
Configurable Agent implementation
context_provider
External context injection trait (OSS: NoOp, Managed: Eruka/custom). External context injection for agents.
emergency_stop
Remaining Cordis context types that live in the server crate:
execution
Agent execution service — single place handling conversation history loading, memory injection, tool coordination, observability, usage/cost, token budget, and loop detection.
external_context
loop_detector
Loop detection for agent outputs — prevents repetitive/stuck agents. Loop detection for ARES agents.
loop_mode
Long-running iteration mode — agents that run on a fixed interval. Long-running iteration mode for ares agents.
memory
Memory management module for conversation context and user memory.
orchestrator
Multi-agent orchestration for complex tasks.
plugins
Loader plugin registration for standalone and test hosts.
registry
Agent Registry for managing configurable agents
research
Multi-Agent Research Coordination
router
Request routing to specialized agents.
workflows_config

Structs§

AgentResponse
Response from agent execution, including content and optional token usage
ExecutionMetadata
Metadata about the execution of an agent

Traits§

Agent
Base trait for all agents
ToonAgents
Live TOON agent lookup used by AgentRegistry without depending on Overlay.