cs.AIApr 2, 2026

ContextBudget: Budget-Aware Context Management for Long-Horizon Search Agents

Authors: Yong Wu, YanZhao Zheng, TianZe Xu, ZhenTao Zhang, YuanQiang Yu, JiHuai Zhu, Chao Ma, BinBin Lin, 

Organizations: Zhejiang University, Hangzhou, China · Alibaba Group, Hangzhou, China

Abstract

LLM-based agents show strong potential for long-horizon reasoning, yet their context size is limited by deployment factors (e.g., memory, latency, and cost), yielding a constrained context budget. As interaction histories grow, this induces a trade-off between retaining past information and staying within the context limit. To address this challenge, we propose Budget-Aware Context Management (BACM), which formulates context management as a sequential decision problem with a context budget constraint. It enables agents to assess the available budget before incorporating new observations and decide when and how much of the interaction history to compress. We further develop BACM-RL, an end-to-end curriculum-based reinforcement learning approach that learns compression strategies under varying context budgets. Experiments on compositional multi-objective QA and long-horizon web browsing benchmarks show that BACM-RL consistently outperforms prior methods across model scales and task complexities, achieving over 1.6×1.6\times gains over strong baselines in high-complexity settings, while maintaining strong advantages as budgets shrink, where most methods exhibit a downward performance trend.

Figures & tables

Appendix figures & tables6 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Learning Agent-Compatible Context Management for Long-Horizon Tasks

    May 29, 2026Lu Yi, Runlin Lei, Liuyi Yao +6Long-Horizon Agent TasksLLM Context Management

  2. LongSeeker: Elastic Context Orchestration for Long-Horizon Search Agents

    May 6, 2026Yijun Lu, Rui Ye, Yuwen Du +3Web Search AgentsTool-Using Agents

  3. ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL

    Aug 28, 2026Zhuoshi Pan, Qizhi Pei, Junru Lu +4LLM Context ManagementLong-Horizon LLM Agents