> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Typed Handoff • AI Agent SDK

> TypedHandoff: Typed handoff with schema validation using Pydantic models.

# TypedHandoff

> Defined in the [**handoff**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/handoff.md) 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** `Agent` *required*

No description available.

**input\_schema** `Type[T]` *required*

No description available.

**tool\_name\_override** `Optional[str]`

No description available.

**tool\_description\_override** `Optional[str]`

No description available.

**on\_handoff** `Optional[Callable]`

No description available.

**input\_filter** `Optional`

No description available.

**config** `Optional[HandoffConfig]`

No description available.

## Methods

> [card] [execute\_programmatic()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/TypedHandoff-execute_programmatic.md)
>
> Execute typed handoff programmatically with schema validation.

> [card] [execute\_async()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/TypedHandoff-execute_async.md)
>
> Execute typed handoff asynchronously with schema validation.

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from pydantic import BaseModel
    from praisonaiagents.agent.handoff import TypedHandoff, HandoffValidationError
    
    class ResearchResult(BaseModel):
        summary: str
        citations: list[str] 
        confidence: float
        
    # Create typed handoff
    typed_handoff = TypedHandoff(
        agent=writer_agent,
        input_schema=ResearchResult
    )
    
    # Valid payload
    result = ResearchResult(
        summary="AI research findings", 
        citations=["ref1", "ref2"], 
        confidence=0.92
    )
    response = typed_handoff.execute_programmatic(source_agent, result)
    
    # Invalid payload raises HandoffValidationError
    bad_payload = {"summary": "...", "citations": "not-a-list"}
    typed_handoff.execute_programmatic(source_agent, bad_payload)  # Raises error
```

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/handoff.py#L1514)
>
> `praisonaiagents/agent/handoff.py` at line 1514

***

## Related Documentation

> [card] [Handoffs Concept](https://praison.ai/docs/docs/concepts/handoffs)

> [card] [Handoffs Feature](https://praison.ai/docs/docs/features/handoffs)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.