Agent memory: MEMORY.md index in prompt, lazy topic files, memory_write/memory_forget

This commit is contained in:
hermes committed 2026-10-06 12:52:02 +00:00
1 parent 19dc1563f4
commit 316ac55656
7 files changed
+228 -2

No files matched your search

+7
View File
@@ -91,6 +91,13 @@ the system prompt every turn) or `manual` (only via `/<name>`, never mentioned t
Each skill is also a command: `/<name> [args]` sends the skill file plus `args` as the prompt. Builtin
commands win when names collide.
## Memory
The agent keeps notes across sessions with `memory_write` / `memory_forget`. `MEMORY.md` (one hook line per
topic, max 50) is in the system prompt; the full text lives in `topics/<slug>.md` and is read on demand.
Global: `~/.hx/memory/`, project: `.hx/memory/` (add it to `.gitignore`). The index is read at session
start, so new entries show up next session. `hx prefix` shows its size.
## Lens
After every tool round, hx asks the language server about files the agent wrote or edited and appends