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

# Chat History • AI Agent SDK

> chat_history: Set chat history (updates the underlying async-safe state with lock).

# chat\_history

<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 chat history (updates the underlying async-safe state with lock).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def chat_history(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>

## Uses

* `lock`

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Chat Feature" icon="comments" href="/docs/docs/features/chat" />

  <Card title="Conversation Stores" icon="database" href="/docs/docs/databases/overview" />
</CardGroup>
