Skip to content

Commit 2ebbd7c

Browse files
merveenoyanpcuenca
andauthored
Add agent memory search for OpenClaw and Hermes Agent using llama.cpp (#2438)
--------- Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
1 parent c0f80b4 commit 2ebbd7c

1 file changed

Lines changed: 51 additions & 2 deletions

File tree

docs/hub/agents-local.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,34 @@ openclaw onboard --non-interactive \
100100

101101
You can also run `openclaw onboard` interactively, select `custom-compatibility` with `openai`, and pass the same configuration.
102102

103-
## Hermes
103+
### Local Memory Search for OpenClaw
104104

105-
[Hermes](https://hermes-agent.nousresearch.com/) works locally with llama.cpp. Define a default config as:
105+
You can run local embedding models with Llama.cpp for your agent's memory search. To do so, make sure to have node-llama-cpp.
106+
107+
```bash
108+
npm i node-llama-cpp
109+
```
110+
111+
Here's an example snippet to run [quantized EmbeddingGemma-300M](https://huggingface.co/ggml-org/embeddinggemma-300M-GGUF?show_file_info=embeddinggemma-300M-Q8_0.gguf) locally for memory search. OpenClaw automatically downloads and serves the model with the command below.
112+
113+
```bash
114+
openclaw config set agents.defaults.memorySearch.provider local
115+
openclaw config set agents.defaults.memorySearch.local.modelPath "hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf"
116+
```
117+
118+
Restart the gateway and validate.
119+
120+
```bash
121+
openclaw gateway restart
122+
openclaw memory status
123+
# Memory Search (main)
124+
# Provider: local (requested: local)
125+
# Model: hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf
126+
```
127+
128+
## Hermes Agent
129+
130+
[Hermes Agent](https://hermes-agent.nousresearch.com/) works locally with llama.cpp. Define a default config as:
106131

107132
```yaml
108133
model:
@@ -118,6 +143,30 @@ custom_providers:
118143
model: ggml-org/gemma-4-26B-A4B-it-GGUF:Q4_K_M
119144
```
120145
146+
### Local Memory Search for Hermes Agent
147+
148+
Hermes Agent consumes semantic search models through endpoints. Once you get your preferred embedding model up on endpoint 8080 with llama.cpp or the inference engine of your choice, add the following to `~/.hermes/config.yaml`.
149+
150+
```bash
151+
auxiliary:
152+
session_search:
153+
base_url: "http://127.0.0.1:8080/v1"
154+
api_key: "no-key-required"
155+
model: "local-llama" # your model alias
156+
timeout: 90
157+
max_concurrency: 1
158+
```
159+
160+
Check if this works, `none - built-in only` shows that no other memory plug-ins are used. The output below shows that local serving is active.
161+
162+
```bash
163+
$ hermes memory status
164+
# Memory status
165+
#────────────────────────────────────────
166+
# Built-in: always active
167+
# Provider: (none — built-in only)
168+
```
169+
121170
## OpenCode
122171

123172
[OpenCode](https://opencode.ai) works locally with llama.cpp. Define a `~/.config/opencode/opencode.json`:

0 commit comments

Comments
 (0)