Long-term memory for Hermes Agent via seekdb M0: hosted semantic memory with search, server-side capture, and CRUD. Stdlib HTTP only — no extra pip dependencies (unlike aliyun/hermes-tablestore-memory, which requires the TableStore SDK).
Built-in MEMORY.md / USER.md stay active. This plugin adds one external memory backend alongside them.
- Automatic
prefetch()— injects relevant memories before each turn (auto_recall) - Automatic
sync_turn()— sends user/assistant pairs to the capture pipeline (auto_capture) - Mirrors Hermes built-in memory writes via
on_memory_write() - Tools:
m0_search,m0_store,m0_list,m0_get,m0_update,m0_delete - CLI:
hermes m0 doctor,search,storewhenmemory.providerism0
- Hermes Agent v0.10.0+ (external memory plugins under
~/.hermes/plugins/) - M0 Access Key (
ak_...) from m0.seekdb.ai
hermes plugins install oceanbase/hermes-memory-m0
hermes memory setup # select seekdb M0 (provider id: m0)hermes plugins install copies plugin files only. No separate pip install step — run hermes memory setup to set M0_API_KEY in .env. See after-install.md.
Or install from a local checkout:
ln -sf /path/to/hermes-memory-m0 ~/.hermes/plugins/m0
hermes config set memory.provider m0Manual config:
hermes config set memory.provider m0
echo 'M0_API_KEY=ak_...' >> "$HERMES_HOME/.env"Optional: M0_BASE_URL in .env for a self-hosted endpoint (default https://m0.seekdb.ai).
curl -sS -X POST "https://m0.seekdb.ai/api/instances/" \
-H "Content-Type: application/json" \
-d '{"name":"my-hermes-memory"}'Save ak from the response to $HERMES_HOME/.env as M0_API_KEY=... (never commit it).
| Source | Purpose |
|---|---|
$HERMES_HOME/.env |
M0_API_KEY; optional M0_BASE_URL |
$HERMES_HOME/m0.json |
auto_recall, auto_capture, recall_limit, api_timeout, search_rewrite, base_url |
{
"auto_recall": true,
"auto_capture": true,
"recall_limit": 10,
"api_timeout": 5.0,
"search_rewrite": false
}hermes memory statusExpected when configured:
Provider: m0
Plugin: installed
Status: available
Connectivity (read-only):
hermes m0 doctorRegistered only when memory.provider is m0:
hermes m0 doctor # health + instance status (JSON)
hermes m0 status # alias of doctor
hermes m0 search "preferences" --limit 5
hermes m0 store "User prefers concise answers"
hermes m0 store "Note" --metadata '{"source":"manual"}'Aligned with the official m0.seekdb.ai SKILL API:
| Tool | API |
|---|---|
m0_search |
POST /api/memories/search |
m0_store |
POST /api/memories/capture (synthetic user/assistant turn) |
m0_list |
GET /api/memories/ |
m0_get |
GET /api/memories/{id} |
m0_update |
PUT /api/memories/{id} |
m0_delete |
DELETE /api/memories/{id} |
Turn sync also uses POST /api/memories/capture when auto_capture is true. Direct POST /api/memories/ is not used (not in the official API table).
sync_turn()and explicit tool writes run work in background threads (non-blocking).is_available()checksM0_API_KEYonly — no network I/O.- Search / prefetch may be eventually consistent right after capture (server-side indexing).
- Missing
M0_API_KEYin$HERMES_HOME/.env - Plugin not under
$HERMES_HOME/plugins/m0/— reinstall or symlink
Run hermes memory status and hermes m0 doctor.
- Verify the key starts with
ak_ - For self-hosted M0, set
M0_BASE_URLto your API base hermes m0 doctorreports HTTP details in JSON
Writes go through capture; indexing can lag. Retry search after a few seconds. If capture returns add:0, the server may have skipped extraction — use a longer, specific sentence in m0_store.
This plugin targets the hosted m0.seekdb.ai HTTP API. A local PowerMem stack uses a different provider (powermem) if installed. Only one external memory.provider can be active.
The repository root is the plugin root (same pattern as hermes-tablestore-memory):
hermes-memory-m0/
├── __init__.py
├── cli.py
├── plugin.yaml
├── README.md
├── after-install.md
└── tests/
Hermes loads it as $HERMES_HOME/plugins/m0/ (plugin.yaml name: m0).
pip install -e /path/to/hermes-agent
pip install pytest
cd /path/to/hermes-memory-m0
pytest tests/ -qOptional live API tests (skipped in CI unless opted in):
export M0_INTEGRATION_TESTS=1
export M0_API_KEY=ak_...
pytest tests/test_m0_provider.py::TestM0LiveApiOptional -vApache License 2.0 — see LICENSE.