Session summary curator: summarise a session into a digest and make the digests searchable #1016

Open
opened 2026-10-27 13:38:41 +00:00 by sam · 0 comments
Owner

Summarise each session into a stored digest, then make those digests searchable so a past session can be found by what it was about.

This is NOT what internal/domain/curator already does: its SessionSummary (internal/domain/curator/registrar.go:135) is a session IDENTIFIER - id, serving agent, last active - and the curator reviews sessions to extract memory facts. No text summarisation exists today.

Do not build a new index. Search infrastructure is already present: internal/gateway/session_store_sqlite.go keeps an external-content FTS5 table (messages_fts, :81) and SearchMessages (:1032) ranks results with bm25 (:1079), currently scoped per session. Storing a digest as a message row makes it keyword-searchable for free.

Design question for the maintainer (raised 2026-09-22), with the evidence for choosing: FTS5+BM25 already exists and costs nothing to reuse; embeddings exist as an optional capability (internal/domain/embedding + internal/infrastructure/embedding, configured by models.embedding, degrading to a no-op when unset) and would buy semantic recall at the cost of a second index plus a provider dependency. Recommended path: FTS/BM25 over the digest first, embeddings later behind the existing optional role if keyword recall proves insufficient.

The summarisation model should be a separate configured role (a cheap fast model), not the chat model and not hardcoded.


Imported from beads archie-core-22ed · GitHub #1124 · type feature · priority P2 · created 2026-09-21

Summarise each session into a stored digest, then make those digests searchable so a past session can be found by what it was about. This is NOT what internal/domain/curator already does: its SessionSummary (internal/domain/curator/registrar.go:135) is a session IDENTIFIER - id, serving agent, last active - and the curator reviews sessions to extract memory facts. No text summarisation exists today. Do not build a new index. Search infrastructure is already present: internal/gateway/session_store_sqlite.go keeps an external-content FTS5 table (messages_fts, :81) and SearchMessages (:1032) ranks results with bm25 (:1079), currently scoped per session. Storing a digest as a message row makes it keyword-searchable for free. Design question for the maintainer (raised 2026-09-22), with the evidence for choosing: FTS5+BM25 already exists and costs nothing to reuse; embeddings exist as an optional capability (internal/domain/embedding + internal/infrastructure/embedding, configured by models.embedding, degrading to a no-op when unset) and would buy semantic recall at the cost of a second index plus a provider dependency. Recommended path: FTS/BM25 over the digest first, embeddings later behind the existing optional role if keyword recall proves insufficient. The summarisation model should be a separate configured role (a cheap fast model), not the chat model and not hardcoded. --- _Imported from beads `archie-core-22ed` · GitHub #1124 · type feature · priority P2 · created 2026-09-21_
sam added the mediumfeature labels 2026-10-27 13:38:41 +00:00
sam self-assigned this 2026-10-27 13:38:41 +00:00
sam added the deferred label 2026-11-15 17:26:22 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1016