# TencentDB Agent Memory Documentation > Source-backed docs for the @tencentdb-agent-memory/memory-tencentdb four-layer memory plugin: OpenClaw install, Hermes Gateway sidecar, L0–L3 pipeline, context offload, storage backends, tools, CLI, and operations. This is a Grok-Wiki source-grounded repository documentation set. Use the complete Markdown link when an agent needs the full repo context. ## Context Links - [Complete Markdown docs](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/llms-full.txt) - [Complete Markdown alias](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97.md) - [Human interactive docs](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97) - [GitHub repository](https://github.com/TencentCloud/TencentDB-Agent-Memory) ## Repository - Repository: TencentCloud/TencentDB-Agent-Memory - Generated: 2026-07-09T07:43:00.201Z - Updated: 2026-07-09T07:43:41.221Z - Runtime: Grok CLI - Format: Documentation - Pages: 21 ## Pages - [Overview](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/01-overview.md): What TencentDB Agent Memory exposes, who should use it, host entry points (OpenClaw plugin, Hermes provider, Gateway), and the first docs routes to follow. - [Installation](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/02-installation.md): Prerequisites (Node >= 22.16.0, OpenClaw >= 2026.3.13), openclaw plugins install/update, link-from-source development install, and postinstall patch behavior. - [Quickstart](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/03-quickstart.md): Zero-config enable in openclaw.json, gateway restart, success signals ([memory-tdai] logs, data dir layout), and first smoke checks with tdai tools. - [Memory layers](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/04-memory-layers.md): Repo-specific L0 conversation, L1 atom, L2 scene, and L3 persona model: producers, storage shapes, pipeline triggers, and drill-down paths. - [Context offload](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/05-context-offload.md): Symbolic short-term memory: tool-pair offload, L1/L1.5/L2 Mermaid canvas, L3 injection thresholds, node_id drill-down, and independent enable defaults. - [Host adapters](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/06-host-adapters.md): Host-neutral TdaiCore boundary: RuntimeContext, HostAdapter, LLMRunnerFactory, and OpenClaw vs standalone/Hermes Gateway adapter paths. - [Configure storage backends](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/07-configure-storage-backends.md): Choose sqlite (sqlite-vec + FTS5) or tcvdb, required tcvdb fields, embedding provider quadruplets, BM25 language, and verification of store health. - [Enable context offload](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/08-enable-context-offload.md): Turn on offload.enabled, register plugins.slots.contextEngine, apply after-tool-call patch, and confirm Mermaid injection and data under context-offload. - [Install on Hermes](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/09-install-on-hermes.md): Hermes MemoryProvider install paths (Docker greenfield, install_hermes_memory_tencentdb.sh, symlink/copy), Gateway sidecar supervision, and config.yaml provider keys. - [Seed historical conversations](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/10-seed-historical-conversations.md): Run openclaw memory-tdai seed with Format A/B JSON input, config overrides, output directory layout, and L0→L1→L2→L3 verification signals. - [Migrate SQLite to Tencent VectorDB](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/11-migrate-sqlite-to-tencent-vectordb.md): Build and run migrate-sqlite-to-tcvdb: dry-run, layer selection, openclaw.json rewrites, and post-migration storeBackend=tcvdb checks. - [Migrate from memory-tdai package](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/12-migrate-from-memory-tdai-package.md): Rename path from @tdai/memory-tdai to @tencentdb-agent-memory/memory-tencentdb: backup openclaw.json, uninstall old plugin, preserve ~/.openclaw/memory-tdai data, reinstall and verify. - [Configuration reference](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/13-configuration-reference.md): Full plugin config schema: timezone, storeBackend, capture, extraction, persona, pipeline, recall, embedding, tcvdb, bm25, report, llm, offload — defaults, constraints, and degrade rules. - [Agent tools](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/14-agent-tools.md): Registered tools tdai_memory_search and tdai_conversation_search: parameters, hybrid/embedding/keyword strategies, RRF merge, and combined 3-calls-per-turn limit. - [Gateway HTTP API](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/15-gateway-http-api.md): Standalone Hermes sidecar endpoints: GET /health, POST /recall, /capture, /search/memories, /search/conversations, /session/end, /seed — request/response fields and auth. - [CLI reference](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/16-cli-reference.md): openclaw memory-tdai seed flags, and package bins migrate-sqlite-to-tcvdb, export-tencent-vdb, read-local-memory including build prerequisites. - [Data directories](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/17-data-directories.md): On-disk layout for OpenClaw (~/.openclaw/memory-tdai), offload (~/.openclaw/context-offload), and Hermes MEMORY_TENCENTDB_ROOT trees: conversations, records, scene_blocks, vectors.db, persona, checkpoints. - [Gateway control](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/18-gateway-control.md): memory-tencentdb-ctl start/stop/status/health/logs and config subcommands in standalone vs hermes modes, path env overrides, and LLM credential injection. - [Export diagnostics](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/19-export-diagnostics.md): Run export-diagnostic.sh to package redacted config, gateway logs, and memory-tdai data; privacy notes and local-only delivery expectations. - [Troubleshooting](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/20-troubleshooting.md): Source-backed failure modes: plugin silent, no recall, embedding degrade, aggressive cleanup, offload slot/patch missing, Gateway circuit breaker, and recovery probes. - [Contributing](https://grok-wiki.com/public/docs/tencentcloud-tencentdb-agent-memory-14fefdd76c97/pages/21-contributing.md): Dev setup with openclaw plugins install --link, test scripts (vitest), build targets, commit conventions, and PR expectations. ## Source Files - `.github/workflows/pr-ci.yml` - `bin/export-tencent-vdb.mjs` - `bin/migrate-sqlite-to-tcvdb.mjs` - `bin/read-local-memory.mjs` - `CHANGELOG.md` - `CONTRIBUTING.md` - `docker/opensource/Dockerfile.hermes` - `docker/opensource/README-hermes.md` - `hermes-plugin/memory/memory_tencentdb/__init__.py` - `hermes-plugin/memory/memory_tencentdb/client.py` - `hermes-plugin/memory/memory_tencentdb/plugin.yaml` - `hermes-plugin/memory/memory_tencentdb/README.md` - `hermes-plugin/memory/memory_tencentdb/supervisor.py` - `hermes-plugin/memory/memory_tencentdb/tests/test_memory_tencentdb_recovery.py` - `index.ts` - `openclaw.plugin.json` - `package.json` - `README.md` - `scripts/bugfix-20260423/BUGFIX-20260423-SOP.md` - `scripts/export-diagnostic.sh` - `scripts/install_hermes_memory_tencentdb.sh` - `scripts/memory-tencentdb-ctl.sh` - `scripts/migrate-sqlite-to-tcvdb/cli-entry.ts` - `scripts/migrate-sqlite-to-tcvdb/config-write.ts` - `scripts/migrate-sqlite-to-tcvdb/README.md` - `scripts/migrate-sqlite-to-tcvdb/sqlite-to-tcvdb.ts` - `scripts/openclaw-after-tool-call-messages.patch.sh` - `scripts/README.memory-tencentdb-ctl.md` - `scripts/setup-offload.sh` - `SKILL-DIAGNOSTIC-EXPORT.md` - `SKILL-MIGRATION.md` - `SKILL.md` - `src/adapters/openclaw/host-adapter.ts` - `src/adapters/openclaw/llm-runner.ts` - `src/adapters/standalone/host-adapter.ts` - `src/adapters/standalone/llm-runner.ts` - `src/cli/commands/seed.ts` - `src/cli/index.ts` - `src/cli/README.md` - `src/config.ts` - `src/core/conversation/l0-recorder.ts` - `src/core/hooks/auto-capture.ts` - `src/core/hooks/auto-recall.ts` - `src/core/persona/persona-generator.ts` - `src/core/record/l1-extractor.ts` - `src/core/scene/scene-extractor.ts` - `src/core/seed/input.ts` - `src/core/seed/seed-runtime.ts` - `src/core/seed/types.ts` - `src/core/store/embedding.ts` - `src/core/store/factory.ts` - `src/core/store/search-utils.ts` - `src/core/store/sqlite.ts` - `src/core/store/tcvdb.ts` - `src/core/tdai-core.ts` - `src/core/tools/conversation-search.ts` - `src/core/tools/memory-search.ts` - `src/core/types.ts` - `src/gateway/config.ts` - `src/gateway/server.ts` - `src/gateway/types.ts` - `src/offload/hooks/after-tool-call.ts` - `src/offload/hooks/llm-input-l3.ts` - `src/offload/index.ts` - `src/offload/pipelines/l2-mermaid.ts` - `src/offload/storage.ts` - `src/offload/types.ts` - `src/utils/checkpoint.ts` - `src/utils/ensure-hook-policy.ts` - `src/utils/manifest.ts` - `src/utils/no-think-fetch.ts` - `src/utils/openclaw-state-dir.ts` - `src/utils/pipeline-factory.ts` - `src/utils/pipeline-manager.ts` - `vitest.config.ts` - `vitest.e2e.config.ts`