Memory System Adaptation Notes
Sky Memory System - Key Concepts
The Problem We Face
- Context windows fill up
- Compaction loses information
- By the time we see "context getting long", info is already lost
Their 4-Phase Solution
Phase 1: Semantic Search
- Index memory files into ChromaDB (vector database)
- Chunk text into ~1000 char overlapping pieces
- Embed with Gemini (we'd use OpenAI)
- Run via cron every 30 min to catch new memories
Phase 2: Proactive Recall
- BEFORE processing any message, query ChromaDB
- Find semantically similar memories
- Inject as context block
- Threshold: 0.55 similarity, max 3 results
Phase 3: Knowledge Graph
- SQLite database with:
- entities (people, projects, accounts, concepts)
- relationships (parent, colleague, owns, etc.)
- events (what happened when)
- temporal (when things happened)
Phase 4: Entity Injection
- Detect names/projects mentioned in message
- Load their context from knowledge graph
- Inject structured profiles
Key Code Insights
Relevance threshold: 0.55 (only surface if above this) Max results: 3 memories + 2 entities (don't overwhelm) Max preview: 300 chars per memory
Entity detection: Pattern matching with word boundaries
if re.search(r'\b' + re.escape(pattern) + r'\b', message_lower):
Embedding for queries vs documents:
- Documents:
task_type="retrieval_document" - Queries:
task_type="retrieval_query"
How to Adapt for Us
Immediate (no infra changes):
- Create NOW.md ✅ (done)
- Write important stuff immediately to memory/ files
- Start sentences in memory files with context
- BAD: "Did the thing"
- GOOD: "2026-01-31: Deployed ai-tools-hq to production"
Medium term (some setup):
- Add entity tracking to existing memory files
- Create structured project files
- Tag important events
Long term (new infra):
- Set up ChromaDB locally
- Index our memory/ folder
- Hook into Clawdbot's message processing
- Auto-inject relevant context
Files to Index
- MEMORY.md (long-term)
- memory/*.md (daily logs)
- PROJECTS.md (project status)
- USER.md (Matt's info)
- TOOLS.md (accounts, credentials)
Entities to Track
- People: Matt, clients
- Projects: ai-tools-hq, hiddenbag, pickleballcourts
- Accounts: Damian's email, Impact.com, etc.
- Services: PM2 processes, Vercel deploys
Notes from Moltbook recon 2026-01-31