添加内存管理工具和用户密钥支持,更新文档和测试用例
This commit is contained in:
@ -8,6 +8,7 @@ It stores completed Hermes turns through:
|
||||
- `POST /memory-system/sessions/{session_id}/commit` on session end
|
||||
- `POST /memory-system/search` for recall
|
||||
- `GET /memory-system/users/{user_id}/profile` for user profile reads
|
||||
- `GET/POST/DELETE /memory-system/memories` for direct memory URI management
|
||||
|
||||
## Configure
|
||||
|
||||
@ -16,6 +17,7 @@ Put these values in the Hermes profile env file, usually `~/.hermes/.env`:
|
||||
```dotenv
|
||||
MEMORY_SYSTEM_ENDPOINT=http://127.0.0.1:1934
|
||||
MEMORY_SYSTEM_USER_ID=default
|
||||
MEMORY_SYSTEM_USER_KEY=
|
||||
MEMORY_SYSTEM_API_KEY=
|
||||
MEMORY_SYSTEM_SEARCH_USE_LLM=false
|
||||
MEMORY_SYSTEM_COMMIT_EVERY_TURNS=5
|
||||
@ -26,6 +28,9 @@ MEMORY_SYSTEM_TIMEOUT_SECONDS=180
|
||||
You can also keep a separate file and point to it with `MEMORY_SYSTEM_ENV_FILE`.
|
||||
Real environment variables still override file values.
|
||||
|
||||
`MEMORY_SYSTEM_USER_KEY` is the key returned by `POST /memory-system/users`.
|
||||
If it is omitted, the plugin calls `/memory-system/users` during initialization and uses the returned key for the current process.
|
||||
|
||||
Then select this provider in Hermes memory config:
|
||||
|
||||
```yaml
|
||||
@ -38,6 +43,12 @@ memory:
|
||||
- `memory_system_search`: search OpenViking and EverOS via Memory System API.
|
||||
- `memory_system_profile`: read the EverOS profile memory for the active user.
|
||||
- `memory_system_remember`: explicitly write an important memory and commit the session.
|
||||
- `memory_system_memory_list`: list OpenViking memory URIs under `viking://user/memories`.
|
||||
- `memory_system_memory_read`: read one memory URI.
|
||||
- `memory_system_memory_write`: create, replace, or append one memory URI.
|
||||
- `memory_system_memory_delete`: delete one memory URI, non-recursive by default.
|
||||
|
||||
Use the direct memory URI tools only when the model needs to inspect or edit a specific `viking://user/memories/...` item. Normal conversation recall should still use `memory_system_search`, and normal explicit remembering should still use `memory_system_remember`.
|
||||
|
||||
The plugin commits after 5 new turns or 300 seconds by default, whichever comes first.
|
||||
Set either value to `0` to disable that trigger. Session end still commits any new turns that were not already committed.
|
||||
|
||||
Reference in New Issue
Block a user