What Are the Four Reusable Memory Assets in TencentDB Agent Memory?
TencentDB Agent Memory defines four core reusable memory assets—Chat Memory, Skill, Wiki, and CodeGraph—that capture different knowledge types and enable cross-agent inheritance through the Memory Hub.
The TencentCloud/TencentDB-Agent-Memory repository provides a persistent memory layer designed to eliminate repetitive context gathering in LLM agent workflows. These four reusable memory assets are registered uniformly in the Memory Hub, allowing agents to load previous conversations, invoke proven workflows, retrieve documentation, and analyze code relationships without starting from scratch.
Architecture: The Memory Hub and Access Control
All reusable memory assets in TencentDB Agent Memory are managed through a central Memory Hub. According to the source code in README.md, the hub implements a Fixed Binding + ACL mechanism that determines which assets a particular agent may access.
This design enables fine-grained sharing while respecting privacy boundaries. Assets can be scoped to individual agents, teams, or broader visibility levels, ensuring that sensitive Chat Memory remains restricted while public Skills and Wiki pages are freely callable.
The Four Reusable Memory Assets
Chat Memory
Chat Memory stores preferences, facts, decisions, and the full interaction history of an agent. As documented in README.md (lines 92-100), it retains raw dialogues at Layer 0 (L0) and progressively distills higher abstraction layers (L1-L3) to condense lengthy conversations into actionable context.
Agents can load a previous conversation without asking users to repeat context, making this asset essential for long-running support or development sessions.
Skill
Skill captures executable expertise extracted from chats or tool calls. The README.md (lines 106-110) describes Skills as complete workflow packages including versions, resource files (like release.yaml), trigger boundaries, execution steps, and validation rules.
Once a human validates a workflow, it becomes a callable asset that any authorized agent can invoke on demand via the /v3/skill/create endpoint.
Wiki
Wiki consists of structured documentation pages built from product docs, design specs, and runbooks. As noted in README.md (lines 118-122), Wiki assets include a link-graph that captures relationships between pages.
This structure enables fast retrieval and link-drill-down exploration, allowing agents to navigate documentation hierarchically rather than scanning entire file trees.
CodeGraph
CodeGraph maintains an indexed graph of code symbols, files, call relationships, and impact paths. According to README.md (lines 126-130), this asset allows agents to query callers and callees, perform impact analysis, and retrieve only the specific code fragments relevant to a task.
Working with Assets via the MemoryCore API
The MemoryCore service exposes REST endpoints for creating and querying these assets. The following examples assume the core service runs on http://localhost:8420 with a valid serviceToken.
Creating a Chat Memory Asset
Use the /v3/memory/create endpoint to register conversation history for team-wide access:
curl -X POST http://localhost:8420/v3/memory/create \
-H "Authorization: Bearer <serviceToken>" \
-H "Content-Type: application/json" \
-d '{
"type": "chat_memory",
"team_id": "team-1",
"name": "User-Interview-Chat",
"visibility": "team"
}'
Registering a Skill
Extracted workflows are registered via /v3/skill/create with version control and resource attachments:
curl -X POST http://localhost:8420/v3/skill/create \
-H "Authorization: Bearer <serviceToken>" \
-H "Content-Type: application/json" \
-d '{
"team_id": "team-1",
"skill_id": "release-checklist",
"name": "Release Checklist",
"description": "Step-by-step release procedure",
"version": "v1.0",
"resource_files": ["release.yaml"]
}'
Ingesting Wiki and CodeGraph Knowledge
Both Wiki and CodeGraph assets are created through the /v3/knowledge/create endpoint, differentiated by the type parameter:
Wiki creation:
curl -X POST http://localhost:8420/v3/knowledge/create \
-H "Authorization: Bearer <serviceToken>" \
-H "Content-Type: application/json" \
-d '{
"type": "wiki",
"knowledge_id": "product-specs",
"team_id": "team-1",
"name": "Product Specification",
"service_url": "http://ks:8421/v3",
"source_url": "https://example.com/spec.pdf"
}'
CodeGraph indexing:
curl -X POST http://localhost:8420/v3/knowledge/create \
-H "Authorization: Bearer <serviceToken>" \
-H "Content-Type: application/json" \
-d '{
"type": "codegraph",
"knowledge_id": "repo-frontend",
"team_id": "team-1",
"name": "Frontend Repo",
"service_url": "http://ks:8421/v3",
"repo_url": "https://github.com/example/frontend.git"
}'
Querying Available Assets
Agents discover accessible assets through the tools API:
# List all visible assets
curl -X POST http://localhost:8420/v3/tools/list \
-H "Authorization: Bearer <serviceToken>" \
-H "Content-Type: application/json" \
-d '{"team_id":"team-1"}'
# Retrieve specific Wiki content
curl -X POST http://localhost:8420/v3/tools/call \
-H "Authorization: Bearer <serviceToken>" \
-H "Content-Type: application/json" \
-d '{"tool":"wiki","knowledge_id":"product-specs","page_id":"introduction"}'
Key Implementation Files
The four reusable memory assets are implemented across these specific files in the TencentDB-Agent-Memory repository:
README.md(root): High-level overview of Chat Memory, Skill, Wiki, and CodeGraph architectures (lines 92-130)MemoryCore/README.md: Defines core APIs and metadata storage for all asset typesMemoryKnowledge/README.md: Implements Wiki and CodeGraph indexing servicesMemoryPanel/README.md: UI panel for managing the four asset typessdk/memory-core/typescript/README.md: TypeScript client examples for asset operationssdk/memory-core/python/README.md: Python SDK equivalents for asset creation and querying
Summary
- Chat Memory retains raw and distilled conversation layers (L0-L3), enabling agents to resume context without repetition.
- Skill packages executable workflows with versioning and resource files, making proven expertise callable across agents.
- Wiki stores structured documentation with link-graphs for semantic navigation and fast retrieval.
- CodeGraph indexes repository symbols and relationships, supporting impact analysis and precise code fragment retrieval.
- All assets are managed through the Memory Hub with Fixed Binding + ACL controls for secure, granular sharing.
Frequently Asked Questions
How does the Memory Hub control access to the four reusable memory assets?
The Memory Hub implements a Fixed Binding + ACL mechanism described in the root README.md. This system maps specific agents to assets while enforcing privacy boundaries—Chat Memory might be restricted to individual agents, while Skills and Wiki pages can be shared at the team level or broader visibility scopes.
What distinguishes Layer 0 from Layer 3 in Chat Memory?
Layer 0 (L0) stores the raw, unprocessed dialogue history between agents and users. As conversations progress, the system distills this into higher layers (L1-L3), progressively condensing raw content into structured facts, preferences, and decisions that are faster to query and inject into prompts.
How do agents perform impact analysis using CodeGraph?
Agents query the CodeGraph asset via the /v3/tools/call endpoint to retrieve caller and callee relationships, file dependencies, and symbol definitions. This graph structure—implemented in MemoryKnowledge/README.md—allows agents to analyze which code fragments are affected by a proposed change without scanning entire repositories.
Can skills be transferred between different teams?
Skills are created with a team_id and visibility parameter. While initially bound to the creating team, the ACL mechanism in the Memory Hub can grant cross-team access permissions. The resource_files array (e.g., ["release.yaml"]) travels with the skill definition, ensuring that executable expertise remains portable and version-controlled across organizational boundaries.
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 →