I-PTC: Interactive Programmatic Tool Calling for Stateful Tool-Augmented Agents
Huanzhi Mao, Chengkun Cao, Shuo Yuan, Joseph E. Gonzalez
Key points
From the paper's conclusion- We therefore present I-PTC, an interactive framework that executes stateful PTC: models issue code snippets that call tools, maintain reusable state, and evolve the tool interface through API corrections.
Abstract
Large language models are increasingly capable of writing and executing code, suggesting a natural paradigm for tool-augmented agents: expressing tool use as programs rather than isolated calls. Programmatic tool calling (PTC) captures this idea through loops, batching, abstraction, and structured computation, but existing PTC approaches are largely stateless, limiting their ability to reuse intermediate results and adapt over time. This is problematic for real-world tasks, where tool environments and problem-solving processes are inherently stateful. We therefore present I-PTC, an interactive framework that executes stateful PTC: models issue code snippets that call tools, maintain reusable state, and evolve the tool interface through API corrections. To evaluate the effectiveness of I-PTC and the general PTC setting, we introduce PTC-Bench, a benchmark of long-tail, production-style user requests whose difficulty comes from large initial environments, many dependent API interactions, extended planning, and recovery across follow-ups and transient failures. Experiments on PTC-Bench show that I-PTC improves performance on complex multi-step tasks with large tool sets while substantially reducing token consumption over conventional tool-calling baselines and the original PTC baseline, highlighting stateful programmatic tool calling as a promising direction for scalable tool-augmented agents.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Beyond Clumsy Agentic Tool Calling: How Cueing and Spotting Make the DifferencearXiv · 2026
- The evolution of tool use in LLM agents: from single-tool call to multi-tool orchestrationArtificial Intelligence Review · 2026
- AgentTune: A Unified Training Lifecycle for Tool-Using LLM AgentsarXiv · 2026
- ParaAgent: Reinforcing Parallel Acting in Open-World Tool EnvironmentsarXiv · 2026
- Tool Recommendation for Multi-Step Agents: Finding Every Tool a Task NeedsarXiv · 2026
- CarryOn: Learning What to Keep in Context for Long-Horizon LLM AgentsarXiv · 2026