Agentic framework for memory management
Top 40.6% on sourcepulse
LangMem provides tooling for AI agents to learn and adapt from interactions over time, enabling personalized responses and consistent behavior. It targets developers building stateful AI agents, offering primitives for memory extraction, prompt optimization, and long-term knowledge persistence.
How It Works
LangMem offers a core memory API compatible with any storage system and integrates natively with LangGraph's storage layer. It features "hot path" memory management tools that agents can invoke during active conversations for recording and searching information. A "background" manager can also automatically extract and consolidate knowledge. This approach allows agents to dynamically manage their memory, deciding what to store and when to retrieve it via search tools.
Quick Start & Requirements
pip install -U langmem
export ANTHROPIC_API_KEY="sk-..."
).InMemoryStore
.Highlighted Details
Maintenance & Community
langchain-ai
organization.Licensing & Compatibility
Limitations & Caveats
The InMemoryStore
is suitable for testing but loses data on restart; production use requires a persistent, database-backed store. The README does not specify the project's license.
5 days ago
1 day