Lab
Memory vault
In progressA memory for my agents, built on my notes. It is early: the core works and the rest is still being shaped.
$ vault search "retry" --limit 3
projects/queue-retry-budget.md
Queue retry budget [queue, design]
journal/2026-03-02.md
Retries that hid a bug [journal]
reference/backoff.md
Backoff notes [reference]
$ vault context list
context/about-me.md
About me
context/working-rules.md
Working rules
$ vault retrieve "what to read next"
lists/reading-list.md
Reading list [lists]
--- Auto-Context ---
context/about-me.md
context/working-rules.md
{
"query": "retry",
"results": [
{
"path": "projects/queue-retry-budget.md",
"title": "Queue retry budget",
"tags": ["queue", "design"],
"score": 0.91
},
{
"path": "journal/2026-03-02.md",
"title": "Retries that hid a bug",
"tags": ["journal"],
"score": 0.64
}
]
}
How it works
- My notes stay in Obsidian. The vault is plain markdown with frontmatter, and I keep writing in it the way I always did.
- A watcher keeps the index fresh. chokidar sees a note change, gray-matter reads its tags and title, and FlexSearch updates the index.
- An API serves the memory. The routes are context, search, retrieve, notes and tags, all behind token auth, running in Docker at home.
- Agents ask through the CLI. The vault command and the Claude Code slash commands and skills call the same routes, so an agent can search or create a note.
- Pinned notes always come along. Anything in the auto-context folder is added to every retrieval, so the basics are there without being asked for.
Built with
- Node and ExpressThe REST API and the token auth in front of it.
- FlexSearchThe in-memory full-text index over every note.
- chokidarWatches the vault folder and triggers reindexing on change.
- gray-matterParses note frontmatter into titles and tags.
- commanderThe vault command line.
- DockerRuns the service at home next to the vault.
Decisions
- Notes are the source of truth. The index can be rebuilt from the files at any time, so there is no second database to keep in sync or back up.
- One folder is always included. Retrieval adds the auto-context notes to every result, which gives an agent the basics about me without a prompt that repeats them.
- Keep it small while it is early. The first version is notes, an index, an API and a CLI. Anything beyond that waits until I see how my agents actually use it.