Default ExAthena.Compactor — replaces the middle of message history
with a short LLM-generated summary.
Strategy:
- Keep the pinned prefix intact (system prompt + any pinned rules).
- Keep the live suffix intact (most recent
:live_suffix_countmessages). - 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: "…"