home / skills / a5c-ai / babysitter / langchain-memory
This skill helps you implement and manage LangChain memory types for chatbots, enabling short-term recall, long-term context, and semantic retrieval.
npx playbooks add skill a5c-ai/babysitter --skill langchain-memoryReview the files below or copy the command above to add this skill to your agents.
---
name: langchain-memory
description: LangChain memory integration including ConversationBufferMemory, ConversationSummaryMemory, and vector-based memory
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
---
# LangChain Memory Skill
## Capabilities
- Implement various LangChain memory types
- Configure ConversationBufferMemory for short-term recall
- Set up ConversationSummaryMemory for long conversations
- Integrate vector-based memory for semantic search
- Design memory retrieval strategies
- Handle memory persistence and serialization
## Target Processes
- conversational-memory-system
- chatbot-design-implementation
## Implementation Details
### Memory Types
1. **ConversationBufferMemory**: Stores full conversation history
2. **ConversationBufferWindowMemory**: Rolling window of recent messages
3. **ConversationSummaryMemory**: Summarizes older messages
4. **ConversationSummaryBufferMemory**: Hybrid approach
5. **VectorStoreRetrieverMemory**: Semantic similarity-based retrieval
### Configuration Options
- Memory key naming conventions
- Return message format (string vs messages)
- Summary LLM selection
- Vector store backend selection
- Token limits and window sizes
### Dependencies
- langchain
- langchain-community
- Vector store client (optional)
This skill implements LangChain memory patterns to give agents short-term and long-term conversational recall and vector-based semantic retrieval. I provide ready-to-configure ConversationBufferMemory, ConversationSummaryMemory, and vector-store retriever memory types for chatbots and agent workflows. The focus is practical integration, persistence, and retrieval strategies for reliable conversational behavior.
I wire up multiple LangChain memory classes and expose configuration for keys, return formats, token/window limits, and summary LLM selection. ConversationBufferMemory and windowed buffers keep recent messages; summary memories compress older history; vector-based memory indexes embeddings for semantic lookup. I also handle serialization and persistence so memory survives restarts and supports deterministic orchestration.
Which memory type should I pick for short sessions?
Use ConversationBufferMemory or ConversationBufferWindowMemory to preserve recent turns with minimal setup.
How do I reduce token usage for long chats?
Add ConversationSummaryMemory or a ConversationSummaryBufferMemory to compress older messages and limit the active token window.