pub struct HandoffManager { /* private fields */ }Expand description
Handoff manager: registers multiple Agents and supports task handoff
Implementations§
Source§impl HandoffManager
impl HandoffManager
Sourcepub fn with_max_handoff_depth(self, depth: usize) -> Self
pub fn with_max_handoff_depth(self, depth: usize) -> Self
Sets the handoff depth limit (default 10, P1-7).
Sourcepub fn register_agent(
&self,
name: impl Into<String>,
executor: Arc<AgentExecutor>,
) -> Result<(), HandoffError>
pub fn register_agent( &self, name: impl Into<String>, executor: Arc<AgentExecutor>, ) -> Result<(), HandoffError>
Registers an Agent
Sourcepub fn set_primary(&self, name: &str) -> Result<(), HandoffError>
pub fn set_primary(&self, name: &str) -> Result<(), HandoffError>
Sets the primary Agent
Sourcepub async fn execute_handoff(
&self,
handoff: Handoff,
) -> Result<HandoffResult, HandoffError>
pub async fn execute_handoff( &self, handoff: Handoff, ) -> Result<HandoffResult, HandoffError>
Executes a handoff: gives the task to the target Agent
Sourcepub fn history(&self) -> Vec<HandoffRecord>
pub fn history(&self) -> Vec<HandoffRecord>
Gets the handoff history
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HandoffManager
impl RefUnwindSafe for HandoffManager
impl Send for HandoffManager
impl Sync for HandoffManager
impl Unpin for HandoffManager
impl UnsafeUnpin for HandoffManager
impl UnwindSafe for HandoffManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more