FrontierThe story, in brief

Self-Compacting Language Model Agents

Apple's self-compacting agents solve a real inference problem: how to keep long reasoning traces from drowning in stale context.

Illustration of a transparent lens revealing connected networks across layers of paper.
Exploring the next frontier of AI research.AI illustration by KeyNews
The KeyNews take

Why it matters

Long agent chains accumulate junk that bloats context windows and degrades subsequent reasoning. Apple's approach lets the model itself decide when and what to summarize—addressing a production constraint that fixed-interval compaction misses.

The key facts

6 to know
  1. Published by Apple Machine Learning Research

  2. Addresses context-window overflow in multi-step agent reasoning

  3. SELFCOMPACT scaffold pairs compaction tool + model-driven pruning decision

  4. Contrasts with fixed-interval compaction that risks discarding partial derivations

  5. Inference-time mechanism (no model retraining required)

  6. Problem domain: long agent traces with chains of thought and tool calls

Go to the source

Apple Machine Learningmachinelearning.apple.com

Publisher excerpt: Long agent traces composed of chains of thought and tool calls accumulate stale content that anchor subsequent generations, and eventually outgrow the context window. Existing scaffolds mitigate it with fixed-interval compaction triggered at a token threshold. Such triggers pay no heed to…
Read original report
Back to today's editionMore frontier news

Keep reading

Related stories

More from Frontier