Introduction¶
When integrating memory capabilities into a DSH plugin, if the target environment already has a running TencentDB Agent Memory Gateway/Core, you usually do not want to replicate a MemoryCore, vector store, and extraction pipeline locally. dsh-tdai-memory-adapter is a lightweight Adapter designed for this scenario: it reuses the running Gateway/Core and connects DSH’s lifecycle events to the memory service.
This plugin is maintained by Vocllum and is licensed under the MIT license. It is positioned as an “automatic recall, turn capture, and read-only search tool.” It mainly solves three things: injecting relevant memory into the context before every DSH step, capturing and handing over to the existing MemoryCore when a conversation turn ends, and providing a set of read-only search tools for the model.
What is it¶
dsh-tdai-memory-adapter is the TencentDB Agent Memory Adapter for DeepSeek Harness.
Instead of moving the entire memory stack into DSH, it acts as an adapter layer between DSH and the existing memory service:
- Triggering recall during the DSH lifecycle;
- Capturing conversations when a turn ends or a session flushes;
- Reusing the existing Gateway/Core to complete subsequent memory consolidation;
- Registering read-only search tools with DSH.
Core Capabilities¶
The following capabilities are the main focus of the plugin.
Automatic Recall¶
The plugin retrieves relevant memory from the existing Gateway before agent/pre-step and injects it into the current context. In other words, before DSH prepares to execute the next step, it retrieves relevant memory first, rather than waiting for the model to actively query.
Turn Capture¶
The plugin captures conversations at agent/turn-stopping or session/flush to avoid duplicate submissions. Memory processing after capture is still handed over to the existing MemoryCore.
Background Consolidation¶
The existing MemoryCore will asynchronously perform L1/L2/L3 and Skill extraction. The plugin itself does not replicate the MemoryCore nor directly manage the local memory directory.
Read-Only Search Tools¶
The plugin provides the following read-only search tools:
tdai_memory_searchtdai_conversation_searchtdai_skill_search
These tools are used to query existing memory, conversation history, and backend-managed Skills; they do not provide write access or arbitrary execution entry points.
Fault Isolation¶
When the Gateway or memory service is abnormal, the plugin adopts a fail-open behavior, not blocking the DSH main process. This means that issues with the memory link should not directly cause DSH to stop running.
Difference from dsh-tdai-memory¶
We need to distinguish this from another project: Scorp1o117/dsh-tdai-memory.
| Project | Positioning |
|---|---|
Scorp1o117/dsh-tdai-memory |
Moves the entire MemoryCore, storage, vectors, and extraction pipeline to DSH and provides a settings UI. |
dsh-tdai-memory-adapter |
Lightweight Adapter that reuses a running TencentDB Agent Memory Gateway/Core, focusing only on DSH lifecycle, identity passing, and tool registration. |
dsh-tdai-memory-adapter does not replicate the MemoryCore, manage the local memory directory, implement MemoryProxy, or expose arbitrary URL/HTTP executors.
If a project in the deployment environment already occupies the same package name, you should choose one based on the deployment mode; they cannot share the same package name.
Installation and Usage¶
The plugin requires a Node.js version of at least 22:
engines.node >=22
If installing from a remote repository in the target environment, you can use the following command:
dsh plugin --profile web add https://github.com/Vocllum/DSH-TDAI-Memory-Adapter.git
After installation, restart the target DSH profile.
If you want to install from local source code, you can first clone the repository and then add the local directory:
git clone https://github.com/Vocllum/DSH-TDAI-Memory-Adapter.git
dsh plugin --profile web add ./DSH-TDAI-Memory-Adapter
Configuration¶
The plugin connects to the existing memory service via environment variables. Below are the configuration items given in the README:
export TDAI_MEMORY_ENDPOINT=http://127.0.0.1:8420
export TDAI_MEMORY_API_KEY=...
export TDAI_MEMORY_INSTANCE_ID=default
export TDAI_MEMORY_TEAM_ID=default
export TDAI_MEMORY_AGENT_ID=your-agent-id
export TDAI_MEMORY_USER_ID=your-user-id
export TDAI_MEMORY_RECALL_LIMIT=5
Two points need to be noted here:
TDAI_MEMORY_ENDPOINTpoints to the running Gateway;- When identity configuration is missing, memory operations for that session will be disabled, but DSH will not be blocked.
The plugin documentation mentions that keys are not written to files, model context, or tool results.
Tools and Gateway Paths¶
The plugin exposes read-only search tools that correspond to the following Gateway paths:
| Tool | Purpose | Gateway Path |
|---|---|---|
tdai_memory_search |
Search structured long-term memory | /v3/atomic/search |
tdai_conversation_search |
Search raw conversation history | /v3/conversation/search |
tdai_skill_search |
Search backend-managed Skills | /v3/skill/search |
When using these tools in DSH, it essentially calls the query interfaces in the existing memory service, rather than creating a new local search system inside the plugin.
Use Cases and Notes¶
This plugin is more suitable for the following deployments:
- A running TencentDB Agent Memory Gateway/Core already exists;
- You wish for DSH to directly connect to existing memory instead of maintaining a local MemoryCore, storage, and vectors;
- You need automatic recall, turn capture, and a small amount of read-only search capability;
- You hope that when the memory service is abnormal, the DSH main process is not blocked.
It is recommended to confirm the following before use:
- The current DSH runtime environment meets Node.js 22 or above;
- Gateway address, API Key, Instance, Team, Agent, and User identity configurations are available;
- The plugin runs with the current
dshprocess permissions; check the source code, dependencies, and license before installation; - If
Scorp1o117/dsh-tdai-memoryhas already been deployed, confirm the package name and deployment mode first and do not mix it with this project.
Conclusion¶
The value of dsh-tdai-memory-adapter lies not in reimplementing the memory system, but in connecting DSH’s lifecycle events to the existing TencentDB Agent Memory service: recall, turn capture, and read-only search are all completed around the existing Gateway/Core. Suitable for teams with existing memory backends who wish to keep DSH’s integration lightweight.
Directory page:
https://www.skillhub.cn/plugins/Vocllum/DSH-TDAI-Memory-Adapter
GitHub repository:
https://github.com/Vocllum/DSH-TDAI-Memory-Adapter