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

# Escalation Pipeline • AI Agent SDK

> EscalationPipeline: Progressive escalation pipeline for agent execution.

# EscalationPipeline

> Defined in the [**pipeline**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/pipeline.md) module.

AI Agent

Progressive escalation pipeline for agent execution.

Implements a staged approach to task execution:

* Stage 0 (DIRECT): Immediate response without tools
* Stage 1 (HEURISTIC): Tool selection based on local signals
* Stage 2 (PLANNED): Lightweight planning with single LLM call
* Stage 3 (AUTONOMOUS): Full autonomous loop with verification

## Constructor

**config** `Optional[EscalationConfig]`

No description available.

**agent** `Optional`

No description available.

**tools** `Optional`

No description available.

**checkpoint\_service** `Optional`

No description available.

**on\_stage\_change** `Optional`

No description available.

## Methods

> [card] [analyze()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/EscalationPipeline-analyze.md)
>
> Analyze prompt and recommend initial stage.

> [card] [execute()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/EscalationPipeline-execute.md)
>
> Execute prompt with automatic escalation.

> [card] [execute\_at\_stage()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/EscalationPipeline-execute_at_stage.md)
>
> Execute prompt at specific stage.

> [card] [get\_current\_stage()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/EscalationPipeline-get_current_stage.md)
>
> Get current execution stage.

> [card] [get\_context()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/EscalationPipeline-get_context.md)
>
> Get current execution context.

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pipeline = EscalationPipeline()
    
    # Analyze and execute
    result = await pipeline.execute("Refactor the auth module")
    
    # Or analyze first, then execute
    stage = pipeline.analyze("Simple question")
    result = await pipeline.execute_at_stage("Simple question", stage)
```

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/escalation/pipeline.py#L24)
>
> `praisonaiagents/escalation/pipeline.py` at line 24


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