๐๐ถ๐๐ฒ ๐ฌ๐ผ๐๐ฟ ๐ง๐๐ฝ๐ฒ๐ฆ๐ฐ๐ฟ๐ถ๐ฝ๐ ๐๐ ๐๐ด๐ฒ๐ป๐๐ ๐๐ผ๐ป๐ด-๐ง๐ฒ๐ฟ๐บ ๐ ๐ฒ๐บ๐ผ๐ฟ๐
Most multi-agent frameworks lack long-term memory. They work for a single run. Once the task ends, the agents forget everything. They do not remember what a user said last week or what they concluded in previous sessions.
For a support bot or an assistant, this is a failure.
You can fix this by adding a memory layer. This post shows how to connect the open-multi-agent framework to TencentDB-Agent-Memory (TDAM).
TDAM is an open-source system from Tencent Cloud. It turns raw conversations into searchable long-term memory. It stores everything on your local disk.
Why use TDAM?
- You own the infrastructure.
- Data stays on your machine.
- It distills raw text into facts, scenes, and personas.
- It uses hybrid search (BM25 and vector).
How the integration works:
The framework uses a key-value contract for a single run. This requires a local map to keep track of tasks. For memory across different runs, the adapter talks to the TDAM Gateway via HTTP.
The adapter splits duties:
- Inside a run: Use a local map for exact data retrieval.
- Across runs: Use TDAM to recall distilled context for agent prompts.
Avoid these two common mistakes:
The User Role Trap TDAM extracts memories about the user. It ignores the AI assistant output by design. If you send agent results as assistant content, TDAM stores nothing. You must phrase the capture so the agent reports results as the user speaking.
The Extraction Threshold Trap TDAM does not extract memories instantly. It waits for a conversation count threshold or a timer. In short demos, the second capture might sit in a buffer and never save. To fix this for testing, set everyNConversations to 1 in your config.
The result is a complete memory loop:
- Run one: The agents work and write data to TDAM.
- TDAM: Distills the work into a single episodic memory.
- Run two: The agents recall that memory and use it to build on previous conclusions.
This setup adds complexity. You must run a sidecar service and an extraction LLM. Use this when privacy and layered memory are your priority. Use a simple Redis or SQLite store if you only need a basic scratchpad.
Optional learning community: https://t.me/GyaanSetuAi