ExAthena.Compactors.Summary (ExAthena v0.4.9)

Copy Markdown View Source

Default ExAthena.Compactor — replaces the middle of message history with a short LLM-generated summary.

Strategy:

  1. Keep the pinned prefix intact (system prompt + any pinned rules).
  2. Keep the live suffix intact (most recent :live_suffix_count messages).
  3. Summarise everything between into one terse assistant-role message tagged metadata: %{compacted: true} so the model knows it's a digest of prior turns, not fresh context.

The summary is generated by calling the same provider the loop is using. Cost counts against the run's budget.

Config

config :ex_athena, :compactor,
  pinned_prefix_count: 1,
  live_suffix_count: 6,
  summary_system_prompt: "…"