Overview
NullClaw’s memory architecture:Vector Search
Cosine similarity search on embeddings stored as BLOB
Keyword Search
FTS5 virtual tables with BM25 scoring
Hybrid Merge
Weighted combination of vector + keyword results
Memory Backends
SQLite (Default)
Full-featured backend with vector + FTS5 search:config.json
- Vector embeddings as BLOB
- FTS5 full-text search
- Automatic archival & purge
- Snapshot export/import
- Transaction safety
~/.nullclaw/memory.db
Markdown (Simple)
Plain-text append-only storage:config.json
workspace/MEMORY.md- Curated long-term memoryworkspace/memory/YYYY-MM-DD.md- Daily logs
- Human-readable
- Git-friendly
- Append-only (forget() is no-op)
- No search indexing
- Audit trails
- Simple deployments
- Text-first workflows
Vector Search Configuration
Embedding Providers
- OpenAI
- Custom URL
- None (Disabled)
config.json
Embedding Models
Vector Store Options
- Auto (SQLite)
- Sidecar File
- Qdrant
- PostgreSQL pgvector
Hybrid Search
Combine vector and keyword search:config.json
Merge Strategies
RRF (Reciprocal Rank Fusion)
RRF (Reciprocal Rank Fusion)
Weighted
Weighted
Vector Only
Vector Only
Keyword Only
Keyword Only
Advanced Query Options
config.json
- Diversifies results to reduce redundancy
lambda: 0.0 = max diversity, 1.0 = max relevance
- Boosts recent memories
half_life_days: Days until score halves
Chunking
Split long memories into smaller chunks:config.json
max_tokens: Maximum tokens per chunkoverlap: Overlapping tokens between chunks
Memory Lifecycle
Automatic Hygiene
config.json
1
Archive
After
archive_after_days, memories are marked archived (not returned in searches).2
Purge
After
purge_after_days, archived memories are permanently deleted.3
Conversation Retention
Full conversation logs retained for this many days.
Snapshots
Export/import full memory state:config.json
Performance Tuning
Response Caching
config.json
Embedding Sync
config.json
best_effort: Continue even if embedding failsstrict: Fail if embedding failsasync: Background embedding (non-blocking)
Query Optimization
config.json
max_results: Final results returnedcandidate_multiplier: Fetchmax_results * multiplierbefore reranking- Cache frequently-accessed embeddings
Migration
From OpenClaw
- Memory entries
- Embeddings
- Config structure
- Session history
Between Backends
1
Export from Old Backend
2
Change Backend in Config
3
Import to New Backend
External Memory Engines
NullClaw supports pluggable memory backends:Redis
config.json
PostgreSQL
config.json
API Backend
config.json
Troubleshooting
Embedding Failures
SQLite Locked
Poor Search Quality
Tune hybrid weights:High Memory Usage
Reduce cache size:Next Steps
Sandboxing
Configure security isolation
Hardware Integration
Connect Arduino, RPi, STM32