How-To Guides#

Types#

The first set of examples all highlight different types of memory.

Buffer: How to use a type of memory that just keeps previous messages in a buffer.

Buffer Window: How to use a type of memory that keeps previous messages in a buffer but only uses the previous k of them.

Summary: How to use a type of memory that summarizes previous messages.

Summary Buffer: How to use a type of memory that keeps a buffer of messages up to a point, and then summarizes them.

Entity Memory: How to use a type of memory that organizes information by entity.

Knowledge Graph Memory: How to use a type of memory that extracts and organizes information in a knowledge graph

Usage#

The examples here all highlight how to use memory in different ways.

Adding Memory: How to add a memory component to any single input chain.

ChatGPT Clone: How to recreate ChatGPT with LangChain prompting + memory components.

Adding Memory to Multi-Input Chain: How to add a memory component to any multiple input chain.

Conversational Memory Customization: How to customize existing conversation memory components.

Custom Memory: How to write your own custom memory component.

Adding Memory to Agents: How to add a memory component to any agent.

Conversation Agent: Example of a conversation agent, which combines memory with agents and a conversation focused prompt.

Multiple Memory: How to use multiple types of memory in the same chain.