# What Are Memory Assets in TencentDB Agent Memory? Decoupling Knowledge from Agent Frameworks

> Discover memory assets in TencentDB Agent Memory like Chat Memory, Skills, Wiki, and CodeGraph. Learn how a four-layer architecture decouples knowledge from agent frameworks for cross-framework sharing.

- Repository: [Tencent Cloud/TencentDB-Agent-Memory](https://github.com/TencentCloud/TencentDB-Agent-Memory)
- Tags: deep-dive
- Published: 2026-08-28

---

**Memory assets in TencentDB Agent Memory are unified, first-class objects—including Chat Memory, Skills, Wiki, and CodeGraph—that encapsulate reusable knowledge with standardized metadata, decoupled from agent frameworks through a four-layer architecture (Memory Hub, ACL Bindings, Proxy Injection, and Agent-Agnostic SDKs) enabling cross-framework sharing.**

The **TencentDB-Agent-Memory** repository provides a persistent knowledge layer that treats conversation history, skill definitions, documentation, and code relationships as portable **memory assets**. Unlike traditional agent implementations where knowledge is tightly bound to specific framework internals, this system isolates asset storage from execution runtimes, allowing the same skill or memory segment to power agents built with different frameworks.

## Understanding Memory Assets

In the TencentDB Agent Memory architecture, a memory asset is any reusable knowledge unit stored with strict typing, access controls, and versioning metadata. The system recognizes four primary asset types defined in [`sdk/memory-core/typescript/src/v3/metadata-types.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/sdk/memory-core/typescript/src/v3/metadata-types.ts)【/cache/repos/github.com/TencentCloud/TencentDB-Agent-Memory/feat/server_team/sdk/memory-core/typescript/src/v3/metadata-types.ts#L13-L15】:

- **Chat Memory** – Persisted conversation transcripts and context windows
- **Skills** – Reusable tool definitions and instruction sets
- **Wiki** (`llm_wiki`) – Structured documentation and reference materials  
- **CodeGraph** – Indexed code relationships and repository understanding

### Asset Entity Structure

Every asset is stored as an `AssetEntity` record containing identifiers, versioning, and usage statistics. The interface definition in [`metadata-types.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/metadata-types.ts) spans lines 85-100【/cache/repos/github.com/TencentCloud/TencentDB-Agent-Memory/feat/server_team/sdk/memory-core/typescript/src/v3/metadata-types.ts#L85-L100】:

```typescript
export type AssetType = "skill" | "llm_wiki" | "code_graph" | "chat_memory";
export type AssetVisibility = "private" | "team" | "restricted" | "agent" | "task";

export interface AssetEntity {
  asset_id: string;
  team_id: string;
  asset_type: AssetType;
  name: string;
  owner_user_id: string;
  visibility: AssetVisibility;
  status: AssetStatus;
  version: number;
  usage_count: number;
  // … additional metadata fields
}

```

Assets carry **visibility policies** (`private`, `team`, `restricted`, `agent`, or `task`) that determine access scope independently of which agent runtime loads them.

## The Four-Layer Decoupling Architecture

The decoupling of memory assets from specific agent frameworks operates through four distinct architectural layers, separating **knowledge persistence** from **agent execution**.

### L0 – Memory Hub: Framework-Independent Storage

The Memory Hub serves as the central persistence layer for all assets, accessible via REST-style endpoints under `/v3/asset/*`. Because assets reside in this centralized service rather than inside agent process memory, they survive agent restarts, framework migrations, and runtime changes. The hub maintains asset content separately from any binding logic.

### L1 – Fixed Binding and ACL: Dynamic Attachment

Asset bindings and Access Control Lists (ACLs) are stored in separate tables from the asset content itself. The `setAgentFixedAssets` API attaches assets to agents (or agent groups) without modifying the underlying asset. This separation means:

- One skill asset can be bound simultaneously to a DSH agent, a WorkBuddy agent, and a Hermes agent
- Assets transfer between teams by updating bindings rather than copying data
- Permissions change without asset redeployment

### L2 – Proxy Injection: Runtime Assembly

At request time, the Memory Proxy determines which assets satisfy the binding and ACL rules, then injects them into the agent's context. The proxy code in [`MemoryProxy/src/workbuddyHandler.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryProxy/src/workbuddyHandler.ts) (lines 203-221)【/cache/repos/github.com/TencentCloud/TencentDB-Agent-Memory/feat/server_team/MemoryProxy/src/workbuddyHandler.ts#L203-L221】wraps the request payload with a `<tdai_injections>` container:

```typescript
export function injectWorkbuddyAssets(
  requestBody: any,
  assets?: AssetCapabilityFlags
) {
  if (!assets) return requestBody;
  // Insert <tdai_injections> container with selected asset IDs
  requestBody.input[0].content = [
    { type: "tdai_injection", assets, ... },
    ...requestBody.input[0].content,
  ];
  return requestBody;
}

```

This injection occurs transparently—the agent receives the asset content without needing to know the asset's origin, storage location, or retrieval mechanism.

### L3 – Agent-Agnostic SDKs: Language Independence

Both TypeScript and Python SDKs expose identical CRUD methods for asset management. The `MetadataClient` provides framework-independent interfaces defined in [`sdk/memory-core/typescript/src/v3/metadata-client.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/sdk/memory-core/typescript/src/v3/metadata-client.ts) (lines 244-250)【/cache/repos/github.com/TencentCloud/TencentDB-Agent-Memory/feat/server_team/sdk/memory-core/typescript/src/v3/metadata-client.ts#L244-L250】. Agents use these clients regardless of whether they run on Node.js, Python, or other supported runtimes.

## Implementation Guide: Working with Memory Assets

### Creating and Binding a Skill Asset (TypeScript)

The following example creates a skill asset and binds it to a specific WorkBuddy agent using the TypeScript SDK:

```typescript
import { MetadataClient, AssetType, AssetVisibility } from '@tencentdb-agent-memory/memory-core';

// Initialize client pointing to the Memory Hub
const client = new MetadataClient({ baseURL: 'http://localhost:8125/api' });

// Create a Skill asset
const skill = await client.createAsset({
  asset_type: 'skill',
  name: 'ExtractRequirements',
  description: 'Parse requirements from raw text',
  owner_user_id: 'u-12345',
  visibility: 'team',
  status: 'draft',
  version: 1,
});

// Bind the skill to an agent
await client.setAgentFixedAssets('agent-workbuddy-01', [
  { asset_id: skill.asset_id, asset_type: 'skill' },
]);

console.log(`Skill ${skill.name} (ID ${skill.asset_id}) bound to WorkBuddy`);

```

The `createAsset` and `setAgentFixedAssets` methods are implemented in [`metadata-client.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/metadata-client.ts)【/cache/repos/github.com/TencentCloud/TencentDB-Agent-Memory/feat/server_team/sdk/memory-core/typescript/src/v3/metadata-client.ts#L244-L256】.

### Listing Accessible Assets (Python)

Python agents access the same memory assets through the equivalent SDK:

```python
from tencentdb_agent_memory.v3.metadata_client import MetadataClient

client = MetadataClient(base_url="http://localhost:8125/api")

# Retrieve chat memories accessible to the current user

resp = client.list_accessible_assets({
    "asset_type": "chat_memory",
    "visibility": "team",
    "limit": 20,
})

for asset in resp["items"]:
    print(f"{asset['asset_id']}: {asset['name']} (v{asset['version']})")

```

The `list_accessible_assets` method is defined in [`metadata-client.py`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/metadata-client.py)【/cache/repos/github.com/TencentCloud/TencentDB-Agent-Memory/feat/server_team/sdk/memory-core/python/tencentdb_agent_memory/v3/metadata_client.py#L255-L260】.

## Asset Lifecycle and Governance

Memory assets follow a strict lifecycle defined by the `AssetEntity` schema:

1. **Creation** – `MetadataClient.createAsset` registers the asset with initial metadata and visibility settings
2. **Binding** – `MetadataClient.setAgentFixedAssets` establishes runtime relationships without touching asset content
3. **Access** – The Memory Proxy reads bindings and ACLs, retrieves content, and injects it via `injectWorkbuddyAssets`
4. **Versioning and Expiration** – Assets carry `version` counters and optional `expires_at` timestamps, enabling safe upgrades and automatic cleanup via [`memory-cleaner.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/memory-cleaner.ts)

This governance model ensures that **knowledge** (the asset content) remains isolated from **execution** (the agent framework), allowing teams to upgrade LLMs or swap agent frameworks while retaining their complete asset library.

## Summary

- **Memory assets** unify Chat Memory, Skills, Wiki, and CodeGraph as first-class objects with standardized metadata in the TencentDB-Agent-Memory repository
- **Decoupling** occurs through four layers: centralized Memory Hub storage, separate ACL/binding tables, runtime proxy injection, and language-agnostic SDKs
- **Cross-framework sharing** is enabled because asset data persists independently from agent bindings, allowing DSH, WorkBuddy, and Hermes agents to share the same skills
- **REST APIs and SDKs** provide consistent access patterns across TypeScript and Python implementations
- **Lifecycle management** supports versioning, expiration, and automatic cleanup without framework-specific code changes

## Frequently Asked Questions

### What exactly constitutes a memory asset in TencentDB Agent Memory?

A memory asset is any persisted knowledge unit—specifically Chat Memory, Skills (tool definitions), Wiki documentation, or CodeGraph indices—stored as an `AssetEntity` with metadata including `asset_id`, `visibility`, `version`, and `usage_count`. These assets are defined in [`metadata-types.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/metadata-types.ts) and treated as portable objects independent of any specific agent implementation.

### How does the decoupling mechanism keep assets separate from agent frameworks?

Decoupling works through architectural separation: assets live in the centralized Memory Hub (L0), while bindings and ACLs reside in separate tables (L1). At runtime, the Memory Proxy injects assets into requests (L2), and agents use framework-agnostic SDKs (L3). This means a Python-based agent and a TypeScript-based agent can both use the same skill asset without code duplication or format conversion.

### What are the supported asset types and visibility levels?

The system supports four `AssetType` values: `"skill"`, `"llm_wiki"`, `"code_graph"`, and `"chat_memory"`. Visibility levels include `"private"` (owner only), `"team"` (shared within team), `"restricted"` (specific users), `"agent"` (specific agent instances), and `"task"` (ephemeral task-scoped access), allowing granular control over asset accessibility.

### How do agents access memory assets during execution?

Agents do not directly fetch assets. Instead, when an agent makes a request through the Memory Proxy, the proxy queries the binding tables to determine which assets the agent is authorized to use, retrieves the content from the Memory Hub, and injects it into the request payload using the `<tdai_injections>` wrapper pattern implemented in [`workbuddyHandler.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/workbuddyHandler.ts)【/cache/repos/github.com/TencentCloud/TencentDB-Agent-Memory/feat/server_team/MemoryProxy/src/workbuddyHandler.ts#L203-L221】.