Let me show you what's happening under the hood. OpenClaw stores a per-agent SQLite database at ~/.openclaw/memory/. This database has core tables that index the content from your Markdown files. The tables track memory entries with their source files and embedding vectors. Additional tables handle full-text search tokens and metadata like creation timestamps.
When you write to MEMORY.md or a daily file, the sync process splits the content into chunks and generates embeddings. Then it updates the index. Reads always go through SQLite for speed, but writes always go to the Markdown files first. If the database ever gets corrupted, OpenClaw rebuilds it from the files on next startup.