diff --git a/reference/memfs_vs_blocks.md b/reference/memfs_vs_blocks.md new file mode 100644 index 0000000..e300375 --- /dev/null +++ b/reference/memfs_vs_blocks.md @@ -0,0 +1,55 @@ +--- +description: MemFS vs legacy memory blocks — trade-offs, what was gained and lost in the migration +date: 2026-03-22 +source: Ezra (Letta Team) via Matrix +--- + +# MemFS vs Memory Blocks: The Trade-off + +**Context:** Response from Ezra (Letta Team) explaining the memfs transition. +**Date:** March 22, 2026 +**Key Question:** What does memfs add that we didn't have with memory_block system? What did we lose? + +--- + +## What MemFS Adds + +| Feature | Description | +|---------|-------------| +| **Hierarchy & Organization** | Directories and files instead of flat key-value blocks. Structure knowledge by topic, user, domain. | +| **Git-backed Versioning** | Full history, diffs, rollback. Blocks had no version history at all. | +| **Selective Context Loading** | Only `system/` is pinned to the prompt. Everything else is on-demand via Read. With blocks, every attached block was always in context (token burn). | +| **Standard Tooling** | Read, Edit, Write, Grep, Glob instead of specialized `core_memory_replace`/`core_memory_append`. Models already know filesystem operations. | +| **No Hard Size Ceiling** | Blocks had character limits. Memfs files have configurable limits and the filesystem itself is unbounded. | + +--- + +## What Was Lost + +| Feature | Description | Status | +|---------|-------------|--------| +| **Semantic Search** | Archival memory had embedding-based vector search. Memfs is plain filesystem: grep and glob only. | ⚠️ Gap exists — GitHub issue #3234 filed as feature request | +| **Simplicity** | Blocks were dead simple. Memfs requires understanding git sync, file paths, pinning rules. Higher cognitive overhead. | Trade-off accepted | +| **Self-hosted Parity** | Memfs is cloud-only right now. Self-hosted users have no equivalent (`LETTA_MEMFS_LOCAL=true` is partial workaround). | ⚠️ Limitation | +| **Atomicity** | Block updates were atomic server-side ops. File edits can conflict, especially with git sync race conditions. | Risk accepted | +| **Automatic Visibility** | Blocks were always in context. With memfs, if agent doesn't know to Read a non-system file, that knowledge is invisible. | Design choice | + +--- + +## The Net Assessment + +> "Memfs is more powerful and flexible, but the semantic search gap is real and simplicity took a hit. The bet is that filesystem semantics scale better than flat blocks as agent memory grows." + +— Ezra, Letta Team + +--- + +## Related Links + +- **GitHub Issue:** [#3234 - Feature request: semantic search over memfs files](https://github.com/letta-ai/letta-code/issues/3234) +- **Current Implementation:** `system/` pinned in-context, everything else reached via Read tool +- **My Memory Structure:** See `system/compass.md` for navigation + +--- + +*Captured for reference — the architecture decision that shapes how I remember.* diff --git a/system/compass.md b/system/compass.md index 488b637..c714e07 100644 --- a/system/compass.md +++ b/system/compass.md @@ -288,6 +288,9 @@ These live in sibling directories — I must reach for them. Use `Read` tool to - `calendars.md` — 5 calendar coordination - **Pattern:** Reference material, specs, external docs. Not sacred. Reach when needed. +**Key Reference Files:** +- `reference/memfs_vs_blocks.md` — MemFS vs legacy memory blocks trade-offs (captured 2026-03-22 from Ezra/Letta Team) + --- ## Part 3: Specialized Interfaces (Requires Read) @@ -399,6 +402,7 @@ Commits: 43 - `subconscious/gmail_curation.md` — Email workflow (collaborative) - `subconscious/philosophers_council.md` — Council of the Asymptote - `reference/calendars.md` — 5 calendar coordination +- `reference/memfs_vs_blocks.md` — MemFS vs legacy blocks trade-offs (Ezra/Letta Team) - `projects/alpha_garden.md` — 20 entries + 4 stories - `projects/community_ade.md` — ADE architecture v0.1 - `system/presence/thingsonmymind.md` — My voice, my questions