ProgAgent: Learning Tool Orchestration through Programmatic Training

Hao Li, Keqing He, Longtao Zheng, Junlong Li, Weihao Zeng, Qian Liu, Yuzhen Huang

arXiv:2610.14774 · 2026-10-15 공개 · arXiv · PDF

llm-agents long-horizon-tasks tool-orchestration progagent runtime-variables training-stack loca-bench ptc-runtime

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.

한국어 요약

한 줄 요약

ProgAgent는 프로그래밍적 훈련을 통해 대규모 언어 모델의 장기적 툴 오케스트레이션 성능을 향상시키는 훈련 스택이다.

핵심 기여도

핵심 아이디어

기존의 DTC 방식은 툴 응답을 모델 컨텍스트에 누적시키며, 이는 컨텍스트 로트(context rot)와 오케스트레이션 붕괴를 유발한다. 반면, PTC는 실행 가능한 코드를 통해 툴을 호출하고, 중간 결과를 런타임 변수에 저장함으로써 컨텍스트 성장 문제를 완화한다. ProgAgent는 PTC를 훈련 단계에서 활용하는 새로운 패러다임을 제시하며, 이는 기존 훈련 방식과는 다른 행동 공간(action space)을 제공한다. 특히, ProgAgent는 Python 검증기와 함께 장기적 태스크를 생성하고, 라이트급 PTC 런타임을 통해 에피소드를 격리하며, RL 훈련을 지원한다.

기술적 접근법

주요 결과

의의 및 한계

ProgAgent는 PTC를 훈련 단계에서 활용함으로써, 기존 DTC 방식의 한계를 극복하고, 장기적 툴 오케스트레이션의 성능을 향상시킨다. 특히, PTC 훈련은 DTC 인터페이스로의 이전도 가능하다는 점에서 실용적 가치가 있다. 그러나, PTC 훈련이 모든 태스크 유형에 일반화되는지는 추가 연구가 필요하며, 생성된 215개 태스크의 범용성도 한계로 작용할 수 있다.

실용적 활용

ProgAgent는 소프트웨어 엔지니어링, 자동화된 시스템 관리, 복잡한 데이터 분석 등에서 대규모 언어 모델의 장기적 툴 오케스트레이션 능력을 향상시키는 데 활용될 수 있다. 특히, 코드 생성 능력을 기반으로 한 훈련 방식은 복잡한 조건 분기와 데이터 변환을 요구하는 업무에 적합하다.