By recording context at multiple levels and folding programmatically rather than summarizing with the model, agents can handle longer histories more efficiently—solving 66/75 tasks vs 54 with model summarization, in half the time and 2.4x lower cost.
Folio is a context manager for long-horizon language agents that replaces model-based summarization with a multi-level recording system.