# ConversationStringBufferMemory

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/memory/buffer/ConversationStringBufferMemory)

A basic memory implementation that simply stores the conversation history.

This stores the entire conversation history in memory without any
additional processing.

Equivalent to ConversationBufferMemory but tailored more specifically
for string-based conversations rather than chat models.

Note that additional processing may be required in some situations when the
conversation history is too large to fit in the context window of the model.

## Signature

```python
ConversationStringBufferMemory()
```

## Extends

- `BaseMemory`

## Properties

- `human_prefix`
- `ai_prefix`
- `buffer`
- `output_key`
- `input_key`
- `memory_key`
- `memory_variables`

## Methods

- [`validate_chains()`](https://reference.langchain.com/python/langchain-classic/memory/buffer/ConversationStringBufferMemory/validate_chains)
- [`load_memory_variables()`](https://reference.langchain.com/python/langchain-classic/memory/buffer/ConversationStringBufferMemory/load_memory_variables)
- [`aload_memory_variables()`](https://reference.langchain.com/python/langchain-classic/memory/buffer/ConversationStringBufferMemory/aload_memory_variables)
- [`save_context()`](https://reference.langchain.com/python/langchain-classic/memory/buffer/ConversationStringBufferMemory/save_context)
- [`asave_context()`](https://reference.langchain.com/python/langchain-classic/memory/buffer/ConversationStringBufferMemory/asave_context)
- [`clear()`](https://reference.langchain.com/python/langchain-classic/memory/buffer/ConversationStringBufferMemory/clear)
- [`aclear()`](https://reference.langchain.com/python/langchain-classic/memory/buffer/ConversationStringBufferMemory/aclear)

## ⚠️ Deprecated

Deprecated since version 0.3.1. Use langchain.agents.create_agent instead. Will be removed in version 2.0.0. For agents that need to remember prior interactions, use `create_agent` with checkpointing or the `Store` API. See https://docs.langchain.com/oss/python/langchain/short-term-memory and https://docs.langchain.com/oss/python/langchain/long-term-memory

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/185119f98e6286253a2326d7cf4f59592678023d/libs/langchain/langchain_classic/memory/buffer.py#L94)