Integrate NellDB as persistent memory and configuration backend #827

Closed
opened 2026-10-27 13:37:55 +00:00 by sam · 0 comments
Owner

Replace SQLite+FTS5+file-based storage with NellDB, Sam's existing distributed document database. NellDB provides:\n\n- nell.Store interface: Put, Get, Delete, List, ListAll, Query, GetChangesSince, SearchSimilar (vector search)\n- sdk.DocDB: Document database with MVCC revisions\n- logstore: Durable Zstd-compressed append-only log\n- sdk.Replicator: Multi-primary HTTP replication with HLC knowledge vectors\n- Vector search: HNSW + PCA + PQ for semantic memory\n- HTTP server: Standalone binary on port 9342\n\nPlan:\n\n1. Add NellDB as a dependency (go get github.com/samcharles93/NellDB)\n2. Create internal/nell/ adapter package wrapping nell.Store for archie-core's data models\n3. Collections: sessions, messages, memory, config, tasks\n4. Replace internal/store (SQLite) with NellDB backend\n5. Replace file-based MEMORY.md with nell collections + vector search\n6. Wire into cmd/archied/main.go as the storage backend\n\nThis gives archie-core multi-primary replication for free — two archied instances on different hosts can sync state without a central database.\n\nRef: /work/apps/nell-engine/ (store.go, types.go, sdk/docdb.go, server/)

Acceptance Criteria

archied starts with a NellDB backend instead of SQLite. Sessions and messages persist across restarts. Vector search returns semantically similar messages. Two archied instances can replicate state via nell sync.


Imported from beads archie-core-1786637497556-295-9095895c · GitHub #316 · type feature · priority P2 · created 2026-08-08 · closed 2026-08-08

Replace SQLite+FTS5+file-based storage with NellDB, Sam's existing distributed document database. NellDB provides:\n\n- **nell.Store interface**: Put, Get, Delete, List, ListAll, Query, GetChangesSince, SearchSimilar (vector search)\n- **sdk.DocDB**: Document database with MVCC revisions\n- **logstore**: Durable Zstd-compressed append-only log\n- **sdk.Replicator**: Multi-primary HTTP replication with HLC knowledge vectors\n- **Vector search**: HNSW + PCA + PQ for semantic memory\n- **HTTP server**: Standalone binary on port 9342\n\nPlan:\n\n1. Add NellDB as a dependency (go get github.com/samcharles93/NellDB)\n2. Create internal/nell/ adapter package wrapping nell.Store for archie-core's data models\n3. Collections: sessions, messages, memory, config, tasks\n4. Replace internal/store (SQLite) with NellDB backend\n5. Replace file-based MEMORY.md with nell collections + vector search\n6. Wire into cmd/archied/main.go as the storage backend\n\nThis gives archie-core multi-primary replication for free — two archied instances on different hosts can sync state without a central database.\n\nRef: /work/apps/nell-engine/ (store.go, types.go, sdk/docdb.go, server/) ### Acceptance Criteria archied starts with a NellDB backend instead of SQLite. Sessions and messages persist across restarts. Vector search returns semantically similar messages. Two archied instances can replicate state via nell sync. --- _Imported from beads `archie-core-1786637497556-295-9095895c` · GitHub #316 · type feature · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumfeature labels 2026-10-27 13:37:55 +00:00
sam self-assigned this 2026-10-27 13:37:55 +00:00
sam closed this issue 2026-10-27 13:37:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#827