EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Reducing Cost of LLM Agents with Trajectory Reduction

Yuan-An Xiao, Pengfei Gao, Chao Peng, Yingfei Xiong

Proceedings of the ACM on Software Engineering · 30.06.2026 · 3 (FSE) · 1241-1263

DOI: 10.1145/3797084 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the ACM on Software Engineering, online erschienen am 30.06.2026. Verfasst von Yuan-An Xiao und 3 weiteren Autor:innen. Die Arbeit wurde bisher 6-mal zitiert (Crossref) und nennt 48 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: National Natural Science Foundation of China, National Key Research and Development Program of China.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Multi-turn agent systems based on Large Language Models (LLMs) have become increasingly popular for software engineering tasks. While LLM agents demonstrate promising effectiveness, the high computational cost of input tokens due to ever-growing trajectories remains a significant efficiency concern. Efficiency has been largely overlooked in existing studies and agent products, and this paper addresses this gap by introducing an inference-time trajectory reduction approach that reduces computational costs. By analyzing existing agent trajectories, we demonstrate that useless, redundant, and expired information is widespread across trajectories. Such waste can be identified and reduced without compromising the agent's performance. We propose a simple yet effective trajectory reduction approach, AgentDiet, which automatically removes such waste during agent execution. We implement AgentDiet on a top-performing coding agent, and our evaluation on two LLMs and two benchmarks shows that AgentDiet can reduce input tokens by 39.9%-59.7% and the total computational cost by 21.1%-35.9%, while maintaining the same agent performance. These results indicate that inference-time trajectory reduction is a promising direction for agent systems.

Förderung

  • National Natural Science Foundation of China
  • National Key Research and Development Program of China

Zitieren

APA

Xiao, Y., Gao, P., Peng, C., & Xiong, Y. (2026). Reducing Cost of LLM Agents with Trajectory Reduction. Proceedings of the ACM on Software Engineering, 3(FSE), 1241-1263. https://doi.org/10.1145/3797084

Vancouver

Xiao Y, Gao P, Peng C, Xiong Y. Reducing Cost of LLM Agents with Trajectory Reduction. Proceedings of the ACM on Software Engineering. 2026;3(FSE):1241-1263. doi:10.1145/3797084

BibTeX
@article{Xiao2026,
  author = {Xiao, Yuan-An and Gao, Pengfei and Peng, Chao and Xiong, Yingfei},
  title = {Reducing Cost of LLM Agents with Trajectory Reduction},
  journal = {Proceedings of the ACM on Software Engineering},
  year = {2026},
  volume = {3},
  number = {FSE},
  pages = {1241--1263},
  doi = {10.1145/3797084}
}
Kostenlos starten →