I-PTC: Interactive Programmatic Tool Calling for Stateful Tool-Augmented Agents
Huanzhi Mao, Chengkun Cao, Shuo Yuan, Joseph Gonzalez
NeurIPS page · OpenReview · Open on the map
Category: LLM Agents, Evals & Benchmarks › Tool-Augmented Agents · Type: new method · Keywords: stateful programmatic tool calling, interactive framework, tool-augmented agents, benchmark evaluation, multi-step task planning
Areas: AI Agents › Agent Optimization and Evaluation › Tool-Augmented Agents; Evaluation & Benchmarks › Agent Capabilities and Memory › Agentic Tool Use
Summary
I-PTC introduces an interactive framework for stateful programmatic tool calling that enables agents to maintain reusable state and adapt tool interfaces, improving performance on complex multi-step tasks while reducing token consumption.
Explained to a 5-year-old
Some smart computer programs can write little code to use tools. Usually these programs forget what they did before, but this new idea helps them remember. They can keep a list of things they have done so they don't have to start over. The program can also fix mistakes when the tools change or stop working. This makes the programs better at doing hard, step-by-step jobs.
Explained to a 5-year-old, longer
Imagine a robot helper that can ask a computer to do things like look up information. Instead of asking for one thing at a time, it can write a small program that does many things. This program can use loops, so it can repeat actions without asking each time. It can also group several actions together, which makes it faster. The program can think about what it needs to do and plan ahead. It can remember what it has already done, so it doesn't forget. This memory helps it reuse results, like a recipe you keep in mind. If the tool it uses changes, the program can be updated to work with the new version. It can also fix mistakes when something goes wrong. This makes the robot helper more reliable for long tasks. It can handle many tools at once, like a toolbox with hammers, screwdrivers, and paints. All of this helps the robot solve harder problems step by step.
For a technical reader
The system lets agents write small code snippets that call tools, keeping a persistent state so results can be reused. It also updates the tool interface on the fly when APIs change, improving robustness. Experiments on a new benchmark show better task performance and lower token usage compared to existing baselines. This stateful approach makes tool-augmented agents more scalable for real-world applications.
Problem
Existing tool-augmented agents rely on stateless tool calls, which limits their ability to reuse intermediate results and adapt over time in real-world tasks where tool environments and problem-solving processes are stateful. This makes it difficult for agents to handle complex, multi-step tasks that require maintaining state across interactions.
Method
The approach executes stateful programmatic tool calling by having models generate code snippets that invoke tools, maintain reusable state across calls, and iteratively refine the tool interface through API corrections. It integrates state management and interactive feedback to enable agents to plan and recover from failures over extended interactions.
Results
The approach achieves higher performance on complex multi-step tasks with large tool sets and significantly reduces token consumption compared to conventional tool-calling baselines and the original PTC baseline.
Contributions
It introduces a stateful programmatic tool calling framework that enables agents to maintain reusable state and iteratively refine tool interfaces, and it provides PTC-BENCH, a benchmark of long-tail, production-style user requests for evaluating complex multi-step tool usage.
Practical relevance
It enables more scalable and efficient tool-augmented agents for real-world tasks that require persistent state and adaptive tool usage.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction