What Are the Four Memory Assets in TencentDB Agent Memory?
TencentDB Agent Memory defines four distinct memory-asset types—chat_memory, llm_wiki, code_graph, and skill—that enable Agents to persist conversations, recall structured knowledge, perform semantic code queries, and execute reusable capabilities.
The TencentDB Agent Memory platform organizes reusable knowledge into discrete memory assets that Agents bind to during workflows. These assets determine what context an Agent can access, from raw conversation history to executable code skills. Understanding the four asset types is essential for configuring an Agent's "loadout" to match specific task requirements.
The Four Memory Asset Types Defined
TencentDB Agent Memory implements four specific asset types in its TypeScript SDK, each defined in separate modules of the repository.
1. Chat Memory (chat_memory)
The chat_memory asset serves as the core conversational store for Agent-User interactions. It maintains layered L0-L3 data structures that include raw messages, conversation summaries, vector embeddings, and attached files. According to the source code in [MemoryPanel/src/panel/http/routes/chat-memory.ts](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/feat/server_team/MemoryPanel/src/panel/http/routes/chat-memory.ts), this asset type handles the REST API endpoints for persistent session storage.
2. LLM Wiki (llm_wiki)
The llm_wiki asset represents a structured knowledge-base containing processed wiki-style documents in plain text or Markdown format. Developers use this asset type for retrieval-augmented generation (RAG) workflows where Agents need to reference static documentation. The implementation resides in [MemoryPanel/web/src/lib/api/knowledge-api.ts](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/feat/server_team/MemoryPanel/web/src/lib/api/knowledge-api.ts), which provides endpoints for uploading and querying wiki content.
3. Code Graph (code_graph)
The code_graph asset stores graph-based representations of source-code artifacts, including functions, classes, and dependency relationships. Unlike linear wiki documents, this asset enables semantic code search and navigation across repository structures. The same knowledge-api.ts module handles code_graph assets, filtering them distinctly from wiki content to support specialized graph queries.
4. Skill (skill)
The skill asset encapsulates reusable callable capabilities such as API clients, prompt templates, or custom functions. While not a data store like the other three types, skills are treated as memory assets because Agents bind to them and invoke them during conversation turns. The [MemoryProxy/src/skill/skill-bridge.ts](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/feat/server_team/MemoryProxy/src/skill/skill-bridge.ts) file implements the bridge layer for skill creation and execution.
Creating and Accessing Memory Assets via the SDK
The memory-core TypeScript SDK exposes methods for creating and binding these assets. Below are minimal examples for each asset type:
// 1️⃣ Ensure chat_memory exists (typically handled automatically)
await client.ensureChatMemory({
team_id: teamId,
agent_id: agentId,
});
// 2️⃣ Upload an llm_wiki asset
await client.createAsset({
asset_type: 'llm_wiki',
name: 'Product-FAQ',
content: Buffer.from(markdownText),
});
// 3️⃣ Upload a code_graph asset
await client.createAsset({
asset_type: 'code_graph',
name: 'Repo-Graph',
content: Buffer.from(JSON.stringify(codeGraph)),
});
// 4️⃣ Register a skill asset
await client.createAsset({
asset_type: 'skill',
name: 'Translate-API',
metadata: { endpoint: 'https://api.example.com/translate' },
});
The AssetType union is defined in sdk/memory-core/typescript/src/v3/metadata-types.ts, ensuring type safety across all create and bind operations.
How Memory Assets Power Agent Workflows
Binding the appropriate TencentDB Agent Memory assets to an Agent tailors its knowledge access to specific tasks. When an Agent processes a user turn, it queries chat_memory for historical context, retrieves relevant passages from llm_wiki, searches code relationships through code_graph, and executes capabilities via bound skill assets.
This modular approach reduces cognitive load by ensuring Agents access only the knowledge required for the current task. The separation of concerns between conversational history, structured documentation, code semantics, and executable tools allows developers to compose specialized Agent configurations without cross-contamination of contexts.
Summary
- TencentDB Agent Memory organizes knowledge into four discrete asset types:
chat_memory,llm_wiki,code_graph, andskill. - Each asset type serves a distinct purpose: conversational persistence, structured wiki retrieval, semantic code navigation, and executable capability invocation.
- Implementation files include
chat-memory.tsfor conversation storage,knowledge-api.tsfor wiki and graph assets, andskill-bridge.tsfor skill management. - The TypeScript SDK provides
createAsset()andensureChatMemory()methods to programmatically manage these resources.
Frequently Asked Questions
What is the primary function of chat_memory in TencentDB Agent Memory?
The chat_memory asset persistently stores layered conversation data (L0-L3) including raw messages, summaries, embeddings, and file attachments for specific Agent-User pairs. It is implemented in MemoryPanel/src/panel/http/routes/chat-memory.ts and serves as the foundational context store for maintaining dialogue continuity across sessions.
How does code_graph differ from llm_wiki assets?
While llm_wiki stores linear documentation in text or Markdown format for basic retrieval, code_graph represents source code as a semantic graph of functions, classes, and dependencies. This graph structure enables complex code navigation and relationship queries that linear wiki documents cannot support.
Can Agents bind multiple memory assets simultaneously?
Yes, TencentDB Agent Memory supports multi-asset binding, allowing a single Agent to access chat_memory for conversation history while querying llm_wiki for documentation, searching code_graph for code references, and invoking multiple skill assets during a single turn. This composition pattern is central to the platform's "loadout" configuration model.
Where are skill assets defined in the TencentDB Agent Memory source code?
Skill assets are defined and managed in MemoryProxy/src/skill/skill-bridge.ts, which handles both the registration of new skills and their runtime invocation by Agents. Unlike data-oriented assets, skills are executable capabilities that Agents call as tools during workflow execution.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →