Tool menus improve online agents success with state path ordering
The Menu Is an Execution Prior: State-Path Tool Menus for Online Agents
Artificial Intelligence
Summary
Language models often need to use many different tools to complete tasks, but choosing which tools to use and in what order is hard, especially when there are thousands available. The authors created a method called State-Path Tool Menu that helps agents pick the right small set of tools and order them correctly before starting work. This approach understands which tools depend on others and arranges them to build usable inputs step-by-step. Their tests showed that this method makes agents much better at finishing tasks efficiently without changing the underlying agent itself.
What this means in practice
- •For software engineers: Help language-based agents select and order relevant tools from large libraries to improve task success rates in interactive systems.
- •For ai product developers: Design smarter assistants that handle complex, multi-step workflows by using state-path informed tool menus for better tool management.$Commercial implications: Enables development of commercial AI assistants with improved reliability in executing complex tasks through dynamic tool selection.
Authors
Bo Yan, Weikai Lin, Song Wang
Abstract
Language models act through tools, yet practical agents face libraries containing thousands of interfaces. We introduce the tool menu as the short, ordered subset of available tools shown to an agent before execution. The agent can call only tools in this menu. Multi-step tasks require the final action and the prerequisite tools that create its inputs in a usable order. Current constructors rank tools by request relevance, which can surface the final action while omitting or delaying less obvious producers. We introduce the state path, a pre-execution route from the observable request state to the desired outcome, and propose State-Path Tool Menu to learn it. Our framework treats the menu as an execution prior over these routes. Its encoder represents which tools can run from the current state, how their outputs satisfy later inputs, and which orders recur in training paths. A retriever covers an executable entry, the missing-input producers, and the final action. A reranker then places producers before consumers. On ToolBench, our menu raises online success from 0.737 to 0.898 and outperforms retrieval, reranking, generation, and routing baselines without changing the agent. The State-Path menu also covers more complete chains with 32 tools than the official list covers with 128, and its success gain persists across executor families with different model capacities. Our code is at https://github.com/Met2348/State-Path.