feat: Auto-dispatch support of sub-agents and support for the teammate pattern between subagents

This commit is contained in:
2026-02-17 15:18:27 -07:00
parent 7f267a10a1
commit b86f76ddb9
4 changed files with 264 additions and 67 deletions
+16
View File
@@ -429,6 +429,14 @@ impl Agent {
self.config.max_agent_depth
}
pub fn summarization_model(&self) -> Option<&str> {
self.config.summarization_model.as_deref()
}
pub fn summarization_threshold(&self) -> usize {
self.config.summarization_threshold
}
pub fn continuation_count(&self) -> usize {
self.continuation_count
}
@@ -639,6 +647,10 @@ pub struct AgentConfig {
pub conversation_starters: Vec<String>,
#[serde(default)]
pub documents: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub summarization_model: Option<String>,
#[serde(default = "default_summarization_threshold")]
pub summarization_threshold: usize,
}
fn default_max_auto_continues() -> usize {
@@ -657,6 +669,10 @@ fn default_true() -> bool {
true
}
fn default_summarization_threshold() -> usize {
4000
}
impl AgentConfig {
pub fn load(path: &Path) -> Result<Self> {
let contents = read_to_string(path)