Edge-run agent uses context compaction algorithm to fit tight KV cache budget

Kangwook_Lee · x · 2026-09-29

Kangwook Lee shares that Ally, an agent running fully on the edge, faces a very tight KV cache budget, so the team built a context compaction algorithm to cope. A step-by-step sample trace of the agent's reasoning, tool calls and observations is also linked.

Related event: Kangwook Lee's Team Rented a Korean PC Bang, Recruited 1000+ Players to Train On-Device Game AI Ally Distilled to 2B(5 posts)→

Original post →

More from coding & agent

coding & agent channel →