# Chat History API

Persistent conversation storage.

::: langchain_cockroachdb.chat_message_histories.CockroachDBChatMessageHistory
    options:
      show_root_heading: true
      show_source: false

## Key Methods

| Method | Description |
|--------|-------------|
| `add_user_message()` | Add user message |
| `add_ai_message()` | Add AI response |
| `add_message()` | Add any message type |
| `clear()` | Clear session history |
| `messages` | Get all messages |

## Examples

See [Chat History Guide](../guides/chat-history.md) for comprehensive examples.
