Using Dakera with LangChain for persistent agent memory #209
ferhimedamine
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
I wanted to share how we use Dakera as the persistent memory backend for LangChain agents. The key challenge: LangChain’s built-in
ConversationBufferMemoryis ephemeral — every restart loses context. Withdakera-langchain, memories survive restarts, scale across sessions, and decay gracefully so agents don’t get overwhelmed by stale context.Installation
Code example
Session grouping
For multi-user or multi-conversation setups, you can group memories by session:
Why importance scoring matters
Each memory gets an
importancevalue (0.0–1.0). Dakera applies time-based decay, so low-importance memories fade over time while high-importance ones (user preferences, key facts) persist. This means your agent’s context stays relevant without manual cleanup.Self-hosting
All of this runs on a single Docker container with zero external dependencies:
No cloud account needed, no external vector database, no separate embedding service.
Happy to answer questions about the integration pattern! What use cases are you building with persistent agent memory?
Beta Was this translation helpful? Give feedback.
All reactions