Skip to content

Feature Request: FTS5 full-text session search with LLM summarization for cross-session recall #48600

@Astraea-Sixth

Description

@Astraea-Sixth

Summary

Add full-text search (FTS5) across session transcripts, with LLM-powered summarization to surface relevant context from past conversations.

Problem

Currently, cross-session recall in OpenClaw depends entirely on what was written to memory files. If something wasn't captured in MEMORY.md or daily notes, it's effectively lost. There's no way to search across conversation history to answer questions like "what did we discuss about X two weeks ago?"

Proposed Solution

Index session transcripts using SQLite FTS5 and expose a search tool/command that:

  1. FTS5 indexing — index session messages as they're written to disk
  2. Semantic search — support natural language queries, not just keyword matching
  3. LLM summarization — when results are found, summarize the relevant context rather than dumping raw transcript
  4. Tool integration — expose as a memory_search improvement or new session_search tool callable by the agent
  5. CLI command/search <query> in both CLI and messaging gateway

Prior Art

Hermes Agent (NousResearch) has this feature: FTS5 session search with LLM summarization. It's a meaningful capability gap.

Use Cases

  • "What decision did we make about X last month?"
  • "Find the conversation where we discussed the deployment issue"
  • "What were the options we considered for Y?"
  • Long-running agents with months of history who need to recall specific past context

Notes

  • SQLite FTS5 is already a dependency in many Node.js projects via better-sqlite3
  • Could be implemented as a background indexer that processes existing session files
  • Privacy: search should respect the same access controls as the session files themselves

Would love to see this in a future release. Happy to help test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions