memory-tencentdb for Openclaw

A production-grade, four-layer memory architecture plugin for OpenClaw that automates dialogue capture, parses structural logs, and manages dynamic user profiles.

paudyyin
v1.0.0
Jun 16, 2026
0
378
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install memory-tencentdb-setup

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install memory-tencentdb-setup using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is memory-tencentdb?

The memory-tencentdb plugin is a sophisticated cognitive storage and retrieval system designed to enhance Openclaw Skills. By organizing memory across four levels, it allows AI agents to move beyond transient chat histories toward authentic context retention and personalization. The plugin intercepts all conversational traffic, archiving dialogues locally and building analytical representations of the user.

Integrating directly with the OpenClaw platform, it works quietly in the background, structuring memory without introducing performance bottlenecks. This architecture ensures your autonomous agents are backed by a consistent, queryable brain, unlocking high-quality customized experiences across long periods of time.

memory-tencentdb Use Cases

  • Dynamic Context Injection: Retrieve historic interactions and user attributes during live chats to construct deeply personalized prompt contexts.
  • Dynamic User Profiling: Establish automated systems for tracking user habits, preferences, and operational styles without human annotation.
  • Long-Term Context Recovery: Organize and recall discrete scene groups to bridge conversations that occur days or weeks apart.
  • Raw Data Archiving: Save exact copies of user prompts and agent responses into structured, local JSONL archives for future indexing.

How memory-tencentdb Works

  1. L0: Dialogue Capture: The plugin intercepts all inbound and outbound messages, generating raw sequential JSONL logs.
  2. L1: Structural Parsing: An active background process monitors idle states and structured extraction intervals, parsing raw conversations into episodic, semantic, or instructional memories.
  3. L2: Scene Indexing: Records are associated with distinct scene-level metadata chunks, optimizing semantic query efficiency.
  4. L3: Profile Generation: Long-term characteristics and preferences are synthesized iteratively into a permanent, queryable user blueprint.

memory-tencentdb Setup

1. Retrieve the Plugin

Install memory-tencentdb globally using ClawHub, or copy the package directly to your plugin home:

# Standard installation via ClawHub
clawhub install memory-tencentdb

Alternatively, locate your plugin home directory manually:

  • Windows: %APPDATA%\mx\openclaw-home\<account>\.openclaw\plugins\memory-tencentdb
  • macOS/Linux: ~/.openclaw/plugins/memory-tencentdb

2. Solve Dependency Issues

Because the OpenClaw Gateway executes plugins via jiti, it is vital to install critical runtime dependencies (like js-tiktoken) in the Gateway directory, not the plugin package directory itself.

# Run npm install inside the plugin directory to grab node_modules
cd "[Plugin Folder Path]"
npm install --ignore-scripts

# Copy js-tiktoken node module to Gateway
Copy-Item -Path ".\node_modules\js-tiktoken" -Destination "[Gateway Folder Path]\node_modules\js-tiktoken" -Recurse -Force

Option B (Direct Gateway Install):

cd "[Gateway Folder Path]"
npm install js-tiktoken --ignore-scripts

3. Edit Configuration (openclaw.json)

Add memory-tencentdb to the plugin and memory slots inside your main config file:

{
  "plugins": {
    "enabled": true,
    "allow": ["mx", "memory-tencentdb"],
    "load": {
      "paths": ["~/.openclaw/plugins/memory-tencentdb"]
    },
    "slots": {
      "memory": "memory-tencentdb"
    },
    "entries": {
      "memory-tencentdb": {
        "enabled": true,
        "config": {
          "pipeline": {
            "everyNConversations": 3,
            "enableWarmup": true,
            "l1IdleTimeoutSeconds": 10
          }
        }
      }
    }
  }
}

4. Restart Gateway Process

Configuration signals like SIGUSR1 will not load new binary code. You must fully restart the Gateway service to load any new Openclaw Skills packages:

openclaw gateway stop
openclaw gateway start

memory-tencentdb Data Schema & Taxonomy

Key Directory Mapping

The plugin writes persistent memory data directly inside your agent home path:

OS Platform Target Memory Path
Windows %APPDATA%\mx\openclaw-home\<account>\.openclaw\memory-tdai\
macOS / Linux ~/.openclaw/memory-tdai/

Database Schema and Files

Inside the root storage path (memory-tdai), memory-tencentdb maintains the following schemas:

Data Resource Data Format Core Purpose
/conversations/ JSON Lines (.jsonl) Stores raw sequential conversations (L0 memory layer)
/records/ JSON Holds parsed semantic, episodic, and instruction objects (L1 memory layer)
vectors.db SQLite Database SQLite local database designed for vector and embedding retrieval

Key Pipeline Configurations

You can tweak system parameters within openclaw.json:

  • pipeline.everyNConversations: Set how frequently (in total dialog sessions) the cognitive processor processes memory tasks. Defaults to 3.
  • pipeline.enableWarmup: Triggers local database checks and index preparation upon initialization.
  • pipeline.l1IdleTimeoutSeconds: Dictates the time (seconds) to wait during an idle period before executing memory compilation background tasks. Defaults to 10.

memory-tencentdb Advanced Features

  • Structured Cognitive Pipeline: Implements four memory hierarchies spanning raw recordings (L0) to deep structured user insights (L3).
  • Native Gateway LLM Support: Avoids independent network requests by executing semantic parses directly via built-in gateway LLMs.
  • Embedded Vector Indexing: Seamlessly connects vector retrieval via local SQLite databases (better-sqlite3), removing external server requirements.
  • Sophisticated Configuration Parameters: Offers granular control over background parser intervals, timeout durations, and warmups for highly responsive memory management.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*