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

# Context Manager • AI Agent SDK

> context_manager: Set context manager directly.

# context\_manager

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

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

Set context manager directly.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def context_manager(value: Any) -> Any
```

## Parameters

<ParamField query="value" type="Any" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Any">
  The result of the operation.
</ResponseField>

## Source

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

***

## Related Documentation

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

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

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