> ## 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.

# Agent Handoff • AI Agent SDK

> agent_handoff: Emit agent handoff event for tracking agent-to-agent flow.

# agent\_handoff

Method

> This is a method of the [**ContextTraceEmitter**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/ContextTraceEmitter.md) class in the [**context\_events**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/context_events.md) module.

Emit agent handoff event for tracking agent-to-agent flow.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    input["Input Data"] --> agent["Agent: agent_handoff"]
    agent --> output["Output Result"]
    style agent fill:#8B0000,color:#fff
    style input fill:#8B0000,color:#fff
    style output fill:#8B0000,color:#fff
```

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def agent_handoff(from_agent: str, to_agent: str, reason: Optional[str], context_passed: Optional[Dict[str, Any]], kind: str, node_id: Optional[str]) -> None
```

## Parameters

**from\_agent** `str` *required*

No description available.

**to\_agent** `str` *required*

No description available.

**reason** `Optional[str]`

No description available.

**context\_passed** `Optional`

No description available.

**kind** `str` (default: 'handoff')

`handoff` (agent hands over), `delegate` (the hierarchical manager assigns a task), `route` or `spawn`.

**node\_id** `Optional[str]`

Graph node concerned; defaults to the receiving agent.

## Uses

* `ContextEvent`
* `time.time`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/trace/context_events.py#L1154)
>
> `praisonaiagents/trace/context_events.py` at line 1154

***

## Related Documentation

> [card] [Agents Concept](https://praison.ai/docs/docs/concepts/agents)

> [card] [Single Agent Guide](https://praison.ai/docs/docs/guides/single-agent)

> [card] [Multi-Agent Guide](https://praison.ai/docs/docs/guides/multi-agent)

> [card] [Agent Configuration](https://praison.ai/docs/docs/configuration/agent-config)

> [card] [Auto Agents](https://praison.ai/docs/docs/features/autoagents)


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