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

# Run Outcome • AI Agent SDK

> Structured run outcome types for agent execution results.

# 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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import run_outcome
```

## Classes

> [card] [TerminationReason](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/TerminationReason.md)
>
> Typed terminal reasons for an autonomous run.

> [card] [AgentRunOutcome](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/AgentRunOutcome.md)
>
> Structured outcome for agent execution, validation, and handoff operations.

> [card] [RunTerminal](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/RunTerminal.md)
>
> One authoritative way a run ended — a closed discriminated union.

## Functions

> [card] [termination\_to\_run\_status()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/termination_to_run_status.md)
>
> Map a `TerminationReason` (or its string value) to a `RunStatus`.

> [card] [validate\_decision\_string()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/validate_decision_string.md)
>
> Convert legacy validation decision strings to typed RunStatus.

> [card] [is\_sticky()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/is_sticky.md)
>
> Whether `outcome` can never be overwritten by a later observation.

> [card] [merge\_run\_terminal()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/merge_run_terminal.md)
>
> Fold a newly-observed terminal into the current one (refine-only).

> [card] [collapse()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/collapse.md)
>
> Project a `RunTerminal` onto the existing `RunStatus` vocabulary.

### Constants

| Name | Value |
| - | - |
| `_STICKY_SOURCES` | `frozenset({'external', 'run_budget', 'superseded'})` |


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