> ## 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 History • AI Agent SDK

> get_history: Get optimization history.

# get\_history

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

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

Get optimization history.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_history() -> List[Dict[str, Any]]
```

### Returns

<ResponseField name="Returns" type="List[Dict[str, Any]]">
  The result of the operation.
</ResponseField>

## Uses

* `e.to_dict`

## Source

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