Your Agent's Files Just Got Smarter
A memory layer that sits next to your markdown files. No migration and no imports: the files stay yours and become searchable, connected and self-organizing.
An agent with a folder of markdown can read any file it is pointed at, but answering "what do we know about vendor X across all notes" means reading everything every time. Importing the files into a database fixes search and costs the user their files as the source of truth. We built the index to sit beside the files the way .git sits beside source code.
Two planes
vault/ content plane (source of truth)
notes/
meeting-jan.md
api-design.md
insights/ engine-generated, still plain files
01JABC-vendor-pattern.md
.hebbs/ cognition plane (rebuildable)
manifest.json
config.toml
index/The content plane is plain markdown that stays editable and git-tracked. The cognition plane holds embeddings, graph edges, temporal indexes and a manifest mapping files to memory IDs, all derived. Every ## section becomes its own memory with its own embedding, so recall returns one section of a 2,000-line document with a file path and heading path to cite.
Keeping the planes in sync
The watcher debounces in two stages. 500 ms after the last filesystem event it re-parses the changed file and marks modified sections content-stale, which is cheap. After 3 seconds of quiet it batch-embeds everything stale. Between the two, recall reads section content from the file at query time, so the text returned is current even while the ranking still uses the previous embedding. If more than 20 events arrive in one phase-1 window, as when an agent writes 30 notes in 3 seconds or a git checkout lands, the second debounce stretches to 10 seconds and the burst goes through as one embedding batch. Phase 1 over 500 files takes under 2 seconds.
Links and insights
Wiki-links become RELATED_TO edges, at file level or section level ([[api-design#authentication]]), so causal recall can traverse an existing link structure with no extra configuration. Insights from the reflect pipeline are written back into the vault as markdown with frontmatter listing their confidence and their sources as file paths with section anchors. The watcher indexes them like any other file, and a person can edit or delete them.
The rebuild test
hebbs rebuild deletes .hebbs/ and recreates it from the files: same sections, embeddings and edges. What does not come back is usage state, namely decay scores, access counts and reinforcement, which accumulates again through use. Memories stored directly with hebbs remember are written to RocksDB and are not file-backed, so they are outside this guarantee.
In practice the knowledge base is versioned as files, .hebbs/ is added to .gitignore on init, and a new machine needs a clone followed by hebbs init and hebbs index. A .hebbsignore file with gitignore syntax keeps drafts and private files out of the index.
