langchain-short-memory

Manages thread-scoped short-term memory for LangChain chat agents with trimming and summarization.

1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/dotlab-hq/storage-platform --skill langchain-short-memory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langchain-short-memory
Source: https://github.com/dotlab-hq/storage-platform/tree/main/.agents/skills/langchain-short-memory
Command: npx skills add https://github.com/dotlab-hq/storage-platform --skill langchain-short-memory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implement and tune short-term memory for LangChain/LangGraph chat agents, including thread-level persistence, trimming, deletion, and summarization patterns when conversation history grows.

Core Features & Use Cases

  • Thread-scoped memory (thread_id) for multi-turn conversations.
  • Memory lifecycle patterns: append, trim, summarize, selective delete.
  • Practical defaults that avoid context bloat.

Quick Start

Instantiate a LangChain agent with thread-scoped memory and enable trimming, summarization, and selective deletion to manage conversation history.

Frequently Asked Questions about langchain-short-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage short-term memory in LangChain to prevent context bloat?

Manage short-term memory in LangChain by applying thread-scoped persistence, trimming, summarization, and selective deletion to bound conversation history. These lifecycle patterns keep model performance stable as multi-turn conversations grow.

What is thread-scoped memory in LangGraph chat agents?

Thread-scoped memory in LangGraph chat agents isolates conversation history using a thread_id, ensuring each multi-turn chat maintains its own bounded context. This enables per-thread persistence, trimming, and summarization without cross-conversation interference.

How do I summarize conversation history for LangChain agents when the context grows?

Summarize conversation history for LangChain agents by setting summarization triggers that activate when the message window exceeds a defined size. This condenses older interactions into a summary, retaining context relevance while controlling token usage.

Can I selectively delete messages from LangGraph thread memory?

Yes, you can selectively delete messages from LangGraph thread memory through safe deletion handling. This pattern removes specific messages from conversation history while maintaining the integrity of the remaining thread context.

What is the best way to trim LangChain chat agent memory for multi-turn conversations?

The best way to trim LangChain chat agent memory is to apply message window sizing that bounds the number of retained messages per thread. This operational pattern drops older messages systematically, keeping recent context relevant for model performance.

Do I need a specific framework to use thread-level memory persistence and deletion patterns?

You need to be using LangChain or LangGraph to implement thread-level memory persistence and deletion patterns. The operational requirements specify thread_id scope, message window sizing, and safe deletion handling applicable to these frameworks.