cs.AINov 4, 2026

Tools Need Not Speak in Text: Latent Context Compression for Agents

Authors: Yuetong Liu, Zhehao Zhou, Yitong Zhang, Haorui Chen, Jia Li

Organizations: Tsinghua AI Agent Group, Tsinghua University

Abstract

Large language model (LLM) agents typically append raw tool outputs to their context. Over multi-step interactions, long and noisy observations incur substantial context overhead and dilute the agent's attention to task-relevant information. Existing token pruning and summarization methods remain constrained by discrete text representations, limiting the achievable compression ratios. In this work, we challenge the prevailing assumption that agents must consume tool observations as explicit text tokens. To this end, we propose Coca-Cola, a continuous latent context compression model for LLM agents. Coca-Cola compresses tool observations into latent tokens and embeds them into the input embedding space of the agent. We further introduce Action-Preserving Training, which aligns the agent's next-action distributions under full and compressed observations. This trains the compression model to learn action-sufficient latent tokens that retain decision-critical information. Experiments with web-search agents on four QA benchmarks and two model families show that Coca-Cola reduces the agent's token consumption by 70.01%-89.24% and end-to-end runtime by 24.45%-55.97%, while consistently improving task performance. These results suggest that Coca-Cola offers a promising approach for context compression in agents. Our code is available at https://github.com/THU-Agent/Coca-cola.

Figures & tables

Appendix figures & tables1 asset

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Beyond Token Savings: A Systematic Study of Context Compression in LLM Agents

    Sep 26, 2026Ritul Satish, Prasoon Sinha, Akiho Kawada +1Context Compaction for LLM AgentsContext Compression

  2. FOCUS: Training-Free Decision-Preserving Context Compression for LLM Agents

    Sep 29, 2026Shantanu Dixit, Anson Bastos, Xuchao Zhang +2Long-Horizon LLM AgentsLLM Context Management

  3. In-Model Context Compression with Agentic Soft Tokens for Long-Horizon LLM Agents

    Oct 30, 2026Xuning He, Kai Fan, Runyu Zhang +4Context Compaction for LLM AgentsLLM Context Compression