# MEMORY.md — Long-Term Memory ## Architecture - v2 native Ollama tool calling (not text-based parsing) - Line-based editing tools prevent full-file rewrites - System prompt must be compact — tools eat most of the 8K context - Personality files (SOUL, IDENTITY, USER) load per turn, truncated to char limits ## Lessons Learned - Native tool calling > text-based code generation for reliability - One action per turn works best for small models - Line-number tools > find_replace (whitespace matching is unreliable) - Always write important facts to files — "mental notes" are lost between sessions ## Status (2026-05) - server-v2.ts: Native tool calling ✓ - Task Runner: Sliding context multi-step ✓ - Browser Automation: Playwright tools ✓ - Skills: Installable via ClawHub ✓ - Email: Multi-account IMAP ✓ - PubMed/Scholar: Search + fulltext ✓ - PPTX: python-pptx ✓ - Weather, Photos, PDF, OCR, Python eval, SQLite: ✓ --- *Use memory_write("memory", ...) to update.*