Skip to main content

ares_agent/
workflows_config.rs

1use serde::{Deserialize, Serialize};
2
3// ============= Workflow Configuration =============
4
5/// Workflow configuration defining agent orchestration patterns.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct WorkflowConfig {
8    /// Entry point agent that receives initial requests.
9    pub entry_agent: String,
10
11    /// Fallback agent if routing fails or no match is found.
12    pub fallback_agent: Option<String>,
13
14    /// Maximum depth for recursive/nested workflows (default: 3).
15    #[serde(default = "default_max_depth")]
16    pub max_depth: u8,
17
18    /// Maximum iterations for research/iterative workflows (default: 5).
19    #[serde(default = "default_max_iterations")]
20    pub max_iterations: u8,
21
22    /// Whether to execute sub-agent calls in parallel.
23    #[serde(default)]
24    pub parallel_subagents: bool,
25}
26
27fn default_max_depth() -> u8 {
28    3
29}
30
31fn default_max_iterations() -> u8 {
32    5
33}
34
35// ============= Skills Configuration =============
36// Skills directory configuration for SKILL.md discovery.
37#[derive(Debug, Clone, Default, Serialize, Deserialize)]
38pub struct SkillsTomlConfig {
39    /// Project skills directory (e.g., ./.claude/skills/).
40    pub project_dir: Option<std::path::PathBuf>,
41    /// Personal skills directory (e.g., ~/.claude/skills/).
42    pub personal_dir: Option<std::path::PathBuf>,
43    /// Plugin directories to scan for skills.
44    pub plugin_dirs: Option<Vec<std::path::PathBuf>>,
45}