Knowledge and logs
Two shapes of memory, kept separate because they are written in opposite ways.
Documents are rewritten whole
agent-handoff, and that name is a convention the product knows: it is included in the product's context package, so an agent picking up a session reads it without being told to.
Logs are appended one entry at a time
Why they are not one thing with a type field
type: 'log'. It does not, and the reason is arithmetic. A document revision snapshots the entire body, so appending n entries to one costs n(n+1)/2 times the body - the 44th entry appended to a 106 KB changelog would copy the 43 before it. Two write modes that different deserve two entities.
Searching them
search finds things by keyword across every entity. It also has a semantic mode, which embeds your query and matches on meaning rather than words, and follows one hop through the links between records. Semantic search is the one operation in the product that runs a model, which is why it is the one operation that costs credits.