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

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

arXiv:2611.06500 · 2026-11-08 공개 · arXiv · PDF

llm-agents token-pruning qa-benchmarks continuous-latent latent-context-compression action-preserving-training context-overhead web-search-agents

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.

한국어 요약

한 줄 요약

Coca-Cola는 LLM 에이전트의 텍스트 기반 컨텍스트를 연속 잠재 토큰으로 압축하여 효율성과 성능을 동시에 향상시키는 모델이다.

핵심 기여도

핵심 아이디어

기존 LLM 에이전트는 도구의 출력을 텍스트 토큰으로 직접 추가하여 컨텍스트를 구성하지만, 이는 토큰 수 증가와 불필요한 정보로 인한 성능 저하를 초래한다. Coca-Cola는 이러한 문제를 해결하기 위해 도구 출력을 **연속 잠재 토큰**으로 압축하여 에이전트의 입력 임베딩 공간에 직접 삽입한다. 이는 텍스트 기반 압축과 달리, **연속 공간에서의 정보 압축**이 가능하며, 더 높은 압축률을 달성할 수 있다.

또한, **Action-Preserving Training**이라는 새로운 학습 전략을 통해 압축된 정보가 다음 행동 분포를 유지하도록 학습한다. 즉, 압축된 잠재 토큰이 **의사결정에 필요한 핵심 정보만 포함**하도록 유도한다. 이는 기존 압축 방법이 텍스트의 의미적 일관성을 유지해야 하기 때문에 제한적이었던 문제를 해결한다.

기술적 접근법

주요 결과

의의 및 한계

Coca-Cola는 LLM 에이전트에서 **텍스트 토큰 기반 커뮤니케이션의 필요성을 재고하는 기초 연구**로, 잠재 토큰을 통한 정보 전달 방식을 제시한다. 이는 장기적 추론과 복잡한 작업 수행 시 **효율성과 확장성**을 동시에 향상시킬 수 있는 가능성을 열어준다.

그러나, 현재 연구는 **웹 검색 기반 QA 작업**에만 적용되었으며, 다른 도구나 작업 유형에서의 일반화 가능성은 추가 연구가 필요하다. 또한, 압축된 잠재 토큰이 **어떻게 정확히 정보를 유지하는지**에 대한 해석 가능성도 한계로 지적된다.

실용적 활용

Coca-Cola는 **복잡한 다단계 작업을 수행하는 에이전트 시스템**에 적용 가능하며, 특히 **토큰 비용이 높은 환경**에서 효율성을 극대화할 수 있다. 예를 들어, **대규모 데이터 분석, 실시간 추론, 대화형 시스템** 등에서 활용할 수 있으며, **LLM 기반 자동화 플랫폼** 개발에도 기여할 수 있다.