Skip to main content

HandoffChain

Defined in the handoff module.
Rust AI Agent SDK Thread-safe handoff chain tracker.

Fields

NameTypeDescription
chainstd::sync::RwLock<Vec<String>>-

Methods

new

fn new() -> Self
Create a new handoff chain

get

fn get(&self) -> Vec<String>
Get current chain

depth

fn depth(&self) -> usize
Get current depth

push

fn push(&self, agent_name: impl Into<String>) -> ()
Push agent to chain Parameters:
NameType
agent_nameimpl Into&lt;String&gt;

pop

fn pop(&self) -> Option<String>
Pop agent from chain

contains

fn contains(&self, agent_name: &str) -> bool
Check if agent is in chain (cycle detection) Parameters:
NameType
agent_name&str

clear

fn clear(&self) -> ()
Clear the chain

Source

View on GitHub

praisonai/src/handoff/mod.rs at line 442