Handoff Input Data • Rust AI Agent SDK

HandoffInputData: Data passed to a handoff target agent.

HandoffInputData

Defined in the handoff module.

Rust AI Agent SDK

Data passed to a handoff target agent.

Fields

NameTypeDescription
messagesVec<serde_json::Value>Messages to pass to target agent
contextHashMap<StringAdditional context data
serde_json:Value>Additional context data
source_agentOption<String>Name of the source agent
handoff_depthusizeCurrent handoff depth
handoff_chainVec<String>Chain of agents in the handoff

Methods

new

rust
fn new() -> Self

Create new handoff input data

messages

rust
fn messages(mut self, messages: Vec<serde_json::Value>) -> Self

Set messages

Parameters:

NameType
messagesVec&lt;serde_json::Value&gt;

context

rust
fn context(mut self, key: impl Into<String>, value: serde_json::Value) -> Self

Add context

Parameters:

NameType
keyimpl Into&lt;String&gt;
valueserde_json::Value

source_agent

rust
fn source_agent(mut self, agent: impl Into<String>) -> Self

Set source agent

Parameters:

NameType
agentimpl Into&lt;String&gt;

Source

View on GitHub

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


Related Documentation