经 AI Skill Hub 精选评估,腾讯DB智能代理 获评「强烈推荐」。已获得 6.1k 颗 GitHub Star,这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.0 分,适合有一定技术背景的用户使用。
腾讯DB智能代理 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
腾讯DB智能代理 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:npm 全局安装 npm install -g tencentdb-agent-memory # 方式二:npx 直接运行(无需安装) npx tencentdb-agent-memory --help # 方式三:项目依赖安装 npm install tencentdb-agent-memory # 方式四:从源码运行 git clone https://github.com/TencentCloud/TencentDB-Agent-Memory cd TencentDB-Agent-Memory npm install npm start
# 命令行使用
tencentdb-agent-memory --help
# 基本用法
tencentdb-agent-memory [options] <input>
# Node.js 代码中使用
const tencentdb_agent_memory = require('tencentdb-agent-memory');
const result = await tencentdb_agent_memory.run(options);
console.log(result);
# tencentdb-agent-memory 配置说明 # 查看配置选项 tencentdb-agent-memory --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export TENCENTDB_AGENT_MEMORY_CONFIG="/path/to/config.yml"
<img src="./assets/images/logo.png" alt="TencentDB Agent Memory" width="880" />
Memory is not about hoarding everything in the AI — it is about sparing humans from having to repeat themselves.
In practice, we constantly re-explain the same SOPs, project background, tool conventions, and output formats to the Agent. Such information should not require repetition, nor should it be indiscriminately dumped into the context.
TencentDB Agent Memory helps the Agent learn your workflows, retain task context, and reuse past experience. We reject both brute-force history accumulation and irreversible lossy summarization. Instead, we design memory as a layered system: symbolic memory for in-task information overload, and memory layering for cross-session experience.
Let the Agent remember what should be remembered, so people can focus on judgment, creation, and work that truly matters.
---
TencentDB Agent Memory = symbolic short-term memory + layered long-term memory. - Symbolic short-term memory offloads heavy tool logs and condenses them into compact Mermaid symbols, cutting token usage and improving task success. - Layered long-term memory distills fragmented conversations into structured personas and scenes, instead of flat vector piles.
When integrated with OpenClaw, it cuts token usage by up to 61.38%, improves pass rate by 51.52% (relative), and raises PersonaMem accuracy from 48% to 76%.
| Memory Capability | Benchmark | OpenClaw Success | With Plugin | Relative Δ | OpenClaw Tokens | With Plugin Tokens | Relative Δ |
|---|---|---|---|---|---|---|---|
| **Short-term** | WideSearch | 33% | **50%** | **+51.52%** | 221.31M | **85.64M** | **−61.38%** |
| **Short-term** | SWE-bench | 58.4% | **64.2%** | **+9.93%** | 3474.1M | **2375.4M** | **−33.09%** |
| **Short-term** | AA-LCR | 44.0% | **47.5%** | **+7.95%** | 112.0M | **77.3M** | **−30.98%** |
| **Long-term** | PersonaMem | 48% | **76%** | **+59%** | — | — | — |
These results are measured over continuous long-horizon sessions, not isolated turns. For example, SWE-bench runs 50 consecutive tasks per session to simulate the context-accumulation pressure of real-world long-horizon agents.
---
{
"memory-tencentdb": {
"config": {
"offload": {
"enabled": true
}
}
}
}
Add the slots field so OpenClaw routes context-offload requests to this plugin:
{
"plugins": {
"slots": {
"contextEngine": "memory-tencentdb"
}
}
}
For the best results, run the patch script below. It hooks after-tool-call messages so they can be offloaded and recovered correctly:
bash scripts/openclaw-after-tool-call-messages.patch.sh
💡 The patch only needs to be applied once per OpenClaw installation. After upgrading OpenClaw, re-run the script to re-apply.
openclaw plugins install @tencentdb-agent-memory/memory-tencentdb
openclaw gateway restart
Please use the native OpenClaw command to upgrade the plugin. This approach prevents the plugin from being disabled caused by semantic version ranges.> openclaw plugins update @tencentdb-agent-memory/memory-tencentdb >
cd docker/opensource
docker build -f Dockerfile.hermes -t hermes-memory .
| OpenClaw × Agent Memory | Hermes × Agent Memory |
---
| Capability | Description |
|---|---|
| OpenClaw plugin | Automatically captures, extracts, and recalls memory once installed |
| Hermes Gateway adapter | TdaiCore + HostAdapter, decoupled from the host framework |
| Local backend | SQLite + sqlite-vec, ready to use out of the box |
| Hybrid retrieval | BM25 + vector + RRF — supports both keyword and semantic recall |
| Agent tools | tdai_memory_search / tdai_conversation_search |
---
Defaults to a local SQLite + sqlite-vec backend.
// ~/.openclaw/openclaw.json
{
"memory-tencentdb": {
"enabled": true
}
}
Once enabled, TencentDB Agent Memory automatically handles conversation capture, memory extraction, scene aggregation, persona generation, and recall before the next turn.
The Hermes Gateway listens on :8420 and exposes capture / search / recall HTTP endpoints. Two opt-in switches let you turn it from "open localhost sidecar" into "authenticated network service". Both default to off so existing deployments keep working unchanged.
| Field | env | Default | Description |
|---|---|---|---|
server.apiKey | TDAI_GATEWAY_API_KEY | _(unset)_ | When set, every route except GET /health requires Authorization: Bearer <apiKey>; missing or wrong tokens get HTTP 401. Comparison is constant-time. |
server.corsOrigins | TDAI_CORS_ORIGINS (comma-separated) | [] | CORS allow-list. Empty list emits **no** Access-Control-Allow-* headers — browsers then block all cross-origin requests. Use ["*"] only for local development. |
When apiKey is unset, the gateway prints a startup WARN. If it is bound to a non-loopback host (e.g. 0.0.0.0) without an apiKey, a second louder warning is emitted.
Clients call protected routes with a Bearer token:
curl -H "Authorization: Bearer $TDAI_GATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"...","session_key":"..."}' \
http://127.0.0.1:8420/recall
GET /health stays open without a token so orchestrator probes (docker healthcheck, kubectl liveness) keep working.
Every field has a sensible default — it runs with zero configuration. When you want to tune, peel back the layers based on how deep you go.
<details> <summary><b>🟢 Level 1 · Daily tuning</b> (covers 90% of use cases)</summary>
| Field | Default | Description |
|---|---|---|
timezone | "system" | Timezone for user/LLM-facing timestamps: "system" (follow process tz) / IANA name (Asia/Shanghai) / offset string (+08:00) |
storeBackend | "sqlite" | Storage backend: sqlite |
recall.strategy | "hybrid" | Recall strategy: keyword / embedding / hybrid (RRF fusion, recommended) |
recall.maxResults | 5 | Number of items returned per recall |
recall.maxCharsPerMemory | 0 | Max characters injected for one recalled L1 memory; 0 disables this guard |
recall.maxTotalRecallChars | 0 | Total character budget for auto-recalled L1 memories; 0 disables this guard |
pipeline.everyNConversations | 5 | Trigger an L1 memory extraction every N turns |
extraction.maxMemoriesPerSession | 20 | Max memories extracted per L1 pass |
persona.triggerEveryN | 50 | Generate the user persona every N new memories |
offload.enabled | false | Whether to enable short-term compression |
</details>
<details> <summary><b>🟡 Level 2 · Advanced tuning</b> (long task / long session)</summary>
| Field | Default | Description |
|---|---|---|
pipeline.enableWarmup | true | Warm-up: a new session triggers from turn 1, doubling each time up to N (1→2→4→…) |
pipeline.l1IdleTimeoutSeconds | 600 | Trigger L1 after the user has been idle for this many seconds |
pipeline.l2MinIntervalSeconds | 900 | Minimum interval between two L2 passes within the same session |
recall.timeoutMs | 5000 | Recall timeout; on timeout, skip injection without blocking the conversation |
extraction.enableDedup | true | L1 vector dedup / conflict detection |
capture.excludeAgents | [] | Glob patterns to exclude specific agents (e.g. bench-judge-*) |
capture.l0l1RetentionDays | 0 | Local retention days for L0 / L1 files; 0 = never clean up |
offload.mildOffloadRatio | 0.5 | Mild compression trigger ratio (of context window) |
offload.aggressiveCompressRatio | 0.85 | Aggressive compression trigger ratio |
offload.mmdMaxTokenRatio | 0.2 | Token budget ratio for MMD injection |
bm25.language | "zh" | Tokenizer language: zh (jieba) / en |
</details>
<details> <summary><b>🔴 Level 3 · Full parameter reference</b> (ops / custom models / remote embedding)</summary>
For all fields, types, and constraints see openclaw.plugin.json。
- embedding.* — remote embedding service (OpenAI-compatible API) - embedding.sendDimensions (default true): whether to include the dimensions field in the request body. OpenAI text-embedding-3-* models rely on it for Matryoshka truncation, but some self-hosted / OSS models (e.g. BGE-M3) do not support custom dimensions and will reject the request with HTTP 400 does not support matryoshka representation. Set it to false for those backends, e.g.:
{
"embedding": {
"enabled": true,
"provider": "openai",
"baseUrl": "http://your-host:your-port/v1",
"apiKey": "<KEY>",
"model": "bge-m3",
"dimensions": 1024,
"sendDimensions": false
}
}
- llm.* — standalone LLM mode (bypass OpenClaw's built-in model and run L1/L2/L3 with a designated API) - offload.backendUrl / backendApiKey — offload the L1/L1.5/L2/L4 flow to a backend service - report.* — metrics reporting
</details>
---
MODEL_API_KEY="your-api-key" MODEL_BASE_URL="https://api.lkeap.cloud.tencent.com/v1" MODEL_NAME="deepseek-v3.2" MODEL_PROVIDER="custom"
The Hermes memory_tencentdb plugin is a client of the Gateway. To make it talk to a Gateway that has auth enabled, set:
export MEMORY_TENCENTDB_GATEWAY_API_KEY="<same-secret-as-gateway>"
The plugin will then attach Authorization: Bearer <key> to every request it sends to the Gateway. If the variable is unset, the plugin sends no auth header — which matches the Gateway's legacy default and is fine for a Gateway that has not opted into TDAI_GATEWAY_API_KEY.
Important: the plugin only handles the client half. Whether the Gateway actually enforces a Bearer check is decided on the Gateway side (TDAI_GATEWAY_API_KEY / server.apiKey). Configure the same secret on both ends — the plugin does not propagate the secret across, since the Gateway might be started by Docker, systemd, or any other means outside the plugin's control.
If MEMORY_TENCENTDB_GATEWAY_API_KEY is unset, the plugin also looks at TDAI_GATEWAY_API_KEY as a fallback — handy when both processes share an env file and the operator only wants to set one variable name. The Gateway never reads MEMORY_TENCENTDB_GATEWAY_API_KEY; that name is plugin-side only.
---
高质量的AI工作流项目,提供本地长期内存
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
AI Skill Hub 点评:腾讯DB智能代理 的核心功能完整,质量优秀。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | TencentDB-Agent-Memory |
| Topics | AI代理内存工作流 |
| GitHub | https://github.com/TencentCloud/TencentDB-Agent-Memory |
| License | NOASSERTION |
| 语言 | TypeScript |
收录时间:2026-06-24 · 更新时间:2026-06-24 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端