Skip to main content

run_outcome

AI Agent Structured run outcome types for agent execution results. Provides a typed, closed discriminant union for agent run completions, task validation outcomes, and handoff results across the SDK. Replaces freeform string-based validation outcomes with type-safe status values that enable exhaustive error handling and structured metadata.

Import

Classes

TerminationReason

Typed terminal reasons for an autonomous run.

AgentRunOutcome

Structured outcome for agent execution, validation, and handoff operations.

Functions

termination_to_run_status()

Map a TerminationReason (or its string value) to a RunStatus.

validate_decision_string()

Convert legacy validation decision strings to typed RunStatus.