Skip to content

Conversation capture improvements: summarize before indexing #7

Open

Description

@bm-clawd

Context

Current auto-capture (hooks/capture.ts) dumps raw user+assistant text into daily conversation notes. This floods the knowledge graph with low-signal content and makes search noisy.

Problems

  • Raw conversation text is mostly noise (greetings, thinking out loud, tool output)
  • Daily conversation notes get huge and aren't useful to search against
  • No extraction of decisions, insights, or action items
  • Frontmatter double-write issue noted in TODO-1.0

What this should do instead

  1. Summarize the conversation turn before indexing (extract key decisions, insights, todos)
  2. Extract structured observations (decisions, insights, tasks, preferences)
  3. Skip low-value turns (heartbeats, simple acknowledgments, tool-only turns)
  4. Create meaningful notes with proper titles based on content, not just timestamps

Implementation

  • Use a lightweight LLM call to summarize/extract (or structured prompting)
  • Or: use basic-memory's own observation extraction from markdown
  • Filter: skip turns under N chars, skip heartbeat responses, skip tool-only turns
  • Write observations as proper BM notes with categories and relations

Example

Instead of dumping:

**User:** check my email
**Assistant:** You have 13 unread emails... [200 lines of output]

Write:

# Email Check - 2026-02-10 16:47
- [observation] 13 unread emails, nothing urgent
- [observation] Tigris Data replied about S3 bucket notifications
- [observation] Joe P. completed a Basecamp todo

Activity

  1. phernandez commented on Feb 27, 2026

    @phernandez
    Member

    Investigation Result: Deferred

    After thorough investigation of the OpenClaw plugin API and the current capture implementation (hooks/capture.ts), this feature is deferred pending upstream changes.

    Why

    The core request — summarizing conversations before indexing — requires LLM inference. OpenClaw's plugin API does not currently expose LLM/inference capabilities to plugins (no api.llm(), api.complete(), or similar). Without agent-in-the-loop summarization:

    • Heuristic extraction (regex, keyword matching, length thresholds) adds complexity without meaningfully improving quality over raw capture
    • External LLM client adds cost, latency, API key management, and a heavy new dependency
    • The observation extraction mentioned in the issue ("use basic-memory's own observation extraction") operates on already-structured markdown, not on raw conversation text

    What's Blocked

    This feature requires one of:

    1. OpenClaw exposing an LLM/inference API to plugins (e.g., api.llm() or api.complete())
    2. A plugin hook like before_capture that lets the agent process/summarize content before it's written
    3. An external LLM client dependency (acceptable only if the cost/complexity tradeoff is justified)

    When to Revisit

    • When OpenClaw adds plugin-accessible LLM inference
    • When a lightweight summarization approach becomes available without heavy dependencies
    • If the community develops a standard pattern for plugin-side inference

    Current Mitigations

    The existing capture system already applies some filtering (skips empty turns, uses timestamped daily notes). Further improvements to filtering thresholds could be made independently as small PRs without the full summarization pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions