Skip to content

research(memory): event segmentation-based episodic boundary detection for compaction (ES-Mem) #1855

@bug-ops

Description

@bug-ops

Source

ES-Mem: Event Segmentation-Based Memory for Long-Term Dialogue Agents — arXiv 2601.07582, January 2026

Core Idea

Applies cognitive Event Segmentation Theory to partition long conversation histories at natural semantic boundaries ("events") rather than fixed token counts. Builds a hierarchical memory structure anchored to event boundaries. Event-aware retrieval outperforms surface similarity lookup on long-term dialogue benchmarks.

Applicability to Zeph: MEDIUM-HIGH

Zeph's chunked compaction divides history by token count (configurable compaction_preserve_tail). This produces summary chunks that may split mid-task, degrading summarization coherence. Event-based segmentation would produce semantically coherent units, improving both summarization quality and episodic retrieval precision.

This is directly complementary to #1608 (episodic-to-semantic promotion) — better boundaries mean better promotion candidates.

Implementation Sketch

  1. Add EventBoundaryDetector: a lightweight LLM call (or heuristic using turn transitions: tool_use→user, topic shift signals) that emits boundary markers before chunked compaction.
  2. Align compaction chunk boundaries to detected event boundaries instead of hard token counts.
  3. Store event metadata (boundary type, event summary) in a new episodic_events SQLite table.
  4. Use event boundaries as retrieval anchors in SemanticMemory::recall().
  5. Gate behind [memory.compression] event_segmentation = true.

Implementation Complexity

MEDIUM — boundary detection can start as heuristic (no extra LLM call), upgrade to LLM-based later. SQLite schema addition is straightforward.

See Also

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Research — medium-high complexitymemoryzeph-memory crate (SQLite)researchResearch-driven improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions