# InMemoryChatMessageHistory

> **Class** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/chat_history/InMemoryChatMessageHistory)

In memory implementation of chat message history.

Stores messages in a memory list.

## Signature

```python
InMemoryChatMessageHistory()
```

## Extends

- `BaseChatMessageHistory`
- `BaseModel`

## Properties

- `messages`

## Methods

- [`aget_messages()`](https://reference.langchain.com/python/langchain-core/chat_history/InMemoryChatMessageHistory/aget_messages)
- [`add_message()`](https://reference.langchain.com/python/langchain-core/chat_history/InMemoryChatMessageHistory/add_message)
- [`aadd_messages()`](https://reference.langchain.com/python/langchain-core/chat_history/InMemoryChatMessageHistory/aadd_messages)
- [`clear()`](https://reference.langchain.com/python/langchain-core/chat_history/InMemoryChatMessageHistory/clear)
- [`aclear()`](https://reference.langchain.com/python/langchain-core/chat_history/InMemoryChatMessageHistory/aclear)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/311675a517f51ec6c77454124293c58df517e952/libs/core/langchain_core/chat_history.py#L202)