让大模型工具代理自动修复故障,大幅降低调用成本。
Graph-Based Self-Healing Tool Routing for Cost-Efficient LLM Agents
- 用图结构路由代替大模型决策,故障时自动重算路径。
- 93%减少控制层大模型调用,故障恢复准确率接近顶级方案。
- 适合高可靠低延迟的智能代理系统,尤其抗多工具并发失效。
使用工具的大模型代理面临可靠性与成本的权衡:将所有决策交由大模型可提升正确性,但带来高延迟和高推理成本;而预设工作流图虽降低成本,却在意外复合工具失效时变得脆弱。本文提出 Self-Healing Router,一种容错编排架构,将多数代理控制流决策视为路由而非推理。系统结合(i)并行健康监控器,为工具中断、风险信号等运行时状态分配优先级评分;(ii)带成本权重的工具图,采用 Dijkstra 算法进行确定性最短路径路由。当工具执行中失败时,其边权重被重置为无穷大,路径重新计算,实现无需调用大模型的自动恢复。大模型仅用于无可行路径的情况,支持目标降级或升级。相比 ControlLLM、ToolNet、NaviAgent 等以往基于图的工具使用系统,本方法实现了运行时容错、确定性恢复和二元可观测性——每个故障要么被记录为路径重路由,要么明确上报,绝不会无声跳过。在涵盖三种拓扑结构(线性流水线、依赖有向图、并行分支)的19个场景中,该方法达到 ReAct 的正确性水平,同时将控制平面大模型调用减少93%(从123降至9),彻底消除静态工作流基线在复合故障下的沉默失败问题。
原文摘要 · Abstract (English)
Tool-using LLM agents face a reliability-cost tradeoff: routing every decision through the LLM improves correctness but incurs high latency and inference cost, while pre-coded workflow graphs reduce cost but become brittle under unanticipated compound tool failures. We present Self-Healing Router, a fault-tolerant orchestration architecture that treats most agent control-flow decisions as routing rather than reasoning. The system combines (i) parallel health monitors that assign priority scores to runtime conditions such as tool outages and risk signals, and (ii) a cost-weighted tool graph where Dijkstra's algorithm performs deterministic shortest-path routing. When a tool fails mid-execution, its edges are reweighted to infinity and the path is recomputed -- yielding automatic recovery without invoking the LLM. The LLM is reserved exclusively for cases where no feasible path exists, enabling goal demotion or escalation. Prior graph-based tool-use systems (ControlLLM, ToolNet, NaviAgent) focus on tool selection and planning; our contribution is runtime fault tolerance with deterministic recovery and binary observability -- every failure is either a logged reroute or an explicit escalation, never a silent skip. Across 19 scenarios spanning three graph topologies (linear pipeline, dependency DAG, parallel fan-out), Self-Healing Router matches ReAct's correctness while reducing control-plane LLM calls by 93% (9 vs 123 aggregate) and eliminating the silent-failure cases observed in a well-engineered static workflow baseline under compound failures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。