๐—š๐—ถ๐˜ƒ๐—ฒ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ง๐˜†๐—ฝ๐—ฒ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜ ๐—”๐—œ ๐—”๐—ด๐—ฒ๐—ป๐˜๐˜€ ๐—Ÿ๐—ผ๐—ป๐—ด-๐—ง๐—ฒ๐—ฟ๐—บ ๐— ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†

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?

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:

Avoid these two common mistakes:

  1. 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.

  2. 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:

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.

Source: https://dev.to/jackchenme/give-your-typescript-ai-agents-long-term-memory-with-tencentdb-agent-memory-elm

Optional learning community: https://t.me/GyaanSetuAi