1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! 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
//!
//! ```rust,ignore
//! use ares::agents::{Agent, AgentRegistry};
//!
//! // Create registry from configuration
//! let registry = AgentRegistry::from_config(&config, provider_registry, tool_registry);
//!
//! // Get an agent instance
//! let agent = registry.get_agent("product")?;
//!
//! // Execute with context
//! let response = agent.execute("Help me with my order", &context).await?;
//! ```
/// External context injection trait (OSS: NoOp, Managed: Eruka/custom).
/// Loop detection for agent outputs — prevents repetitive/stuck agents.
/// Checkpoint/crash recovery — serialize agent state, restore on restart.
/// Multi-agent orchestration for complex tasks.
/// Request routing to specialized agents.
/// Per-tenant agent creation from DB-stored configs.
use crateTokenUsage;
use crate;
use async_trait;
// Re-export commonly used types
pub use ConfigurableAgent;
pub use ;
pub use ;
/// Response from agent execution, including content and optional token usage
/// Metadata about the execution of an agent
/// Base trait for all agents