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

# Get Context • AI Agent SDK

> get_context: Get current execution context.

# get\_context

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**EscalationPipeline**](../classes/EscalationPipeline) class in the [**pipeline**](../modules/pipeline) module.

Get current execution context.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_context() -> Optional[StageContext]
```

### Returns

<ResponseField name="Returns" type="Optional[StageContext]">
  The result of the operation.
</ResponseField>

## Used By

* [`Agent.get_memory_context`](../functions/Agent-get_memory_context)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/escalation/pipeline.py#L512">
  `praisonaiagents/escalation/pipeline.py` at line 512
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Context Concept" icon="layer-group" href="/docs/docs/concepts/context" />

  <Card title="Context Management" icon="sliders" href="/docs/docs/features/context-management" />

  <Card title="Context Strategies" icon="diagram-project" href="/docs/docs/features/context-strategies" />
</CardGroup>
