fix: Forgot to automatically add the bidirectional communication back up to parent agents from sub-agents (i.e. need to be able to check inbox and send messages)

This commit is contained in:
2026-02-17 16:11:35 -07:00
parent 39d9b25e47
commit 5e9c31595e
4 changed files with 68 additions and 49 deletions
+7 -1
View File
@@ -6,6 +6,9 @@ use crate::{
function::{Functions, run_llm_function},
};
use crate::config::prompts::{
DEFAULT_SPAWN_INSTRUCTIONS, DEFAULT_TEAMMATE_INSTRUCTIONS, DEFAULT_TODO_INSTRUCTIONS,
};
use crate::vault::SECRET_RE;
use anyhow::{Context, Result};
use fancy_regex::Captures;
@@ -13,7 +16,6 @@ use inquire::{Text, validator::Validation};
use rust_embed::Embed;
use serde::{Deserialize, Serialize};
use std::{ffi::OsStr, path::Path};
use crate::config::prompts::{DEFAULT_SPAWN_INSTRUCTIONS, DEFAULT_TODO_INSTRUCTIONS};
const DEFAULT_AGENT_NAME: &str = "rag";
@@ -200,6 +202,8 @@ impl Agent {
functions.append_supervisor_functions();
}
functions.append_teammate_functions();
agent_config.replace_tools_placeholder(&functions);
Ok(Self {
@@ -340,6 +344,8 @@ impl Agent {
output.push_str(DEFAULT_SPAWN_INSTRUCTIONS);
}
output.push_str(DEFAULT_TEAMMATE_INSTRUCTIONS);
self.interpolate_text(&output)
}