ProgAgent: Learning Tool Orchestration through Programmatic Training
Hao Li, Keqing He, Longtao Zheng, Junlong Li, Weihao Zeng, Qian Liu, Yuzhen Huang
Hong Kong University of Science and Technology · Beijing University of Posts and Telecommunications · Nanyang Technological University
Published October 10, 2026 · on the feed October 15, 2026 · ▲ 15 · arXiv 2610.14774
The abstract
Large language models (LLMs) are increasingly expected to orchestrate diverse tools over long-horizon tasks. Existing agents typically use Direct Tool Calling (DTC), where the model invokes tools sequentially, and tool responses accumulate in the model context, which can lead to context rot and orchestration breakdown. In contrast, Programmatic Tool Calling (PTC) invokes tools through executable code and stores intermediate results in runtime variables rather than appending them to the context. Prior work has explored PTC mainly as an inference-time optimization, but its benefits for agentic training remain unclear, and suitable verifiable training tasks are scarce. In this work, we introduce ProgAgent, a full PTC training stack, comprising a pipeline for synthesizing verifiable long-horizon tasks, a lightweight PTC runtime, and a two-stage training recipe. Using only 215 tasks instantiated at four environment scales, ProgAgent yields higher pass rates than the evaluated baselines of comparable size across four benchmarks. On LOCA-bench, ProgAgent-14B achieves a 30.7% pass rate at a 64k-token environment state, where these baselines score zero. Cross-harness experiments show that PTC-trained models outperform DTC-trained models under both evaluation interfaces, suggesting that the benefits of PTC training extend beyond the interface.
The Brief
2:23A short podcast summary of the paper. Written and voiced by AI.
Transcript
ProgAgent. Learning Tool Orchestration through Programmatic Training. By Hao Li and six others, from the Hong Kong University of Science and Technology, the Beijing University of Posts and Telecommunications, and one other institution. Published on the tenth of October. Its code repository is worked out: about two thousand five hundred source files, with a readme and a licence.
Large language models are increasingly expected to orchestrate many different tools over long-horizon tasks. Most agents do this through Direct Tool Calling: the model invokes tools one after another, and every tool response piles up in its context. Over a long task, that accumulation can lead to context rot and to orchestration breaking down. Programmatic Tool Calling is the alternative. Tools are invoked through executable code, and intermediate results are kept in runtime variables instead of being appended to the context. Prior work has explored this mainly as an inference-time optimization. Whether it helps when training agents has remained unclear, and verifiable training tasks suited to it are scarce.
ProgAgent is a full training stack for programmatic tool calling. Rather than treating code-based calls as a trick applied at inference, it trains models to work in that interface, and it supplies the verifiable tasks needed to do so.
The stack has three parts. A pipeline synthesizes verifiable long-horizon tasks. A lightweight runtime executes the programmatic calls. And a two-stage training recipe does the teaching. The data requirement is modest: only two hundred and fifteen tasks, each instantiated at four environment scales.
Across four benchmarks, ProgAgent reaches higher pass rates than the evaluated baselines of comparable size. The sharpest result is on LOCA-bench. At an environment state of sixty-four thousand tokens, ProgAgent-14B achieves a thirty point seven percent pass rate, where those baselines score zero.
Cross-harness experiments then swap the evaluation interface. Models trained with programmatic calling outperform models trained with direct calling under both interfaces, which suggests that the benefit of this training extends beyond the interface itself.
The question underneath is where intermediate results should live. Prior work treated keeping them in variables as a way to run an agent at inference time. ProgAgent treats it as something to train for, and the cross-harness result hints that what a model learns this way carries over even when it is handed the older, direct interface.
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