用工具模式图提升大模型工具调用的规划与执行效率
HyperAgent: Planning and Acting over Tool-Schema Hypergraphs for Tool-Use LLM Agents

- 构建工具-模式超图,显式表达工具输入输出关系
- 动态生成支持图,减少冗余调用和模型交互
- 适合需要可靠工具组合的复杂任务自动化场景
大型语言模型(LLM)代理越来越多地依赖外部工具完成现实世界中的复杂任务。然而,由于隐式推理能力有限以及真实执行环境的动态变化,可靠的工具使用规划仍然具有挑战性。现有工具使用代理通常依赖LLM从文本描述中推断工具组合,这在复杂任务中可能导致低效探索和不可靠执行。为此,我们从模式层面建模工具关系,构建有向工具-模式超图,其中工具以超边形式连接其所需的输入模式节点与输出模式节点。进一步提出HyperAgent框架,基于工具-模式超图实现动态规划与执行。给定任务后,HyperAgent首先提取任务相关的工具上下文图,并据此引导构建感知模式的任务有向无环图(Task DAG)。执行过程中,通过缺陷导向扩展构建状态相关的工具支持图,识别未满足的需求并根据当前代理状态检索支持性生产工具。在AppWorld上的实验表明,相比现有代理基线,HyperAgent提升了任务完成率,同时减少了冗余API调用、LLM交互次数和令牌消耗。
原文摘要 · Abstract (English)
Large language model (LLM) agents increasingly rely on external tools to complete complex real-world tasks. However, reliable tool-use planning remains challenging due to the limitations of implicit reasoning and the evolving nature of real-world execution environments. Existing tool-use agents typically rely on LLMs to infer tool compositions from textual descriptions, which can lead to inefficient exploration and unreliable execution in complex tasks. To address these challenges, we model tool relations at the schema level and construct a directed Tool--Schema Hypergraph, in which tools are represented as hyperedges from their required input-schema nodes to their output-schema nodes. Furthermore, we propose HyperAgent, a Tool--Schema Hypergraph-guided framework for dynamic planning and execution. Given a task, HyperAgent first extracts a task-relevant tool context graph and uses it to guide the construction of a schema-aware Task DAG. During execution, HyperAgent dynamically realizes each subtask by constructing a state-conditioned tool support graph through deficit-oriented expansion, which identifies unresolved requirements and retrieves supporting producer tools according to the current agent state. Experiments on AppWorld demonstrate that HyperAgent improves task completion performance while reducing redundant API calls, LLM interactions, and token consumption compared with existing agent baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。