TypedHandoff
Defined in the handoff module.AI Agent Typed handoff with schema validation using Pydantic models. This class extends the base Handoff to add type safety through Pydantic schema validation. The sender declares an output schema, the receiver expects that schema, and the framework validates the payload at the boundary, raising HandoffValidationError if validation fails. The receiving agent’s prompt is constructed from validated JSON rather than raw string concatenation, enabling proper deserialization of structured data.
Constructor
Agent
required
No description available.
Type[T]
required
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional[Callable]
No description available.
Optional
No description available.
Optional[HandoffConfig]
No description available.
Methods
execute_programmatic()
Execute typed handoff programmatically with schema validation.
execute_async()
Execute typed handoff asynchronously with schema validation.
Usage
Source
View on GitHub
praisonaiagents/agent/handoff.py at line 1289
