TencentDB Agent Memory for Openclaw

A zero-dependency local memory plugin powered by SQLite and sqlite-vec to bring powerful persistence and hybrid memory recall to your AI workflows.

cloudcode-hans
v1.0.1
May 22, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install local-tencentdb-agent-memory-flash

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 local-tencentdb-agent-memory-flash 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 TencentDB Agent Memory?

TencentDB Agent Memory is a high-performance, open-source conversational memory plugin created by the TencentDB team. Designed to run locally with zero external dependencies or initial configurations, it seamlessly adds persistent memory capabilities to your local AI agents. By leveraging SQLite and sqlite-vec directly, it bypasses complex database setups while ensuring quick read and write cycles.

This extension is an essential addition for developers exploring Openclaw Skills, providing an efficient way to persist preferences, recall past context, and refine tool-calling interactions without relying on cloud-hosted vector databases.

TencentDB Agent Memory Use Cases

  • Personalizing Assistant Personas: Retain explicit user instructions, names, and environment preferences across completely new sessions without cluttering the system prompt.
  • Long-Term Context Protection: Maintain context over extended debug sessions, preventing early context compression from purging important logical decisions.
  • Local-First Workflows: Run completely offline AI environments where embedding calculations can be handled locally via BM25 hybrid search.

How TencentDB Agent Memory Works

  1. Memory Extraction: Evaluates conversational turns and automatically extracts key factual declarations, deduplicating repetitive statements.
  2. Pipeline Triggering: Runs background refinery tasks every N conversation cycles or after a short idle timeout to condense dialogue fragments.
  3. Hybrid Recall Retrieval: Combines keyword-based search (BM25) and local vector embeddings to retrieve relevant background context on demand.
  4. Context Injection: Intelligently updates active agent states with highly contextual historical facts, preventing memory recall degradation during interaction.

TencentDB Agent Memory Setup

1. Installation Check

Ensure the plugin is not already installed before starting:

npm list -g tencentdb-agent-memory 2>&1
# Or search extension list directly:
openclaw plugins list 2>&1 | findstr memory-tencentdb

2. Install Plugin

If not found, execute the installation:

openclaw plugins install @tencentdb-agent-memory/memory-tencentdb

3. Apply Patch for Tool Calls (Optional)

To ensure tool calling executions are correctly memorized, run the following patch:

cd ~/.openclaw/extensions/memory-tencentdb
bash scripts/openclaw-after-tool-call-messages.patch.sh

4. Restart the Gateway

Apply changes by restarting:

openclaw gateway restart

TencentDB Agent Memory Data Schema & Taxonomy

Configuration Architecture (~/.openclaw/openclaw.json)

The system dynamically manages configurations under the memory-tencentdb namespace:

Category Parameter Default / Recommended Description
Extraction enableDedup true Prevents writing duplicate memories.
Extraction maxMemoriesPerSession 30 Upper threshold for single session storage.
Pipeline everyNConversations 3 Number of cycles before triggering extraction.
Pipeline l1IdleTimeoutSeconds 60 Delay threshold before local extraction triggers.
Recall strategy "hybrid" Dual vector & keyword-based recall mechanism.
Recall scoreThreshold 0.25 Low thresholds maximize background retrieval accuracy.
Embedding provider "none" Uses native SQLite BM25 when set to none.
Clean keepDays 30 Lifespan of raw L0 log storage.

Workspace Directory Configuration

Developers can enrich the memory context by manually organizing personality details in ~/.openclaw/workspace/:

  • SOUL.md: Identifies AI assistant identity rules, tone preferences, and core constraints.
  • USER.md: Documents user background, workspace settings, and current code stacks.

TencentDB Agent Memory Advanced Features

  • Custom Embedding Providers: Swap from the default local BM25 engine to external cloud providers like OpenAI embeddings in high-performance environments.
  • Automated Pipeline Cleanup: Self-cleaning mechanisms purge raw logging history older than 30 days to optimize disk usage.
  • Deep Tool Integration: Patches active gateway files to log tool execution states, broadening memory tracking to include successful system edits.
  • Smart Session Pruning: Advanced context protection parameters ensure local active caches preserve a soft-threshold buffer size during long-running tasks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*