Large language model (LLM) agents increasingly rely on web services as tools, but most interfaces remain static endpoints that poorly express long-horizon workflows with loops, conditionals, joins, and retries. A new system, ToolPro, addresses this by representing an agent's tool intent as an executable tool program, compactly encoding multi-step service interactions with explicit effect types.
How ToolPro Works
ToolPro combines three core mechanisms: constraint-guided program construction, effect-aware replay, and a profile-driven policy. Constraint-guided construction ensures programs respect service constraints. Effect-aware replay guarantees exactly-once execution for state-modifying calls, critical for operations like database writes or payment processing. The profile-driven policy decides when program execution outperforms stepwise calling, based on network latency and workflow complexity.
The system is instantiated over MCP-style services with WebAssembly sandboxing, providing safe execution of tool programs. This design allows LLM agents to invoke complex, multi-step workflows in a single programmatic call rather than multiple sequential API calls.
Performance Results
ToolPro was evaluated on diverse workflows of real-world applications. The results show significant improvements in both latency and traffic:
| Metric | Improvement | Condition |
|---|---|---|
| End-to-end latency | Up to 53.4% reduction | Under high network latency and workflow complexity |
| Client-side traffic | Up to 96.1% reduction | Under high network latency and workflow complexity |
According to the paper, larger gains are observed under higher network latency and workflow complexity. This makes ToolPro particularly valuable for distributed systems where network round trips dominate performance.
Implications for Enterprise Automation
For enterprise technology decision-makers, ToolPro offers a path to more efficient and reliable automation. Multi-step workflows common in logistics—such as order tracking, customs clearance, and inventory updates—often require coordinating several web services. By bundling these interactions into a single executable program, ToolPro reduces both latency and bandwidth usage, enabling faster and more scalable agentic systems.
The effect-aware replay mechanism provides strong guarantees for state-modifying operations, reducing the risk of duplicate or partial updates. This is essential for financial transactions, order fulfillment, and other critical processes in trade and supply chain operations.
ToolPro's use of WebAssembly sandboxing also addresses security concerns when executing untrusted tool programs. The approach allows safe execution within a controlled environment, expanding the range of services that can be safely automated.
While ToolPro is a research prototype, its principles can inform the design of next-generation agentic web services. As LLM agents become more integrated into enterprise workflows, interfaces that compactly represent multi-step intents will become increasingly important for achieving both performance and reliability.