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

# From Outcome • AI Agent SDK

> from_outcome: Create HandoffResult from AgentRunOutcome.

# from\_outcome

Method

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

Create HandoffResult from AgentRunOutcome.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def from_outcome(outcome: AgentRunOutcome, target_agent: Optional[str], source_agent: Optional[str], handoff_depth: int) -> 'HandoffResult'
```

## Parameters

**outcome** `AgentRunOutcome` *required*

No description available.

**target\_agent** `Optional[str]`

No description available.

**source\_agent** `Optional[str]`

No description available.

**handoff\_depth** `int` (default: 0)

No description available.

### Returns

**Returns** `'HandoffResult'`

The result of the operation.

## Uses

* `cls`
* `outcome.is_success`

## Source

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


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