mirror of
https://github.com/TencentCloud/TencentDB-Agent-Memory
synced 2026-07-10 12:34:27 +00:00
[good first issue] docs(hermes): document plugging memory-tencentdb into an existing Hermes (#139)
* docs(hermes): document plugging memory-tencentdb into an existing Hermes
The Hermes section in README.md / README_CN.md only documented the
all-in-one Docker image, which is the wrong starting point when the
user already has hermes-agent installed. They don't want to throw
away their setup just to get memory; they want to drop the provider
in next to the other built-in providers.
The full reference already exists at
`hermes-plugin/memory/memory_tencentdb/README.md` (auto-discovery
paths, env vars, supervisor behaviour, troubleshooting). What's
missing is the discoverable entry point at the top-level README.
Restructure section 2 into two parallel paths:
- 2.A Docker — the existing one-command flow, unchanged.
- 2.B Plug into an existing Hermes (no Docker) — new. Covers:
- installing the npm package so the Gateway source is on disk
- symlink vs copy of the Python provider into
`<hermes-agent-checkout>/plugins/memory/memory_tencentdb/`
(with the "underscore not hyphen" trap called out)
- the `memory.provider: memory_tencentdb` line in `~/.hermes/config.yaml`
- the three `MEMORY_TENCENTDB_LLM_*` env vars
- the three Gateway-start options (auto-discovery / explicit
GATEWAY_CMD / run-yourself), with auto-discovery as default
- a `curl /health` verification step
- a link to the in-repo provider README for the full reference
Docs-only — no code change. Existing Docker users see no difference.
Fixes #69
Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
* docs(hermes): document tdai gateway config file
* update README_CN.md file
* Fix formatting in README_CN.md for clarity
* Clarify Hermes plugin installation instructions
Updated the README to clarify installation instructions for the Hermes plugin, including Docker usage and configuration steps.
---------
Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
Co-authored-by: 十五便士 <95488710+Maxwell-Code07@users.noreply.github.com>
This commit is contained in:
@@ -193,9 +193,18 @@ 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.
|
||||
|
||||
|
||||
### 2. Hermes (Docker, requires version ≥ 0.3.4)
|
||||
### 2. Hermes
|
||||
|
||||
In addition to OpenClaw, this plugin also supports [Hermes](https://github.com/NousResearch/hermes-agent) Agent. You can launch a memory-enabled Hermes with a single command:
|
||||
In addition to OpenClaw, this plugin also supports [Hermes](https://github.com/NousResearch/hermes-agent) Agent. Choose the installation path based on your deployment scenario:
|
||||
|
||||
| You want to … | Use |
|
||||
|---|---|
|
||||
| Spin up a memory-enabled Hermes from scratch in one command | 2.A Docker (below) |
|
||||
| Add memory to an existing Hermes install | 2.B Plug into an existing Hermes (next section) |
|
||||
|
||||
#### 2.A Docker (greenfield, requires version ≥ 0.3.4)
|
||||
|
||||
The Docker image bundles `hermes-agent` and the `memory_tencentdb` provider together. The Gateway listens on `:8420`:
|
||||
|
||||
```bash
|
||||
# ============ Configuration Parameters ============
|
||||
@@ -244,6 +253,97 @@ docker exec -it hermes-memory hermes
|
||||
|
||||
> The image ships with Tencent Cloud DeepSeek-V3.2 as the default. If you use this model, omit `MODEL_BASE_URL` / `MODEL_NAME` / `MODEL_PROVIDER` and pass only `MODEL_API_KEY`.
|
||||
|
||||
#### 2.B Attach to Existing Hermes (No Docker)
|
||||
|
||||
If you already have `hermes-agent` installed on your host and just want to add memory capabilities, **no Docker image is needed**.
|
||||
|
||||
**1. Download the plugin package to a unified directory**:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.memory-tencentdb
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
cd "$TEMP_DIR"
|
||||
npm init -y --silent
|
||||
npm install @tencentdb-agent-memory/memory-tencentdb@latest --omit=dev
|
||||
cp -r node_modules/@tencentdb-agent-memory/memory-tencentdb \
|
||||
~/.memory-tencentdb/tdai-memory-openclaw-plugin
|
||||
rm -rf "$TEMP_DIR"
|
||||
```
|
||||
|
||||
**2. Install Gateway dependencies**:
|
||||
|
||||
```bash
|
||||
cd ~/.memory-tencentdb/tdai-memory-openclaw-plugin
|
||||
npm install --omit=dev
|
||||
npm install tsx
|
||||
```
|
||||
|
||||
**3. Link to the Hermes plugin directory**:
|
||||
|
||||
```bash
|
||||
rm -rf ~/.hermes/hermes-agent/plugins/memory/memory_tencentdb
|
||||
ln -sf ~/.memory-tencentdb/tdai-memory-openclaw-plugin/hermes-plugin/memory/memory_tencentdb \
|
||||
~/.hermes/hermes-agent/plugins/memory/memory_tencentdb
|
||||
```
|
||||
|
||||
> The directory **must** be named `memory_tencentdb` (with an underscore) — Hermes uses this as the provider key. `memory-tencentdb` (with a hyphen) is only an alias at the config level and **cannot** be used as the directory name.
|
||||
|
||||
**4. Declare the provider in `~/.hermes/config.yaml`**:
|
||||
|
||||
```yaml
|
||||
memory:
|
||||
provider: memory_tencentdb
|
||||
```
|
||||
|
||||
**5. Configure Gateway environment variables**
|
||||
|
||||
Edit `~/.hermes/.env` and add:
|
||||
|
||||
```bash
|
||||
MEMORY_TENCENTDB_GATEWAY_CMD="sh -c 'cd ~/.memory-tencentdb/tdai-memory-openclaw-plugin && exec npx tsx src/gateway/server.ts'"
|
||||
MEMORY_TENCENTDB_GATEWAY_HOST="127.0.0.1"
|
||||
MEMORY_TENCENTDB_GATEWAY_PORT="8420"
|
||||
```
|
||||
|
||||
Add LLM credentials as needed (the Gateway actually reads the `TDAI_LLM_*` variables):
|
||||
|
||||
```bash
|
||||
TDAI_LLM_API_KEY="sk-your-api-key-here"
|
||||
TDAI_LLM_BASE_URL="https://api.openai.com/v1"
|
||||
TDAI_LLM_MODEL="gpt-4o"
|
||||
```
|
||||
|
||||
Alternatively, use a Gateway config file at `~/.memory-tencentdb/memory-tdai/tdai-gateway.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"llm": {
|
||||
"baseUrl": "https://your-api-endpoint/v1",
|
||||
"apiKey": "your-api-key",
|
||||
"model": "your-model-name"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**6. Start the Gateway** (choose one of two methods):
|
||||
|
||||
- **Auto-discovery on conversation (recommended, zero-config)**: Don't start the Gateway manually — just start talking to Hermes. The provider will auto-detect `~/.memory-tencentdb/tdai-memory-openclaw-plugin/src/gateway/server.ts` and launch it via `Popen()` on the first conversation. The initial conversation may have a slight delay.
|
||||
- **Manual run**: Start a standalone Gateway process in advance:
|
||||
```bash
|
||||
cd ~/.memory-tencentdb/tdai-memory-openclaw-plugin
|
||||
npx tsx src/gateway/server.ts
|
||||
```
|
||||
|
||||
**7. Verify**:
|
||||
|
||||
```bash
|
||||
curl http://127.0.0.1:8420/health
|
||||
# Should return {"status":"ok"} or {"status":"degraded"}
|
||||
```
|
||||
|
||||
> For the complete provider reference (environment variables, troubleshooting, LLM tool schemas, supervisor behavior), see [`hermes-plugin/memory/memory_tencentdb/README.md`](./hermes-plugin/memory/memory_tencentdb/README.md). Please read it before adjusting the supervisor / circuit-breaker defaults.
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user