A notebook needs a filing system.
A library can remember where a book belongs even when nobody is reading it. But shelves alone cannot answer ‘Where did we put that thing about rain?’ You also need ways to find what the shelves hold.
Source book by 递归客 (diguike) · Full attribution

The shelf keeps the record
In the book’s local architecture, SQLite stores structured records: observations, sessions, and related data. A database is an organized store you can ask questions of. It is outside the model, so the model does not have to carry every record in each request.
A record’s date, project, and source matter. ‘The event starts at six’ means something different before and after a schedule change. These labels help a future reader decide whether a memory belongs to the current task.
Find the same idea with different words
Wet-weather backup
If it rains, use Room B. The host confirmed it holds 30 guests. Source: venue call, Sep 29.
Handwritten synonym matching demonstrates the idea. This is not a real embedding model or Claude-Mem search.
Two ways to ask for the same book
Keyword search matches words. It is good when you know an exact name, error, or file path. SQLite’s FTS5 feature builds an index for this kind of full-text search.
Semantic search looks for related meaning using numerical representations called embeddings. Someone asking about bad weather might find a note about a wet-weather venue even if the wording differs. The book pairs SQLite search with ChromaDB for vector search. Each method has strengths and failure modes; related meaning is not proof of relevance.
Saving twice is not learning twice
Duplicate records can make a library noisy. The book describes using a content fingerprint to avoid storing identical observations within a session. That catches exact repeats; two differently worded notes about the same discovery may still need separate handling.
Memory also needs provenance: information about where a record came from. If an important note is wrong or incomplete, its source lets the agent verify rather than confidently repeat it. A tidy filing cabinet should make checking easier, not hide the paperwork forever.
Behind this lesson
Related chapters in 递归客’s original book:
The source examines Claude-Mem v12.6.2. Links are pinned to the book revision used for this course; current implementation details may differ.