From Outcome • AI Agent SDK

from_outcome: Create HandoffResult from AgentRunOutcome.

from_outcome

Method

</div>

This is a method of the HandoffResult class in the handoff module.

Create HandoffResult from AgentRunOutcome.

Signature

python
def from_outcome(outcome: AgentRunOutcome, target_agent: Optional[str], source_agent: Optional[str], handoff_depth: int) -> 'HandoffResult'

Parameters

ParamField AgentRunOutcome

No description available.

ParamField Optional[str]

No description available.

ParamField Optional[str]

No description available.

ParamField int

No description available.

Returns

ResponseField 'HandoffResult'

The result of the operation.

Uses

  • cls
  • outcome.is_success

Source

View on GitHub

praisonaiagents/agent/handoff.py at line 349