# `PhoenixAI.Store.Memory.Strategies.Summarization`
[🔗](https://github.com/franciscpd/phoenix-ai-store/blob/v0.1.0/lib/phoenix_ai/store/memory/strategies/summarization.ex#L1)

A memory strategy that condenses older messages into an AI-generated summary.

When the message count exceeds the threshold, the oldest messages are
summarized into a single pinned system message, while the most recent
messages are kept intact.

## Options

  * `:threshold` - minimum message count before summarization kicks in (default: 20)
  * `:summarize_fn` - a 3-arity function for testing (avoids real AI calls)
  * `:provider` - AI provider override (falls back to context)
  * `:model` - AI model override (falls back to context)

## Priority

Returns 300.

---

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