# `ExAthena.Compactors.Summary`
[🔗](https://github.com/udin-io/ex_athena/blob/v0.7.1/lib/ex_athena/compactors/summary.ex#L1)

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: "…"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
