Skip to content

FTS-based session/conversation search for episodic recall #687

@bm-clawd

Description

@bm-clawd

Idea

Agents need to recall not just stored knowledge (notes) but past conversations — "did we discuss X last week?" or "what was the approach we decided on?"

Inspired by Hermes Agent's session_search which stores all sessions in SQLite with FTS5 indexing, groups results by session, and summarizes relevant matches before returning them.

Problem

Currently, agent conversation history is ephemeral — it lives in the session and disappears after compaction. Daily memory notes capture some of this, but:

  • Coverage depends on the agent remembering to write things down
  • Search is keyword-based over markdown files
  • No way to search across conversation turns directly
  • No session-level grouping ("find the conversation where we discussed X")

Proposal

Add an episodic recall layer to BM:

  1. Conversation ingest — Agents can write conversation summaries/turns as a structured note type (or a dedicated table)
  2. FTS indexing — Full-text search over conversation content
  3. Session grouping — Results grouped by conversation/session, not individual messages
  4. Smart truncation — Return relevant windows around matches, not entire transcripts
  5. Optional summarization — Summarize matched sessions before returning (could be agent-side)

This complements BM's existing knowledge graph (which is great for structured facts and relations) with temporal, episodic recall (which is great for "when did we..." and "what did we decide about...").

Open Questions

  • Should this be a new note type (conversation) or a separate store?
  • How does this interact with Momentum's interaction/session model?
  • Could BM Cloud aggregate conversations across multiple agents?

References

  • Hermes Agent session_search (SQLite + FTS5 + LLM summarization)
  • Relates to Momentum interactions design

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions