Skip to content

History compression pipeline: async summarization of older turns #293

Description

@theinterneti

Part of #266

When session history > tier 5 budget: detect overflow, trigger async LLM summarization of oldest turns, store summary in Redis with TTL. Session start pre-computes if near threshold.

Acceptance Criteria

  • Overflow detection: tier 5 history > 80% of budget triggers compression
  • Async LLM summarization of oldest 20 turns → compact paragraph
  • Summary stored in Redis: key session:{id}:history_summary, TTL=7200s
  • Session start checks if near threshold and pre-computes summary
  • Unit tests with mocked LLM; integration test with simulated 50-turn session

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions