feat: markdown memory system — Hope learns from conversations
- agent/memory_mcp.py: MCP server with memory_recall, memory_save, memory_list tools backed by .md files in /memory (simple keyword matching for v1) - memory/ dir bind-mounted into container, persists across rebuilds, easily backed up via git - System prompt instructs Hope to recall on past references and save personal info/preferences naturally without announcing it - Dockerfile: copy memory_mcp.py; compose: ./memory:/memory volume
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Hope's Memory
|
||||
|
||||
Persistent memory for the voice assistant, stored as plain markdown files.
|
||||
This directory is bind-mounted into the container at `/memory`, so memories
|
||||
survive rebuilds and are backed up via git.
|
||||
|
||||
## Format
|
||||
|
||||
Each file is one topic, named after a slugified version of the topic
|
||||
(e.g. `user-preferences.md`, `birthday.md`). Content is freeform markdown
|
||||
notes. When Hope saves something, it appends a timestamped section:
|
||||
|
||||
```markdown
|
||||
# User preferences
|
||||
|
||||
## 2026-08-22 14:30 UTC
|
||||
|
||||
Prefers to be called Shane. Works on the voice assistant project.
|
||||
|
||||
## 2026-08-23 09:15 UTC
|
||||
|
||||
Likes dark roast coffee, no sugar.
|
||||
```
|
||||
|
||||
- `#` heading = the topic (written once when the file is created)
|
||||
- `## <timestamp>` headings = individual notes, appended over time
|
||||
- The MCP server (`agent/memory_mcp.py`) reads and appends these files;
|
||||
you can also edit them by hand — Hope will pick up changes on next recall.
|
||||
Reference in New Issue
Block a user