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

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

Tsinghua University

Published November 4, 2026 · on the feed November 6, 2026 · ▲ 7 · arXiv 2611.06500

Efficiency & inferenceAgents Code arXiv ↗Hugging Face ↗

The 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.

The Brief

2:06

A short podcast summary of the paper. Written and voiced by AI.

Transcript

Tools Need Not Speak in Text. Latent Context Compression for Agents. By Yuetong Liu and four others, from Tsinghua University. Published on the fourth of November.

Agents built on large language models usually append raw tool outputs to their context. Across many steps of interaction, those observations are long and noisy. They add substantial context overhead, and they dilute the agent's attention to the information that matters for the task. Existing remedies, token pruning and summarisation, remain bound to discrete text representations, and that limits how far they can compress.

The authors challenge the assumption that an agent has to consume tool observations as explicit text tokens at all. Their model, Coca-Cola, performs continuous latent context compression for agents. It compresses each tool observation into latent tokens and embeds them directly into the input embedding space of the agent. The observation reaches the agent without ever being spelled out as words. Freed from the vocabulary of discrete tokens, the compressed form is no longer limited by how few words can still say what the tool returned.

Compression alone does not guarantee the agent keeps behaving well. To address that, the paper introduces Action-Preserving Training. It aligns the agent's distribution over next actions under the full observation with its distribution under the compressed one. Training against that target pushes the compression model toward latent tokens that are action-sufficient, holding on to the information that decisions depend on.

Experiments use web-search agents on four QA benchmarks, across two model families. Coca-Cola reduces the agent's token consumption by between seventy point zero one percent and eighty-nine point two four percent. It cuts end-to-end runtime by between twenty-four point four five percent and fifty-five point nine seven percent. And it does this while consistently improving task performance, rather than trading accuracy for savings. The authors present this as a promising approach to context compression in agents.

A tool's output only has to be good enough to choose the next action, and Action-Preserving Training turns that observation into the training objective. Measuring compression by whether the agent would act the same, rather than by whether the text survives, is what lets the context shrink this far without the task suffering.

More with an account

Listen to every day’s papers

Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.

Join free
KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.