Tools as Continuous Flow for Evolving Agentic Reasoning
Summary
This paper introduces FlowAgent, a novel framework that reconceptualizes tool chaining as continuous trajectory generation using conditional flow matching to improve robustness in long-horizon agentic reasoning.
View Cached Full Text
Cached at: 05/11/26, 07:17 AM
# Tools as Continuous Flow for Evolving Agentic Reasoning
Source: [https://arxiv.org/html/2605.07339](https://arxiv.org/html/2605.07339)
Tairan Huang1,, Siyu Shang1,∗, Qiang Chen2,, Xiu Su1,, Yi Chen2,‡ 1Central South University 2The Hong Kong University of Science and Technology tairanhuang@csu\.edu\.cn,8209230402@csu\.edu\.cn, qiangchen\.sh@gmail\.com,xiusu1994@csu\.edu\.cn,yichen@ust\.hkTairan Huang1,∗, Siyu Shang1,∗, Qiang Chen2,†, Xiu Su1,‡, Yi Chen2,‡ 1Central South University 2The Hong Kong University of Science and Technology tairanhuang@csu\.edu\.cn,8209230402@csu\.edu\.cn, qiangchen\.sh@gmail\.com,xiusu1994@csu\.edu\.cn,yichen@ust\.hk
###### Abstract
Large Language Models \(LLMs\) have demonstrated remarkable capabilities in orchestrating tools for reasoning tasks\. However, existing methods rely on a step\-wise paradigm that lacks a global perspective, which causes error accumulation over long horizons and restricts generalization to unseen tools\. To overcome these limitations, we propose Tools as Continuous Flow for Evolving Agentic Reasoning \(FlowAgent\), which reconceptualizes tool chaining as continuous trajectory generation within a semantic space\. To systematically evaluate this paradigm, we introduce the first plan\-level closed\-loop benchmark dedicated to plan\-level agentic reasoning in dynamic real\-world environments\. Specifically, the proposed FlowAgent leverages conditional flow matching to generate continuous latent trajectories, providing a global planning perspective to ensure coherent and robust tool execution\. Theoretically, we establish formal bounds on utility convergence and prove that our continuous formulation fundamentally guarantees robust generalization and error attenuation\. Empirical evaluations show that FlowAgent achieves superior robustness and adaptability in long\-horizon reasoning tasks\. Our code and datasets are available at[https://github\.com/ssy166/FlowPlan](https://github.com/ssy166/FlowPlan)\.
11footnotetext:Equal Contribution\.22footnotetext:Leading the Project\.33footnotetext:Corresponding Authors\.## 1Introduction
Large Language Models \(LLMs\) have evolved into capable agents that utilize external tools\. By interacting with search engines and APIs, these models ground their reasoning in real\-world environments\[[1](https://arxiv.org/html/2605.07339#bib.bib1),[2](https://arxiv.org/html/2605.07339#bib.bib2),[3](https://arxiv.org/html/2605.07339#bib.bib3),[4](https://arxiv.org/html/2605.07339#bib.bib4)\]\. This paradigm allows agents to execute complex operations and significantly expands their utility beyond static text generation\[[5](https://arxiv.org/html/2605.07339#bib.bib5),[6](https://arxiv.org/html/2605.07339#bib.bib6)\]\. Consequently, they are increasingly deployed to automate sophisticated workflows requiring sequential logic and dynamic environment interaction\[[7](https://arxiv.org/html/2605.07339#bib.bib7),[8](https://arxiv.org/html/2605.07339#bib.bib8),[9](https://arxiv.org/html/2605.07339#bib.bib9),[10](https://arxiv.org/html/2605.07339#bib.bib10)\]\.
Recent methods formulate tool planning as an autoregressive generation task over a discrete action space\[[11](https://arxiv.org/html/2605.07339#bib.bib11),[12](https://arxiv.org/html/2605.07339#bib.bib12),[13](https://arxiv.org/html/2605.07339#bib.bib13),[14](https://arxiv.org/html/2605.07339#bib.bib14)\]\. At each step, the agent observes the current context, evaluates available options, and explicitly selects a tool for execution\. Several methods incorporate reinforcement learning algorithms\[[15](https://arxiv.org/html/2605.07339#bib.bib15),[16](https://arxiv.org/html/2605.07339#bib.bib16)\]or sophisticated prompting strategies\[[17](https://arxiv.org/html/2605.07339#bib.bib17),[18](https://arxiv.org/html/2605.07339#bib.bib18)\]to refine these sequential decisions based on task\-specific rewards\. Despite incorporating these optimizations to enhance single\-step accuracy, the fundamental decision process remains deeply rooted in a token\-by\-token generation paradigm\.
Figure 1:\(a\-c\) Conceptual illustrations of the fundamental limitations in current discrete tool reasoning paradigms:lack of global perspective,severe error accumulation, andpoor generalization to unseen tools\. As evidenced in \(d\), the performance of the traditional step\-wise paradigm is inadequate under the plan\-level benchmark, highlighting the critical need for a paradigm shift toward global plan\-level reasoning\.These step\-wise paradigms exhibit fundamental limitations when handling complex scenarios, as shown in Figure[1](https://arxiv.org/html/2605.07339#S1.F1)\. \(1\)Lack of global perspective\.Existing methods explicitly optimize local tool selection but lack holistic planning, failing to integrate these isolated steps with the overall mission objectives\. \(2\)Severe error accumulation\.In long\-horizon tasks, a myopic execution strategy becomes fragile\. A single suboptimal tool choice derails the subsequent reasoning chain, causing execution failures to compound rapidly\. \(3\)Poor generalization to unseen tools\.By treating tools as isolated categorical labels, existing models fail to capture underlying functional similarities and subsequently struggle to adapt when generalizing to novel toolsets\.
To address these inherent limitations, we propose Tools as Continuous Flow for Evolving Agentic Reasoning \(FlowAgent\), a novel paradigm that fundamentally shifts from myopic step\-wise selection to global plan\-level reasoning by reconceptualizing discrete tool chaining as continuous trajectory generation within a semantic space\. To systematically evaluate this paradigm, we introduce the first closed\-loop benchmark dedicated to plan\-level agentic reasoning in dynamic real\-world environments\. Specifically, the proposed FlowAgent formulates multi\-step planning as continuous trajectory evolution supervised by expert demonstrations, providing a global planning perspective to ensure coherent reasoning\. These latent plans are subsequently translated into precise discrete actions within a closed\-loop execution scheme, which dynamically absorbs environmental feedback and explicitly aligns the entire process with optimal plan\-level utility\. Theoretically, we establish formal bounds on utility convergence and mathematically prove that our continuous formulation guarantees semantic\-driven tool generalization and fundamental error attenuation\.
The contributions of this work are summarized below\.
- •Plan\-level Benchmark:We introduce the first Plan\-level closed\-loop benchmark dedicated to plan\-level agentic reasoning in dynamic real\-world environments\. By integrating diverse real\-world domains, this setup systematically evaluates the ability to dynamically absorb environmental feedback during multi\-step execution\.
- •Novel Paradigm:We propose FlowAgent, a novel paradigm for evolving agentic reasoning\. FlowAgent reconceptualizes discrete tool chaining as continuous trajectory generation within a semantic space via conditional flow matching, which shifts the decision process from myopic step\-wise selection to global plan\-level reasoning\.
- •Theoretical Foundation:We provide a rigorous mathematical framework that establishes explicit bounds on plan utility convergence and generalization to unseen tools\. Furthermore, we formally prove that our closed\-loop execution scheme strictly attenuates error accumulation in long\-horizon reasoning tasks\.
- •Empirical Superiority:Extensive experiments demonstrate that FlowAgent significantly outperforms baseline methods, exhibiting superior robustness in long\-horizon tasks and adaptability to unseen toolsets\.
Figure 2:The overall framework ofFlowAgent, which reconceptualizes discrete tool chaining as continuous trajectory generation to shift from myopic step\-wise selection to plan\-level reasoning\.
## 2Related Work
LLM\-based Tool Reasoning\.The efficacy of LLM agents relies heavily on their ability to interact with external tools\[[19](https://arxiv.org/html/2605.07339#bib.bib19),[20](https://arxiv.org/html/2605.07339#bib.bib20)\]\. Early paradigms attempted to mitigate this through explicit prompt engineering\[[21](https://arxiv.org/html/2605.07339#bib.bib21),[22](https://arxiv.org/html/2605.07339#bib.bib22)\]or interleaving chain\-of\-thought reasoning with API invocations\[[23](https://arxiv.org/html/2605.07339#bib.bib23),[24](https://arxiv.org/html/2605.07339#bib.bib24)\]\. Recent advancements have transitioned towards autonomous tool integration\[[25](https://arxiv.org/html/2605.07339#bib.bib25),[26](https://arxiv.org/html/2605.07339#bib.bib26),[27](https://arxiv.org/html/2605.07339#bib.bib27)\], formalizing the selection and execution of diverse APIs\. ToolRL\[[11](https://arxiv.org/html/2605.07339#bib.bib11)\]conceptualizes tool use as an interactive decision\-making process, allowing agents to refine sequential actions via reinforcement learning from environmental feedback\. However, these systems predominantly operate within a discrete action space, treating tool planning as isolated categorical selections rather than globally coherent trajectories\. In contrast, FlowAgent reconceptualizes discrete tool chaining as continuous trajectory generation within a semantic space, shifting the decision process from myopic step\-wise selection to global plan\-level reasoning to unlock robust adaptability to unseen toolsets\.
LLMs Agent Planning\.LLMs Agent planning is essential for decomposing complex goals into executable sub\-tasks, while simple autoregressive generation often fails to maintain long\-term coherence\[[28](https://arxiv.org/html/2605.07339#bib.bib28),[29](https://arxiv.org/html/2605.07339#bib.bib29),[30](https://arxiv.org/html/2605.07339#bib.bib30),[31](https://arxiv.org/html/2605.07339#bib.bib31)\]\. Early methods focused on linear reasoning chains\[[32](https://arxiv.org/html/2605.07339#bib.bib32),[33](https://arxiv.org/html/2605.07339#bib.bib33)\]or iterative self\-correction\[[34](https://arxiv.org/html/2605.07339#bib.bib34),[35](https://arxiv.org/html/2605.07339#bib.bib35)\]to refine outputs based on internal heuristics\. Recent research has moved toward sophisticated search\-based architectures to explore and evaluate multiple reasoning branches\[[36](https://arxiv.org/html/2605.07339#bib.bib36),[37](https://arxiv.org/html/2605.07339#bib.bib37)\]\. Furthermore, specialized planners\[[38](https://arxiv.org/html/2605.07339#bib.bib38),[39](https://arxiv.org/html/2605.07339#bib.bib39)\]incorporate environmental feedback to adjust planning trajectories during execution\. However, these methods fundamentally rely on discrete search within a step\-wise framework, which remain prone to cascading error accumulation in long\-horizon reasoning\. In contrast, FlowAgent bypasses the limitations of myopic discrete search by generating continuous trajectories, facilitating global plan\-level reasoning that maintains structural coherence\.
## 3Methodology
### 3\.1Problem Definition and Formalization
Environment, State, and Tool Representation\.Consider an agentic reasoning task evolving over discrete phasesh∈\{1,…,H\}h\\in\\\{1,\\dots,H\\\}\. At phasehh, the system maintains an available toolsetTh=\{t1,…,t\|Th\|\}T\_\{h\}=\\\{t\_\{1\},\\dots,t\_\{\|T\_\{h\}\|\}\\\}, which dynamically evolves over time\. To enable unseen tool generalization, each toolt∈Tht\\in T\_\{h\}is parameterized by a continuous semantic embeddinget∈ℝde\_\{t\}\\in\\mathbb\{R\}^\{d\}, jointly encoding its functional description and usage constraints\. We define the context state at phasehhasch=\(x,τ<h,Th\)c\_\{h\}=\(x,\\tau\_\{<h\},T\_\{h\}\), wherexxdenotes the initial query, andτ<h=\(\(r1,t^1,o1\),…,\(rh−1,t^h−1,oh−1\)\)\\tau\_\{<h\}=\\big\(\(r\_\{1\},\\hat\{t\}\_\{1\},o\_\{1\}\),\\dots,\(r\_\{h\-1\},\\hat\{t\}\_\{h\-1\},o\_\{h\-1\}\)\\big\)encapsulates the historical reasoning trajectory\. Specifically, at each past stepi<hi<h,rir\_\{i\}denotes the generated rationale,t^i\\hat\{t\}\_\{i\}is the executed tool, andoio\_\{i\}represents the environmental observation returned after execution\.
Instead of directly predicting discrete token\-level actions, our framework formally models a continuous latent plan object:
Ph=\(zh\(1\),zh\(2\),…,zh\(Lh\)\),P\_\{h\}=\(z\_\{h\}^\{\(1\)\},z\_\{h\}^\{\(2\)\},\\dots,z\_\{h\}^\{\(L\_\{h\}\)\}\),\(1\)where each latent anchorzh\(l\)∈ℝdz\_\{h\}^\{\(l\)\}\\in\\mathbb\{R\}^\{d\}corresponds to a future planning step\. Through discrete decoding, this continuous path naturally projects to a stage\-specific tool sequencet^h\(l\)∈Th\\hat\{t\}\_\{h\}^\{\(l\)\}\\in T\_\{h\}forl∈\{1,…,Lh\}l\\in\\\{1,\\dots,L\_\{h\}\\\}\.
Plan\-Level Objective\.Traditional step\-wise tool selection focuses on optimizing a localized policyth∼π\(t\|ch,Th\)t\_\{h\}\\sim\\pi\(t\|c\_\{h\},T\_\{h\}\)\. In contrast, we elevate the objective to model a plan\-level continuous distributionPh∼qϕ\(P\|ch\)P\_\{h\}\\sim q\_\{\\phi\}\(P\|c\_\{h\}\)\. The execution decision relies on an embedding\-based decoder mapping the continuous anchor to candidate tools via a distance\-based probability:
pϕ\(t\|zh\(l\),Th\)∝exp\(−‖zh\(l\)−et‖22ϵ\),p\_\{\\phi\}\(t\|z\_\{h\}^\{\(l\)\},T\_\{h\}\)\\propto\\exp\\left\(\-\\frac\{\|\|z\_\{h\}^\{\(l\)\}\-e\_\{t\}\|\|\_\{2\}^\{2\}\}\{\\epsilon\}\\right\),\(2\)whereϵ\\epsilonis the temperature scaling factor controlling the discrete decoding margin\.
To systematically address the global structure of multi\-tool tasks, the overall training target is formulated as plan utility maximizationmaxϕ𝔼\[U\(Ph;ch\)\]\\max\_\{\\phi\}\\mathbb\{E\}\[U\(P\_\{h\};c\_\{h\}\)\]\. The utility functionUUexplicitly unifies task performance with practical constraints:
U\(Ph;ch\)=Acc\(Ph;ch\)−λcostCost\(Ph\)−λredRed\(Ph\)\+λconsCons\(Ph;ch\),U\(P\_\{h\};c\_\{h\}\)=\\text\{Acc\}\(P\_\{h\};c\_\{h\}\)\-\\lambda\_\{cost\}\\text\{Cost\}\(P\_\{h\}\)\-\\lambda\_\{red\}\\text\{Red\}\(P\_\{h\}\)\+\\lambda\_\{cons\}\\text\{Cons\}\(P\_\{h\};c\_\{h\}\),\(3\)whereAcc\(⋅\)\\text\{Acc\}\(\\cdot\)measures the final reasoning quality,Cost\(⋅\)\\text\{Cost\}\(\\cdot\)penalizes redundant calls or latency,Red\(⋅\)\\text\{Red\}\(\\cdot\)penalizes cyclic failures, andCons\(⋅\)\\text\{Cons\}\(\\cdot\)strictly evaluates the alignment between the generated plan and the current observation context, andλ\{cost,red,cons\}\>0\\lambda\_\{\\\{cost,red,cons\\\}\}\>0are balancing hyperparameters\.
Closed\-Loop Planning Objective\.Since tool outputs inevitably alter subsequent environmental configurations, we explicitly formalize a closed\-loop execution paradigm\. Upon receiving the observationoho\_\{h\}from the executed toolt^h\\hat\{t\}\_\{h\}, the context state is deterministically updated via the operator𝒰\\mathcal\{U\}:
ch\+1=𝒰\(ch,t^h,oh\)\.c\_\{h\+1\}=\\mathcal\{U\}\(c\_\{h\},\\hat\{t\}\_\{h\},o\_\{h\}\)\.\(4\)Unlike open\-loop planners that rigidly execute long\-horizon chains, our system dynamically resamples the latent plan conditioned on the updated state:
Ph\+1∼qϕ\(P\|ch\+1\)\.P\_\{h\+1\}\\sim q\_\{\\phi\}\(P\|c\_\{h\+1\}\)\.\(5\)Consequently, the proposed approach fundamentally operates as a receding\-horizon latent plan generator, preventing early\-stage planning errors from compounding against real\-time feedback\.
### 3\.2Conditional Flow Planner
We defines∈\[0,1\]s\\in\[0,1\]as the continuous planning time\. Given the current context statechc\_\{h\}, the evolution of the latent plan pathz\(s\)z\(s\)is governed by an ordinary differential equation \(ODE\) driven by a conditional velocity fieldvϕv\_\{\\phi\}:
dz\(s\)ds=vϕ\(z\(s\),s\|ch\),z\(0\)∼p0,\\frac\{dz\(s\)\}\{ds\}=v\_\{\\phi\}\(z\(s\),s\|c\_\{h\}\),\\quad z\(0\)\\sim p\_\{0\},\(6\)wherep0p\_\{0\}represents a simple prior distribution\. By numerically integrating the velocity field, we obtain a continuous trajectory from which we extract a sequence ofLhL\_\{h\}latent plan anchors:
Ph=\(zh\(1\),zh\(2\),…,zh\(Lh\)\)\.P\_\{h\}=\(z\_\{h\}^\{\(1\)\},z\_\{h\}^\{\(2\)\},\\dots,z\_\{h\}^\{\(L\_\{h\}\)\}\)\.\(7\)Each anchorzh\(l\)∈ℝdz\_\{h\}^\{\(l\)\}\\in\\mathbb\{R\}^\{d\}serves as a continuous semantic directive that guides the subsequent discrete tool mapping process\. This formulation explicitly generates a continuous evolutionary trajectory of future tool plans in the latent space, rather than merely predicting the next single\-step tool\.
### 3\.3Constructing Plan Supervision
Training the conditional flow planner requires continuous target trajectories derived from discrete expert demonstrations\. Given an expert reasoning chain of lengthmm, formally denoted as𝒯∗=\(\(r1,t1,o1\),…,\(rm,tm,om\)\)\\mathcal\{T\}^\{\*\}=\\big\(\(r\_\{1\},t\_\{1\},o\_\{1\}\),\\dots,\(r\_\{m\},t\_\{m\},o\_\{m\}\)\\big\), we construct a dense latent plan stateyj∈ℝdy\_\{j\}\\in\\mathbb\{R\}^\{d\}for each discrete stepj∈\{1,…,m\}j\\in\\\{1,\\dots,m\\\}:
yj=Wtetj\+WrEnc\(rj\)\+WoEnc\(oj−1\)\+Wpνj,y\_\{j\}=W\_\{t\}e\_\{t\_\{j\}\}\+W\_\{r\}\\text\{Enc\}\(r\_\{j\}\)\+W\_\{o\}\\text\{Enc\}\(o\_\{j\-1\}\)\+W\_\{p\}\\nu\_\{j\},\(8\)whereoj−1o\_\{j\-1\}denotes the observation from the previous step,etje\_\{t\_\{j\}\}represents the semantic tool embedding,Enc\(⋅\)\\text\{Enc\}\(\\cdot\)denotes the latent encoder for rationales and observations,νj\\nu\_\{j\}is a learnable phase embedding categorizing the operational stage, andW\{t,r,o,p\}W\_\{\\\{t,r,o,p\\\}\}are projection matrices\.
This extraction yields a sequence of discrete latent anchors𝒴=\(y1,y2,…,ym\)\\mathcal\{Y\}=\(y\_\{1\},y\_\{2\},\\dots,y\_\{m\}\)\. To formulate the regression objective for the continuous flow paradigm over normalized times∈\[0,1\]s\\in\[0,1\], we construct a continuous target pathy\(s\)y\(s\)via piecewise linear interpolation based on timestepssj=j−1m−1s\_\{j\}=\\frac\{j\-1\}\{m\-1\}:
y\(s\)=yj\+s−sjsj\+1−sj\(yj\+1−yj\),∀s∈\[sj,sj\+1\]\.y\(s\)=y\_\{j\}\+\\frac\{s\-s\_\{j\}\}\{s\_\{j\+1\}\-s\_\{j\}\}\(y\_\{j\+1\}\-y\_\{j\}\),\\quad\\forall s\\in\[s\_\{j\},s\_\{j\+1\}\]\.\(9\)This mathematically constructed continuous trajectoryy\(s\)y\(s\)acts as the explicit regression target, providing deterministic stage\-transition supervision for learning the conditional velocity field\.
### 3\.4Discrete Decoding and Execution
To instantiate the continuous latent plan into executable actions, the framework maps the generated latent anchorzh\(l\)z\_\{h\}^\{\(l\)\}to the dynamically evolving discrete tool spaceThT\_\{h\}\. According to the distance\-based probability distribution defined in the plan\-level objective, the specific tool executed at stepllis determined via sampling:
t^h\(l\)∼pϕ\(t\|zh\(l\),Th\)\.\\hat\{t\}\_\{h\}^\{\(l\)\}\\sim p\_\{\\phi\}\(t\|z\_\{h\}^\{\(l\)\},T\_\{h\}\)\.\(10\)To control the execution length and prevent logical over\-generation within a specific planning phase, we concurrently learn a parameterized stop mechanism\. This module explicitly estimates the termination probability conditioned on the localized latent anchor and the global context state:
pϕ\(stop\|zh\(l\),ch\)\.p\_\{\\phi\}\(\\text\{stop\}\|z\_\{h\}^\{\(l\)\},c\_\{h\}\)\.\(11\)If this predicted termination probability exceeds a predefined confidence threshold, the planning and execution progression within the current window is explicitly halted\.
Crucially, we eschew the rigid open\-loop execution of the entire planned sequencePhP\_\{h\}\. At phasehh, the agent executes strictly the leading toolt^h\(1\)\\hat\{t\}\_\{h\}^\{\(1\)\}corresponding to the first latent anchor\. The system retrieves the real\-world observationoho\_\{h\}and deterministically updates the context state:
ch\+1=𝒰\(ch,t^h\(1\),oh\)\.c\_\{h\+1\}=\\mathcal\{U\}\(c\_\{h\},\\hat\{t\}\_\{h\}^\{\(1\)\},o\_\{h\}\)\.\(12\)Following this localized execution, the remaining unexecuted anchors\(zh\(2\),…,zh\(Lh\)\)\(z\_\{h\}^\{\(2\)\},\\dots,z\_\{h\}^\{\(L\_\{h\}\)\}\)are discarded\. A new continuous latent trajectoryPh\+1P\_\{h\+1\}is dynamically resampled conditioned on the updated statech\+1c\_\{h\+1\}, establishing a mathematically rigorous plan\-execute\-replan closed loop\.
### 3\.5Training Objectives
To optimize the conditional flow planner and discrete execution, we propose a three\-stage training pipeline, includingContinuous Path Imitation,Discrete Plan Decoding, andPlan\-Level Refinement\.
Continuous Path Imitation\.We first train the flow planner to imitate the expert trajectories via conditional flow matching\. The predicted velocity fieldvϕv\_\{\\phi\}is optimized to match the teacher vector fieldu∗u^\{\*\}induced by the interpolated target pathy\(s\)y\(s\):
ℒFM=𝔼s,z\(s\)\[\|\|vϕ\(z\(s\),s\|ch\)−u∗\(z\(s\),s\|y\(s\)\)\|\|22\]\.\\mathcal\{L\}\_\{FM\}=\\mathbb\{E\}\_\{s,z\(s\)\}\\left\[\|\|v\_\{\\phi\}\(z\(s\),s\|c\_\{h\}\)\-u^\{\*\}\(z\(s\),s\|y\(s\)\)\|\|\_\{2\}^\{2\}\\right\]\.\(13\)
Discrete Plan Decoding\.We optimize the embedding\-based tool decoder and the parameterized stop mechanism\. Given the ground\-truth discrete tool identityth\(l\),∗t\_\{h\}^\{\(l\),\*\}and the target stopping indicatorstop∗∈0,1\\text\{stop\}^\{\*\}\\in\{0,1\}, we minimize the aggregated cross\-entropy loss over the extracted latent anchors:
ℒdec=−∑l=1Lh\(logpϕ\(th\(l\),∗\|zh\(l\),Th\)\+logpϕ\(stop∗\|zh\(l\),ch\)\)\.\\mathcal\{L\}\_\{dec\}=\-\\sum\_\{l=1\}^\{L\_\{h\}\}\\Big\(\\log p\_\{\\phi\}\(t\_\{h\}^\{\(l\),\*\}\|z\_\{h\}^\{\(l\)\},T\_\{h\}\)\+\\log p\_\{\\phi\}\(\\text\{stop\}^\{\*\}\|z\_\{h\}^\{\(l\)\},c\_\{h\}\)\\Big\)\.\(14\)
Plan\-Level Refinement\.Finally, to align the generated latent trajectories with the global multi\-tool objective, we perform plan\-level reinforcement learning over sampled candidate plansP∈𝒫hP\\in\\mathcal\{P\}\_\{h\}\. We bridge the utility ranking with policy optimization:
ℒplan=−∑P∈𝒫hπ∗\(P\|ch\)logqϕ\(P\|ch\),\\mathcal\{L\}\_\{plan\}=\-\\sum\_\{P\\in\\mathcal\{P\}\_\{h\}\}\\pi^\{\*\}\(P\|c\_\{h\}\)\\log q\_\{\\phi\}\(P\|c\_\{h\}\),\(15\)where the target policy distributionπ∗\(P\|ch\)\\pi^\{\*\}\(P\|c\_\{h\}\)is weighted by holistic plan utility functionU\(P;ch\)U\(P;c\_\{h\}\):
π∗\(P\|ch\)∝qold\(P\|ch\)exp\(U\(P;ch\)\),\\pi^\{\*\}\(P\|c\_\{h\}\)\\propto q\_\{\\text\{old\}\}\(P\|c\_\{h\}\)\\exp\(U\(P;c\_\{h\}\)\),\(16\)andqold\(P\|ch\)q\_\{\\text\{old\}\}\(P\|c\_\{h\}\)represents the generative policy from the previous optimization iteration\.
The overall training target is formulated as a weighted combination of these objectives:
ℒ=ℒFM\+λ1ℒdec\+λ2ℒplan\+λ3ℒcons,\\mathcal\{L\}=\\mathcal\{L\}\_\{FM\}\+\\lambda\_\{1\}\\mathcal\{L\}\_\{dec\}\+\\lambda\_\{2\}\\mathcal\{L\}\_\{plan\}\+\\lambda\_\{3\}\\mathcal\{L\}\_\{cons\},\(17\)whereλ\{1,2,3\}\>0\\lambda\_\{\\\{1,2,3\\\}\}\>0are balancing coefficients, andℒcons=1Lh∑l=1Lh‖zh\(l\)−WcEnc\(ch\)‖22\\mathcal\{L\}\_\{cons\}=\\frac\{1\}\{L\_\{h\}\}\\sum\_\{l=1\}^\{L\_\{h\}\}\|\|z\_\{h\}^\{\(l\)\}\-W\_\{c\}\\text\{Enc\}\(c\_\{h\}\)\|\|\_\{2\}^\{2\}acts as an auxiliary constraint explicitly regularizing the semantic consistency between the generated latent anchors and the prevailing observational context\.
## 4Theoretical Analysis
In this section, we provide a rigorous theoretical analysis\. We establish the foundational assumptions and derive theorems concerning utility convergence and generalization\.
### 4\.1Foundational Assumptions
To ensure the tractability of the latent planning problem, we introduce the following structural assumptions based on the system’s geometric properties\.
###### Assumption 1\(Semantic Smoothness\)\.
The tool semantic embeddings\{et\}\\\{e\_\{t\}\\\}reside on a smooth manifoldℳ⊂ℝd\\mathcal\{M\}\\subset\\mathbb\{R\}^\{d\}, where the distance in the latent space reflects functional similarity\.
###### Assumption 2\(Decoding Margin\)\.
For any expert latent anchoryjy\_\{j\}, there exists a decoding marginΔdec\>0\\Delta\_\{dec\}\>0such that for the ground\-truth toolt∗t^\{\*\}, the distance condition‖yj−et∗‖2≤‖yj−et‖2−Δdec\\\|y\_\{j\}\-e\_\{t^\{\*\}\}\\\|^\{2\}\\leq\\\|y\_\{j\}\-e\_\{t\}\\\|^\{2\}\-\\Delta\_\{dec\}holds for allt∈Th∖\{t∗\}t\\in T\_\{h\}\\setminus\\\{t^\{\*\}\\\}\.
###### Assumption 3\(Utility Smoothness\)\.
The plan utility functionU\(P;c\)U\(P;c\)is Lipschitz continuous with respect to the latent planPP\. That is, there exists a Lipschitz constantL\>0L\>0such that\|U\(P;c\)−U\(P′;c\)\|≤L∑l‖z\(l\)−z′\(l\)‖2\|U\(P;c\)\-U\(P^\{\\prime\};c\)\|\\leq L\\sum\_\{l\}\\\|z^\{\(l\)\}\-z^\{\\prime\(l\)\}\\\|\_\{2\}\.
###### Assumption 4\(Feedback Stability\)\.
The state transition operator𝒰\\mathcal\{U\}and the observation encoderEnc\(oh\)\\text\{Enc\}\(o\_\{h\}\)are contractive in the latent space, preventing divergent context statesch\+1c\_\{h\+1\}\.
### 4\.2Propositions and Theorems
###### Proposition 1\(Endpoint Error Bound\)\.
Letz\(1\)z\(1\)be the flow endpoint andy\(1\)y\(1\)be the expert target\. If the velocity field approximation error satisfies‖vϕ−u∗‖≤δ\\\|v\_\{\\phi\}\-u^\{\*\}\\\|\\leq\\delta, then the probability of incorrect discrete tool decoding is strictly bounded by the ratio of the flow integration error to the decoding marginΔdec\\Delta\_\{dec\}defined in Assumption[2](https://arxiv.org/html/2605.07339#Thmassumption2)\.
###### Theorem 1\(Plan Utility Convergence\)\.
Under Assumptions[1](https://arxiv.org/html/2605.07339#Thmassumption1)through[4](https://arxiv.org/html/2605.07339#Thmassumption4), minimizingℒFM\\mathcal\{L\}\_\{FM\}andℒdec\\mathcal\{L\}\_\{dec\}ensures the generated plan utility converges to the oracle utility\. The utility gap is bounded by:
\|U\(Ph∗;ch\)−U\(Ph;ch\)\|≤L⋅‖y\(s\)−z\(s\)‖2\+κdecϵ\+κenv𝔼\[‖o−o^‖\],\|U\(P\_\{h\}^\{\*\};c\_\{h\}\)\-U\(P\_\{h\};c\_\{h\}\)\|\\leq L\\cdot\\\|y\(s\)\-z\(s\)\\\|\_\{2\}\+\\kappa\_\{dec\}\\epsilon\+\\kappa\_\{env\}\\mathbb\{E\}\[\\\|o\-\\hat\{o\}\\\|\],\(18\)whereLLis the Lipschitz constant,κdec,κenv\>0\\kappa\_\{dec\},\\kappa\_\{env\}\>0are bounded constants determined by the decoder and environment dynamics, ando^\\hat\{o\}represents the perturbed observation\.
###### Theorem 2\(Unseen Tool Generalization\)\.
The expected generalization error for an unseen toolsetTunseenT\_\{unseen\}is bounded by:
𝔼\[Errunseen\]≤𝒞⋅\(δshift\+ϵcover\),\\mathbb\{E\}\[\\text\{Err\}\_\{unseen\}\]\\leq\\mathcal\{C\}\\cdot\(\\delta\_\{shift\}\+\\epsilon\_\{cover\}\),\(19\)where𝒞\>0\\mathcal\{C\}\>0is a manifold\-dependent constant,δshift\\delta\_\{shift\}denotes the semantic shift of the tool manifold andϵcover\\epsilon\_\{cover\}is the covering radius of the training tool embeddings\.
###### Proposition 2\(Closed\-loop Error Contraction\)\.
LetEclosedE\_\{\\mathrm\{closed\}\}denote the cumulative closed\-loop planning error over a reasoning chain, and letEopenE\_\{\\mathrm\{open\}\}denote the cumulative open\-loop error\-accumulation envelope induced by the same sequence of local phase errors\. If the state update mechanism satisfies the local contraction condition in Assumption[4](https://arxiv.org/html/2605.07339#Thmassumption4)with ratioρ<1\\rho<1, thenEclosed≤EopenE\_\{\\mathrm\{closed\}\}\\leq E\_\{\\mathrm\{open\}\}\. Moreover, the inequality is strict over subsequent phases whenever a nonzero local error has already entered the context state\.
## 5Experiments
### 5\.1Benchmark and Experimental Setup
Plan\-level Closed\-Loop Benchmark\.We build a unified tool\-use benchmark from four public sources:τ2\\tau^\{2\}\-bench\[[40](https://arxiv.org/html/2605.07339#bib.bib40)\],ToolBench\[[41](https://arxiv.org/html/2605.07339#bib.bib41)\],API\-Bank\[[42](https://arxiv.org/html/2605.07339#bib.bib42)\], andGTA\[[43](https://arxiv.org/html/2605.07339#bib.bib43)\]\. The benchmark standardizes tool schemas, task metadata, gold tool workflows, and train/dev/test splits\. For executable evaluation, we focus onτ2\\tau^\{2\}\-retail, where each prediction can be replayed against real domain tools, initial states, policies, and databases\. More detailed descriptions of the dataset construction and execution configurations are provided in Appendix[B\.1](https://arxiv.org/html/2605.07339#A2.SS1)\.
Baselines\.We conduct a comprehensive comparison of FlowAgent with several baseline methods, including Direct\-LLM, Standard SFT, RAG Planning, and ToolRL\[[11](https://arxiv.org/html/2605.07339#bib.bib11)\]\. The detailed introduction to the above baselines is presented in Appendix[B\.2](https://arxiv.org/html/2605.07339#A2.SS2)\.
Metrics\.To holistically evaluate the global planning capabilities and execution robustness, we employ a multi\-dimensional metric suite, including Overall Success, Retail Success, Tool EM, Retail Tool EM, Pred Exec, and Arg Value EM\. The detailed formulations for all evaluation metrics are provided in Appendix[B\.3](https://arxiv.org/html/2605.07339#A2.SS3)\.
### 5\.2Experimental Results
Table 1:Main results on our proposed plan\-level benchmark\. All models are evaluated under a strict forward\-execution regime\. Highlighted are the results rankedfirst,second, andthird\.ExecutorMethodsExecution SuccessPlanning AccuracyExecution & GroundingOverallRetailToolRetailPredArg ValueSuccess↑\\uparrowSuccess↑\\uparrowEM↑\\uparrowTool EM↑\\uparrowExec↑\\uparrowEM↑\\uparrowQwen2\.5\-7B\-InstructDirect\-LLM0\.12140\.22080\.12860\.23380\.94120\.4308Standard SFT0\.65710\.37660\.67140\.40260\.92680\.4387RAG Planning0\.52140\.49350\.52140\.49351\.00000\.3478ToolRL0\.47860\.50650\.49290\.53250\.96430\.5257FlowAgent \(Ours\)0\.76430\.57140\.77450\.58920\.96190\.5929Llama\-3\.2\-3B\-InstructDirect\-LLM0\.20000\.07790\.20710\.09090\.80600\.1225Standard SFT0\.62140\.31170\.62860\.32470\.93180\.4348RAG Planning0\.52860\.50650\.55000\.54550\.90910\.3241ToolRL0\.13570\.11690\.15000\.14290\.93620\.1028FlowAgent \(Ours\)0\.75710\.55840\.77140\.58440\.95240\.5573
Table 2:Ablation studies of proposed components on the Qwen2\.5\-7B executor\. This table illustrates the progressive integration of the Conditional Flow Planner, the Context State, and the Parameterized Stop Mechanism\. Additional ablation results can be found in Appendix[C](https://arxiv.org/html/2605.07339#A3)\.Flow PlannerCon\. StateStop Mech\.Overall Suc\.Retail Suc\.Tool EMRetail Tool EMPred ExecArg Value EM×\\times×\\times×\\times0\.65710\.37660\.67140\.40260\.92680\.4387✓×\\times×\\times0\.67860\.41560\.68570\.42860\.93810\.5099✓✓×\\times0\.73570\.51950\.74290\.5325\\cellcolorbestblue0\.96190\.5613✓✓✓\\cellcolorbestblue0\.7643\\cellcolorbestblue0\.5714\\cellcolorbestblue0\.7745\\cellcolorbestblue0\.5892\\cellcolorbestblue0\.9619\\cellcolorbestblue0\.5929
Main Results\.As shown in Table[1](https://arxiv.org/html/2605.07339#S5.T1), FlowAgent consistently outperforms all baselines across both executors\. Compared to the Standard SFT baseline lacking the continuous flow matching prior, our method improves the overall success rate on Qwen2\.5\-7B from 0\.6571 to 0\.7643\. While RAG Planning and ToolRL provide stronger guidance than direct prompting, they still fall short of FlowAgent, especially in the retail subset involving databases\. This performance gap indicates that our generative prior offers better state conditioning than simple retrieval hints or discrete policy optimization\. Finally, the consistent performance gains observed during the Llama\-3\.2\-3B evaluation validate FlowAgent as a generalized planning framework capable of bridging abstract reasoning and structured action execution in long\-horizon reasoning tasks\.
Ablation Studies\.To evaluate the contribution of individual methodology components, we conduct an ablation study on the Qwen model as presented in Table[2](https://arxiv.org/html/2605.07339#S5.T2)\. Starting from the standard SFT baseline, introducing the Conditional Flow Planner yields an initial increase in overall success from 0\.6571 to 0\.6786\. Integrating the Context State accounts for the major performance jump and elevates overall success to 0\.7357\. This demonstrates that latent trajectories must be explicitly grounded in updated observations to ensure accurate reasoning\. Finally, incorporating the Parameterized Stop Mechanism provides a targeted gain for database tasks\. This module estimates termination probability to prevent logical overgeneration and halts execution appropriately\. It raises retail success from 0\.5195 to 0\.5714 to complete the training objective while preserving execution safety\. Overall, the progressive performance improvement firmly demonstrates the complementary nature of these modules in long\-horizon reasoning tasks\.
Figure 3:Generalization performance on unseen tools\.Generalization Results\.To evaluate framework generalization, we assess planning accuracy on a strictly held out set of unseen tools as depicted in Figure[3](https://arxiv.org/html/2605.07339#S5.F3)\. FlowAgent achieves a planning accuracy of 78% on the Qwen2\.5\-7B executor and 76% on the Llama\-3\.2\-3B executor\. Conversely, the baseline methods experience a significant performance drop when encountering novel tool schemas\. On the Qwen2\.5\-7B architecture, RAG Planning and ToolRL only reach 60% and 58% accuracy respectively\. Similar declines occur on the Llama\-3\.2\-3B model where RAG Planning scores 55% and ToolRL scores 56%\. This degradation indicates that historical retrieval hints fail to align with novel environments and discrete policy optimization tends to overfit the training distribution\. Our results demonstrate that the continuous flow matching prior inside the proposed method FlowAgent learns a robust representation of action structures to enable reliable and robust tool orchestration\.
### 5\.3Additional Analysis and Discussion\.
Efficiency Analysis\.To evaluate computational efficiency, we compare the training overhead of FlowAgent against the reinforcement learning baseline ToolRL\. Table[3](https://arxiv.org/html/2605.07339#S5.T3)details the total duration and peak memory consumption across three GPUs\. FlowAgent requires only 12\.29 minutes to complete optimization, whereas ToolRL consumes 48\.75 minutes\. Furthermore, our proposed method significantly reduces the memory footprint\. The baseline method ToolRL suffers from severe memory bottlenecks on the primary GPU by reaching 78\.69 GiBs\.
Table 3:Computational efficiency comparison\. We report the total training time and the peak memory consumption across three distinct GPUs\.MethodTraining Time↓\\downarrowGPU 1 Peak↓\\downarrowGPU 2 Peak↓\\downarrowGPU 3 Peak↓\\downarrowAvg Peak↓\\downarrowToolRL48\.75 min78\.69G63\.22G63\.16G68\.36GFlowAgent\\cellcolorbestblue12\.29 min\\cellcolorbestblue52\.63G\\cellcolorbestblue59\.91G\\cellcolorbestblue52\.88G\\cellcolorbestblue55\.14G
Our framework mitigates this issue and maintains an average peak memory use of 55\.14 GiBs\. These efficiency improvements are directly attributable to the continuous\-flow design\. Direct regression on the latent trajectory avoids the massive simulation overhead required by discrete policy optimization\. Consequently, FlowAgent achieves superior planning capabilities while demanding fewer computational resources\.
Parameter Analysis\.To evaluate the robustness of FlowAgent under varying hyperparameter configurations, we conduct a parameter sensitivity analysis of decoder temperatureϵ\\epsilon\.
Table 4:Parameter sensitivity analysis of temperatureϵ\\epsilon\.TemperatureOverall Suc\.↑\\uparrowRetail Suc\.↑\\uparrowTool EM↑\\uparrowϵ=0\.01\\epsilon=0\.010\.69570\.51650\.7029ϵ=0\.05\\epsilon=0\.050\.73510\.54520\.7504ϵ=0\.10\\epsilon=0\.10\\cellcolorbestblue0\.7643\\cellcolorbestblue0\.5714\\cellcolorbestblue0\.7745ϵ=0\.20\\epsilon=0\.200\.72140\.53290\.7286ϵ=0\.50\\epsilon=0\.500\.67290\.49750\.6971
Table[4](https://arxiv.org/html/2605.07339#S5.T4)presents the experimental results on three metrics\. Based on the observations in the figure, we make several conclusions\. FlowAgent tends to exhibit suboptimal performance whenϵ\\epsilonis set to low values, e\.g\., 0\.01 and 0\.05\. The small values ofϵ\\epsilonresult in overly sharp decoding, which weakens the generalization ability of semantic neighborhoods\. Moreover, we can observe that excessively high values ofϵ\\epsilonalso introduce significant ambiguity in tool selection, reducing planning accuracy\. Finally, FlowAgent demonstrates relatively stable performance across a wide range ofϵ\\epsilonvalues, which proves its robustness\.
Figure 4:Convergence Speed\.Convergence Analysis\.In this study, we delve into the convergence speed analysis of FlowAgent with baseline method ToolRL on the Retail Success metric\. As depicted in Figure[4](https://arxiv.org/html/2605.07339#S5.F4), the proposed FlowAgent achieves rapid convergence within approximately 4 minutes and stabilizes at a higher Retail Success score\. In contrast, ToolRL requires a much longer optimization process and only approaches convergence after about 9 minutes, while still attaining a lower final performance\. This result indicates that FlowAgent is not only more effective in terms of final task success but also substantially more efficient during training\. Overall, the convergence analysis demonstrates that FlowAgent improves both performance and training efficiency, confirming the practical benefit of continuous flow based agentic planning\.
Table 5:Detailed analysis of retail decision phases\.MethodDecision CaseSuccess↑\\uparrowArg Value EM↑\\uparrowFlowAgentInitial Lookup0\.70000\.6833Detail Lookup0\.76920\.6923Database Operation\\cellcolorbestblue0\.3529\\cellcolorbestblue0\.4202\- w/o Stop Mech\.Initial Lookup0\.70000\.6833Detail Lookup0\.76920\.6923Database Operation0\.11760\.2878Oracle SelectionDatabase Operation0\.70590\.6190
Retail Decision Analysis\.The main evaluations reveal that database operations within the retail subset present the most severe reasoning challenge\. We analyze specific decision phases in Table[5](https://arxiv.org/html/2605.07339#S5.T5)\. The initial lookup phase involves retrieving basic order profiles and the detail lookup phase accesses specific item status, while database operation phase executes state modifying actions\. The complete FlowAgent yields identical results for the first two read phases compared to the ablated variant\. Incorporating stop mechanism effectively improves database operation success from 0\.1176 to 0\.3529\. The oracle tool selection result further shows that there remains a clear gap to the upper bound, indicating that state\-conditioned operation selection and argument grounding are still the primary bottlenecks in complex retail scenarios\.
Limitations and Future Work\.This work introduces FlowAgent to resolve discrete execution errors via continuous flow matching\. However, numerically integrating the latent velocity field requires multiple inference steps which inevitably introduces additional latency during the planning phase\. In future work, we plan to incorporate accelerated solvers to optimize the inference efficiency and extend this continuous paradigm to other complex domains including multimodal environments\.
## 6Conclusion
In this paper, we presentFlowAgent, a novel framework that reconceptualizes tools as continuous flow for evolving agentic reasoning\. We introduce the first plan\-level closed\-loop benchmark dedicated to agentic reasoning in dynamic environments\. FlowAgent leverages conditional flow matching to generate continuous trajectories and provides a global perspective to ensure coherent reasoning and robust tool execution\. Theoretically, we establish formal bounds on utility convergence and prove that our formulation fundamentally guarantees error attenuation\. Extensive empirical evaluations demonstrate that FlowAgent achieves superior adaptability in long horizon reasoning tasks\.
## References
- Guo et al\. \[2025\]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, et al\.Deepseek\-r1: Incentivizing reasoning capability in llms via reinforcement learning\.*arXiv preprint arXiv:2501\.12948*, 2025\.
- Wölflein et al\. \[2025\]Georg Wölflein, Dyke Ferber, Daniel Truhn, Ognjen Arandjelovic, and Jakob Nikolas Kather\.Llm agents making agent tools\.In*Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pages 26092–26130, 2025\.
- Li \[2024\]Xinzhe Li\.A review of prominent paradigms for llm\-based agents: Tool use \(including rag\), planning, and feedback learning\.*arXiv preprint arXiv:2406\.05804*, 2024\.
- Shen \[2024\]Zhuocheng Shen\.Llm with tools: A survey\.*arXiv preprint arXiv:2409\.18807*, 2024\.
- Xu et al\. \[2025\]Weikai Xu, Chengrui Huang, Shen Gao, and Shuo Shang\.Llm\-based agents for tool learning: A survey: W\. xu et al\.*Data Science and Engineering*, pages 1–31, 2025\.
- Shen et al\. \[2024\]Weizhou Shen, Chenliang Li, Hongzhan Chen, Ming Yan, Xiaojun Quan, Hehong Chen, Ji Zhang, and Fei Huang\.Small llms are weak tool learners: A multi\-llm agent\.In*Proceedings of the 2024 conference on empirical methods in natural language processing*, pages 16658–16680, 2024\.
- Xiao et al\. \[2024\]Ruixuan Xiao, Wentao Ma, Ke Wang, Yuchuan Wu, Junbo Zhao, Haobo Wang, Fei Huang, and Yongbin Li\.Flowbench: Revisiting and benchmarking workflow\-guided planning for llm\-based agents\.In*Findings of the Association for Computational Linguistics: EMNLP 2024*, pages 10883–10900, 2024\.
- Xiong et al\. \[2025\]Yiming Xiong, Jian Wang, Bing Li, Yuhan Zhu, and Yuqi Zhao\.Self\-organizing agent network for llm\-based workflow automation\.*arXiv preprint arXiv:2508\.13732*, 2025\.
- Kulkarni \[2025\]Mandar Kulkarni\.Agent\-s: Llm agentic workflow to automate standard operating procedures\.*arXiv preprint arXiv:2503\.15520*, 2025\.
- Wang et al\. \[2025\]Weixuan Wang, Dongge Han, Daniel Madrigal Diaz, Jin Xu, Victor Rühle, and Saravan Rajmohan\.Odysseybench: Evaluating llm agents on long\-horizon complex office application workflows\.*arXiv preprint arXiv:2508\.09124*, 2025\.
- Qian et al\. \[2025\]Cheng Qian, Emre Can Acikgoz, Qi He, Hongru Wang, Xiusi Chen, Dilek Hakkani\-Tür, Gokhan Tur, and Heng Ji\.Toolrl: Reward is all tool learning needs\.*arXiv preprint arXiv:2504\.13958*, 2025\.
- Chen et al\. \[2025a\]Junjie Chen, Haitao Li, Jingli Yang, Yiqun Liu, and Qingyao Ai\.Enhancing llm\-based agents via global planning and hierarchical execution\.*arXiv preprint arXiv:2504\.16563*, 2025a\.
- Belle et al\. \[2025\]Nikolas Belle, Dakota Barnes, Alfonso Amayuelas, Ivan Bercovich, Xin Eric Wang, and William Wang\.Agents of change: Self\-evolving llm agents for strategic planning\.*arXiv preprint arXiv:2506\.04651*, 2025\.
- Zeng et al\. \[2025\]Guancheng Zeng, Xueyi Chen, Jiawang Hu, Shaohua Qi, Yaxuan Mao, Zhantao Wang, Yifan Nie, Shuang Li, Qiuyang Feng, Pengxu Qiu, et al\.Routine: A structural planning framework for llm agent system in enterprise\.*arXiv preprint arXiv:2507\.14447*, 2025\.
- Feng et al\. \[2024\]Peiyuan Feng, Yichen He, Guanhua Huang, Yuan Lin, Hanchong Zhang, Yuchen Zhang, and Hang Li\.Agile: A novel reinforcement learning framework of llm agents\.*Advances in Neural Information Processing Systems*, 37:5244–5284, 2024\.
- Cheng et al\. \[2025\]Mingyue Cheng, Jie Ouyang, Shuo Yu, Ruiran Yan, Yucong Luo, Zirui Liu, Daoyu Wang, Qi Liu, and Enhong Chen\.Agent\-r1: Training powerful llm agents with end\-to\-end reinforcement learning\.*arXiv preprint arXiv:2511\.14460*, 2025\.
- Debenedetti et al\. \[2024\]Edoardo Debenedetti, Jie Zhang, Mislav Balunovic, Luca Beurer\-Kellner, Marc Fischer, and Florian Tramèr\.Agentdojo: A dynamic environment to evaluate prompt injection attacks and defenses for llm agents\.*Advances in Neural Information Processing Systems*, 37:82895–82920, 2024\.
- Yuan et al\. \[2025\]Siyu Yuan, Kaitao Song, Jiangjie Chen, Xu Tan, Yongliang Shen, Kan Ren, Dongsheng Li, and Deqing Yang\.Easytool: Enhancing llm\-based agents with concise tool instruction\.In*Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies \(Volume 1: Long Papers\)*, pages 951–972, 2025\.
- Chen et al\. \[2026\]Shiqi Chen, Jingze Gai, Ruochen Zhou, Jinghan Zhang, Tongyao Zhu, Junlong Li, Kangrui Wang, Zihan Wang, Zhengyu Chen, Klara Kaleb, et al\.Skillcraft: Can llm agents learn to use tools skillfully?*arXiv preprint arXiv:2603\.00718*, 2026\.
- Mohammadi et al\. \[2025\]Mahmoud Mohammadi, Yipeng Li, Jane Lo, and Wendy Yip\.Evaluation and benchmarking of llm agents: A survey\.In*Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V\. 2*, pages 6129–6139, 2025\.
- Sudarsan et al\. \[2026\]Shalini Sudarsan, Advait Patel, Charit Upadhyay, Vaishnavi Gudur, and Prashanthi Matam\.Secure prompt engineering patterns for cloud llm agents\.In*2026 IEEE 5th International Conference on AI in Cybersecurity \(ICAIC\)*, pages 1–6\. IEEE, 2026\.
- Kalian et al\. \[2025\]Alexander D Kalian, Jaewook Lee, Stefan P Johannesson, Lennart Otte, Christer Hogstrand, and Miao Guo\.Fine\-tuning and prompt engineering of llms, for the creation of multi\-agent ai for addressing sustainable protein production challenges\.*arXiv preprint arXiv:2506\.20598*, 2025\.
- Hadida et al\. \[2026\]Nathaniel Mitrani Hadida, Sassan Bhanji, Cameron Tice, and Puria Radmard\.Chain\-of\-thought obfuscation learned from output supervision can generalise to unseen tasks\.*arXiv preprint arXiv:2601\.23086*, 2026\.
- Chen et al\. \[2025b\]Mingyu Chen, Jingkai Lin, Zhaojie Chu, Xiaofen Xing, Yirong Chen, and Xiangmin Xu\.Catch: A novel data synthesis framework for high therapy fidelity and memory\-driven planning chain of thought in ai counseling\.*arXiv preprint arXiv:2509\.25733*, 2025b\.
- Ferrag et al\. \[2025\]Mohamed Amine Ferrag, Norbert Tihanyi, and Merouane Debbah\.From llm reasoning to autonomous ai agents: A comprehensive review\.*arXiv preprint arXiv:2504\.19678*, 2025\.
- Wei et al\. \[2025\]Yifan Wei, Xiaoyan Yu, Yixuan Weng, Tengfei Pan, Angsheng Li, and Li Du\.Autotir: Autonomous tools integrated reasoning via reinforcement learning\.*arXiv preprint arXiv:2507\.21836*, 2025\.
- Guo et al\. \[2026a\]Xiaojie Guo, Yang Zhang, Bing Zhang, Ryo Kawahara, Mikio Takeuchi, and Yada Zhu\.Unitoolbench: A benchmark for tool\-augmented llms in cross\-domain, universal task automation\.In*Findings of the Association for Computational Linguistics: EACL 2026*, pages 4726–4736, 2026a\.
- Li et al\. \[2025\]Zhuofeng Li, Haoxiang Zhang, Seungju Han, Sheng Liu, Jianwen Xie, Yu Zhang, Yejin Choi, James Zou, and Pan Lu\.In\-the\-flow agentic system optimization for effective planning and tool use\.*arXiv preprint arXiv:2510\.05592*, 2025\.
- Shi et al\. \[2025\]Yuchen Shi, Siqi Cai, Zihan Xu, Yuei Qin, Gang Li, Hang Shao, Jiawei Chen, Deqing Yang, Ke Li, and Xing Sun\.Flowagent: Achieving compliance and flexibility for workflow agents\.*arXiv preprint arXiv:2502\.14345*, 2025\.
- Yang et al\. \[2025\]Wei Yang, Jinwei Xiao, Hongming Zhang, Qingyang Zhang, Yanna Wang, and Bo Xu\.Coarse\-to\-fine grounded memory for llm agent planning\.*arXiv preprint arXiv:2508\.15305*, 2025\.
- Li et al\. \[2026\]Xiaoxi Li, Wenxiang Jiao, Jiarui Jin, Guanting Dong, Jiajie Jin, Yinuo Wang, Hao Wang, Yutao Zhu, Ji\-Rong Wen, Yuan Lu, et al\.Deepagent: A general reasoning agent with scalable toolsets\.In*Proceedings of the ACM Web Conference 2026*, pages 2219–2230, 2026\.
- Huan et al\. \[2025\]Chengying Huan, Ziheng Meng, Yongchao Liu, Zhengyi Yang, Yun Zhu, Yue Yun, Shipeng Li, Rong Gu, Xiabao Wu, Haitao Zhang, et al\.Scaling graph chain\-of\-thought reasoning: A multi\-agent framework with efficient llm serving\.*arXiv preprint arXiv:2511\.01633*, 2025\.
- Li \[2025\]Xiang Li\.Task planning and decision\-making methods for intelligent agents based on large language models\.In*Proceedings of the 4th International Conference on Artificial Intelligence and Intelligent Information Processing*, pages 817–822, 2025\.
- Lee et al\. \[2025\]Jiho Lee, Hayun Lee, Jonghyeon Kim, Kyungjae Lee, and Eunwoo Kim\.Self\-corrective task planning by inverse prompting with large language models\.In*2025 IEEE International Conference on Robotics and Automation \(ICRA\)*, pages 11017–11023\. IEEE, 2025\.
- Guo et al\. \[2026b\]Yihong Guo, Dongqiangzi Ye, Sijia Chen, Anqi Liu, and Xianming Liu\.Correctionplanner: Self\-correction planner with reinforcement learning in autonomous driving\.*arXiv preprint arXiv:2603\.15771*, 2026b\.
- Shang et al\. \[2024\]Yu Shang, Yu Li, Keyu Zhao, Likai Ma, Jiahe Liu, Fengli Xu, and Yong Li\.Agentsquare: Automatic llm agent search in modular design space\.*arXiv preprint arXiv:2410\.06153*, 2024\.
- Zhou et al\. \[2026\]Caishen Zhou, Yihong Tang, Kehai Chen, Xuefeng Bai, Shuhan Qi, Li Shen, and Min Zhang\.From fragmentation to systematic design: Architecting llm\-based multi\-agent systems\.*Authorea Preprints*, 2026\.
- Wang et al\. \[2023\]Guanzhi Wang, Yuqi Xie, Yunfan Jiang, Ajay Mandlekar, Chaowei Xiao, Yuke Zhu, Linxi Fan, and Anima Anandkumar\.Voyager: An open\-ended embodied agent with large language models\.*arXiv preprint arXiv:2305\.16291*, 2023\.
- Hu et al\. \[2025\]Mengkang Hu, Pu Zhao, Can Xu, Qingfeng Sun, Jian\-Guang Lou, Qingwei Lin, Ping Luo, and Saravan Rajmohan\.Agentgen: Enhancing planning abilities for large language model based agent via environment and task generation\.In*Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V\. 1*, pages 496–507, 2025\.
- Barres et al\. \[2025\]Victor Barres, Honghua Dong, Soham Ray, Xujie Si, and Karthik Narasimhan\.τ2\\tau^\{2\}\-bench: Evaluating conversational agents in a dual\-control environment\.*arXiv preprint arXiv:2506\.07982*, 2025\.
- Chittepu et al\. \[2025\]Yaswanth Chittepu, Raghavendra Addanki, Tung Mai, Anup Rao, and Branislav Kveton\.Ml\-tool\-bench: Tool\-augmented planning for ml tasks\.*arXiv preprint arXiv:2512\.00672*, 2025\.
- Li et al\. \[2023\]Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, and Yongbin Li\.Api\-bank: A comprehensive benchmark for tool\-augmented llms\.In*Proceedings of the 2023 conference on empirical methods in natural language processing*, pages 3102–3116, 2023\.
- Wang et al\. \[2024\]Jize Wang, Zerun Ma, Yining Li, Songyang Zhang, Cailian Chen, Kai Chen, and Xinyi Le\.Gta: a benchmark for general tool agents\.*Advances in Neural Information Processing Systems*, 37:75749–75790, 2024\.
Appendix Contents:
- •[A](https://arxiv.org/html/2605.07339#A1)Proofs
- •[B](https://arxiv.org/html/2605.07339#A2)Experimental Details
- •[C](https://arxiv.org/html/2605.07339#A3)Additional Experiments
- •[D](https://arxiv.org/html/2605.07339#A4)Broader Impact
## Appendix AProofs
This appendix provides the complete proofs for the theoretical results stated in Section[4](https://arxiv.org/html/2605.07339#S4)\. All notation follows the main text\. In particular, at phasehh, the context state isch=\(x,τ<h,𝒯h\)c\_\{h\}=\(x,\\tau\_\{<h\},\\mathcal\{T\}\_\{h\}\), the latent plan isPh=\(zh\(1\),…,zh\(Lh\)\)P\_\{h\}=\(z\_\{h\}^\{\(1\)\},\\ldots,z\_\{h\}^\{\(L\_\{h\}\)\}\), the expert latent path isy\(s\)y\(s\), the decoder ispϕ\(t∣z,𝒯h\)p\_\{\\phi\}\(t\\mid z,\\mathcal\{T\}\_\{h\}\), and the plan utility isU\(P;ch\)U\(P;c\_\{h\}\)\. As in the main text, the argument pattern disambiguates the two uses ofUU:U\(P;ch\)U\(P;c\_\{h\}\)denotes plan utility, whileU\(ch,t^h,oh\)U\(c\_\{h\},\\hat\{t\}\_\{h\},o\_\{h\}\)denotes the deterministic context\-state update\.
#### Auxiliary notation\.
For two phase\-hhlatent plansP=\(z\(1\),…,z\(Lh\)\)P=\(z^\{\(1\)\},\\ldots,z^\{\(L\_\{h\}\)\}\)andP′=\(z′\(1\),…,z′\(Lh\)\)P^\{\\prime\}=\(z^\{\\prime\(1\)\},\\ldots,z^\{\\prime\(L\_\{h\}\)\}\), we use the plan metric:
‖P−P′‖2:=∑l=1Lh‖z\(l\)−z′\(l\)‖2,\\\|P\-P^\{\\prime\}\\\|\_\{2\}:=\\sum\_\{l=1\}^\{L\_\{h\}\}\\\|z^\{\(l\)\}\-z^\{\\prime\(l\)\}\\\|\_\{2\},\(20\)which is the metric appearing in Assumption[3](https://arxiv.org/html/2605.07339#Thmassumption3)\. When Eq\. \([18](https://arxiv.org/html/2605.07339#S4.E18)\) writes‖y\(s\)−z\(s\)‖2\\\|y\(s\)\-z\(s\)\\\|\_\{2\}, it refers to the same anchor\-grid discrepancy, namely
‖y\(s\)−z\(s\)‖2:=∑l=1Lh‖y\(sl\)−z\(sl\)‖2,sl:=l−1Lh−1\.\\\|y\(s\)\-z\(s\)\\\|\_\{2\}:=\\sum\_\{l=1\}^\{L\_\{h\}\}\\\|y\(s\_\{l\}\)\-z\(s\_\{l\}\)\\\|\_\{2\},\\qquad s\_\{l\}:=\\frac\{l\-1\}\{L\_\{h\}\-1\}\.\(21\)The oracle phase\-hhlatent plan is thereforePh∗:=\(y\(s1\),…,y\(sLh\)\)P\_\{h\}^\{\*\}:=\(y\(s\_\{1\}\),\\ldots,y\(s\_\{L\_\{h\}\}\)\)\. For a phase\-hhtoolset, defineDh:=maxt,t′∈𝒯h‖et−et′‖2<∞D\_\{h\}:=\\max\_\{t,t^\{\\prime\}\\in\\mathcal\{T\}\_\{h\}\}\\\|e\_\{t\}\-e\_\{t^\{\\prime\}\}\\\|\_\{2\}<\\inftyandNh:=\|𝒯h\|<∞N\_\{h\}:=\|\\mathcal\{T\}\_\{h\}\|<\\infty\. All constants below are local to the finite horizon and the compact subset of the semantic manifold visited by the training and test tool embeddings\.
### A\.1Proof of Proposition 1
#### Proposition 1 \(Endpoint Error Bound\)\.
Letz\(1\)z\(1\)be the flow endpoint and lety\(1\)y\(1\)be the expert target anchor associated with the correct toolt∗t^\{\*\}\. Letz∗\(s\)z^\{\*\}\(s\)denote the exact teacher trajectory induced byu∗\(⋅,s∣y\(s\)\)u^\{\*\}\(\\cdot,s\\mid y\(s\)\)under the same initial prior sample as Eq\. \([6](https://arxiv.org/html/2605.07339#S3.E6)\), so thatz∗\(1\)=y\(1\)z^\{\*\}\(1\)=y\(1\)by construction of the conditional flow target\. Suppose that, on the compact region visited by the numerical solver,u∗\(⋅,s∣y\(s\)\)u^\{\*\}\(\\cdot,s\\mid y\(s\)\)isKuK\_\{u\}\-Lipschitz in its first argument and
∥vϕ\(z\(s\),s∣ch\)−u∗\(z\(s\),s∣y\(s\)\)∥2≤δ∀s∈\[0,1\]\.\\\|v\_\{\\phi\}\(z\(s\),s\\mid c\_\{h\}\)\-u^\{\*\}\(z\(s\),s\\mid y\(s\)\)\\\|\_\{2\}\\leq\\delta\\qquad\\forall s\\in\[0,1\]\.\(22\)Then the flow integration error
ηϕ:=𝔼‖z\(1\)−y\(1\)‖2\\eta\_\{\\phi\}:=\\mathbb\{E\}\\\|z\(1\)\-y\(1\)\\\|\_\{2\}\(23\)satisfiesηϕ≤Cflowδ\\eta\_\{\\phi\}\\leq C\_\{\\mathrm\{flow\}\}\\delta, whereCflow=\(eKu−1\)/KuC\_\{\\mathrm\{flow\}\}=\(e^\{K\_\{u\}\}\-1\)/K\_\{u\}ifKu\>0K\_\{u\}\>0andCflow=1C\_\{\\mathrm\{flow\}\}=1ifKu=0K\_\{u\}=0\. Consequently, for the MAP decoder induced by Eq\. \([2](https://arxiv.org/html/2605.07339#S3.E2)\):
ℙ\{t^MAP≠t∗\}≤min\{1,2ηϕΔdec\}≤min\{1,2CflowδΔdec\}\.\\mathbb\{P\}\\\{\\hat\{t\}\_\{\\mathrm\{MAP\}\}\\neq t^\{\*\}\\\}\\leq\\min\\left\\\{1,\\frac\{2\\eta\_\{\\phi\}\}\{\\Delta\_\{\\mathrm\{dec\}\}\}\\right\\\}\\leq\\min\\left\\\{1,\\frac\{2C\_\{\\mathrm\{flow\}\}\\delta\}\{\\Delta\_\{\\mathrm\{dec\}\}\}\\right\\\}\.\(24\)Thus the decoding error is controlled by the ratio between the flow integration error and the decoding margin\.
Proof\.Lete\(s\):=‖z\(s\)−z∗\(s\)‖2e\(s\):=\\\|z\(s\)\-z^\{\*\}\(s\)\\\|\_\{2\}\. Sincez\(0\)z\(0\)andz∗\(0\)z^\{\*\}\(0\)use the same prior sample,e\(0\)=0e\(0\)=0\. The ODEs forz\(s\)z\(s\)andz∗\(s\)z^\{\*\}\(s\)give
ddse\(s\)\\displaystyle\\frac\{d\}\{ds\}e\(s\)≤∥vϕ\(z\(s\),s∣ch\)−u∗\(z∗\(s\),s∣y\(s\)\)∥2\\displaystyle\\leq\\\|v\_\{\\phi\}\(z\(s\),s\\mid c\_\{h\}\)\-u^\{\*\}\(z^\{\*\}\(s\),s\\mid y\(s\)\)\\\|\_\{2\}\(25\)≤∥vϕ\(z\(s\),s∣ch\)−u∗\(z\(s\),s∣y\(s\)\)∥2\+∥u∗\(z\(s\),s∣y\(s\)\)−u∗\(z∗\(s\),s∣y\(s\)\)∥2\\displaystyle\\leq\\\|v\_\{\\phi\}\(z\(s\),s\\mid c\_\{h\}\)\-u^\{\*\}\(z\(s\),s\\mid y\(s\)\)\\\|\_\{2\}\+\\\|u^\{\*\}\(z\(s\),s\\mid y\(s\)\)\-u^\{\*\}\(z^\{\*\}\(s\),s\\mid y\(s\)\)\\\|\_\{2\}\(26\)≤δ\+Kue\(s\)\.\\displaystyle\\leq\\delta\+K\_\{u\}e\(s\)\.\(27\)Gronwall’s inequality yields:
‖z\(1\)−y\(1\)‖2=‖z\(1\)−z∗\(1\)‖2≤Cflowδ\.\\\|z\(1\)\-y\(1\)\\\|\_\{2\}=\\\|z\(1\)\-z^\{\*\}\(1\)\\\|\_\{2\}\\leq C\_\{\\mathrm\{flow\}\}\\delta\.\(28\)Taking expectation givesηϕ≤Cflowδ\\eta\_\{\\phi\}\\leq C\_\{\\mathrm\{flow\}\}\\delta\.
It remains to connect endpoint error to discrete decoding\. By Assumption[2](https://arxiv.org/html/2605.07339#Thmassumption2), for everyt∈𝒯h∖\{t∗\}t\\in\\mathcal\{T\}\_\{h\}\\setminus\\\{t^\{\*\}\\\}
‖y\(1\)−et∗‖2≤‖y\(1\)−et‖2−Δdec\.\\\|y\(1\)\-e\_\{t^\{\*\}\}\\\|\_\{2\}\\leq\\\|y\(1\)\-e\_\{t\}\\\|\_\{2\}\-\\Delta\_\{\\mathrm\{dec\}\}\.\(29\)Letr:=‖z\(1\)−y\(1\)‖2r:=\\\|z\(1\)\-y\(1\)\\\|\_\{2\}\. The triangle inequality gives
‖z\(1\)−et∗‖2\\displaystyle\\\|z\(1\)\-e\_\{t^\{\*\}\}\\\|\_\{2\}≤‖y\(1\)−et∗‖2\+r\\displaystyle\\leq\\\|y\(1\)\-e\_\{t^\{\*\}\}\\\|\_\{2\}\+r\(30\)≤‖y\(1\)−et‖2−Δdec\+r\\displaystyle\\leq\\\|y\(1\)\-e\_\{t\}\\\|\_\{2\}\-\\Delta\_\{\\mathrm\{dec\}\}\+r\(31\)≤‖z\(1\)−et‖2−Δdec\+2r\.\\displaystyle\\leq\\\|z\(1\)\-e\_\{t\}\\\|\_\{2\}\-\\Delta\_\{\\mathrm\{dec\}\}\+2r\.\(32\)Therefore, wheneverr<Δdec/2r<\\Delta\_\{\\mathrm\{dec\}\}/2, the correct toolt∗t^\{\*\}remains the unique nearest neighbor ofz\(1\)z\(1\)and the MAP decoder cannot make an error\. Hence
\{t^MAP≠t∗\}⊆\{‖z\(1\)−y\(1\)‖2≥Δdec/2\}\.\\\{\\hat\{t\}\_\{\\mathrm\{MAP\}\}\\neq t^\{\*\}\\\}\\subseteq\\\{\\\|z\(1\)\-y\(1\)\\\|\_\{2\}\\geq\\Delta\_\{\\mathrm\{dec\}\}/2\\\}\.\(33\)Applying Markov’s inequality yields:
ℙ\{t^MAP≠t∗\}≤2𝔼‖z\(1\)−y\(1\)‖2Δdec≤2CflowδΔdec,\\mathbb\{P\}\\\{\\hat\{t\}\_\{\\mathrm\{MAP\}\}\\neq t^\{\*\}\\\}\\leq\\frac\{2\\mathbb\{E\}\\\|z\(1\)\-y\(1\)\\\|\_\{2\}\}\{\\Delta\_\{\\mathrm\{dec\}\}\}\\leq\\frac\{2C\_\{\\mathrm\{flow\}\}\\delta\}\{\\Delta\_\{\\mathrm\{dec\}\}\},\(34\)and clipping by11gives Eq\. \([24](https://arxiv.org/html/2605.07339#A1.E24)\)\.□\\square
#### Remark on stochastic decoding\.
Eq\. \([10](https://arxiv.org/html/2605.07339#S3.E10)\) samples from the softmax decoder\. Proposition 1 isolates the geometric error of the continuous endpoint and therefore uses the induced MAP decoder\. The additional stochastic error introduced by the finite temperatureϵ\\epsilonis bounded in the proof of Theorem 1 and appears as theκdecϵ\\kappa\_\{\\mathrm\{dec\}\}\\epsilonterm in Eq\. \([18](https://arxiv.org/html/2605.07339#S4.E18)\)\.
### A\.2Proof of Theorem 1
#### Theorem 1 \(Plan Utility Convergence\)\.
Under Assumptions[1](https://arxiv.org/html/2605.07339#Thmassumption1)–[4](https://arxiv.org/html/2605.07339#Thmassumption4), minimizingℒFM\\mathcal\{L\}\_\{\\mathrm\{FM\}\}andℒdec\\mathcal\{L\}\_\{\\mathrm\{dec\}\}ensures that the generated plan utility converges to the oracle utility\. More precisely, for the oracle planPh∗P\_\{h\}^\{\*\}and the generated planPhP\_\{h\}:
\|U\(Ph∗;ch\)−U\(Ph;ch\)\|≤L⋅‖y\(s\)−z\(s\)‖2\+κdecϵ\+κenv𝔼\[‖o−o^‖2\],\|U\(P\_\{h\}^\{\*\};c\_\{h\}\)\-U\(P\_\{h\};c\_\{h\}\)\|\\leq L\\cdot\\\|y\(s\)\-z\(s\)\\\|\_\{2\}\+\\kappa\_\{\\mathrm\{dec\}\}\\epsilon\+\\kappa\_\{\\mathrm\{env\}\}\\mathbb\{E\}\[\\\|o\-\\hat\{o\}\\\|\_\{2\}\],\(35\)whereLLis the Lipschitz constant in Assumption[3](https://arxiv.org/html/2605.07339#Thmassumption3)andκdec,κenv\>0\\kappa\_\{\\mathrm\{dec\}\},\\kappa\_\{\\mathrm\{env\}\}\>0are finite constants induced by the decoder and environment dynamics\.
Proof\.The proof decomposes the utility gap into three terms: continuous latent\-plan error, finite\-temperature decoding error, and observation\-induced environment error\.
#### Step 1: continuous path imitation controls the latent plan discrepancy\.
For each anchor timesls\_\{l\}, letzl∗\(s\)z\_\{l\}^\{\*\}\(s\)be the exact teacher trajectory induced byu∗\(⋅,s∣y\(s\)\)u^\{\*\}\(\\cdot,s\\mid y\(s\)\)under the same initial prior sample and satisfyingzl∗\(sl\)=y\(sl\)z\_\{l\}^\{\*\}\(s\_\{l\}\)=y\(s\_\{l\}\)\. Define
ηh:=∫01∥vϕ\(z\(s\),s∣ch\)−u∗\(z\(s\),s∣y\(s\)\)∥2ds\.\\eta\_\{h\}:=\\int\_\{0\}^\{1\}\\\|v\_\{\\phi\}\(z\(s\),s\\mid c\_\{h\}\)\-u^\{\*\}\(z\(s\),s\\mid y\(s\)\)\\\|\_\{2\}\\,ds\.\(36\)The same Gronwall argument as in Eq\. \([28](https://arxiv.org/html/2605.07339#A1.E28)\) gives
‖z\(sl\)−y\(sl\)‖2≤Cflowηh,l=1,…,Lh,\\\|z\(s\_\{l\}\)\-y\(s\_\{l\}\)\\\|\_\{2\}\\leq C\_\{\\mathrm\{flow\}\}\\eta\_\{h\},\\qquad l=1,\\ldots,L\_\{h\},\(37\)whereCflowC\_\{\\mathrm\{flow\}\}is the ODE\-stability constant from Proposition 1\. Furthermore, by Cauchy–Schwarz and the uniform sampling ofs∈\[0,1\]s\\in\[0,1\]inℒFM\\mathcal\{L\}\_\{\\mathrm\{FM\}\},
𝔼\[ηh\]≤\(𝔼s,z\(s\)∥vϕ\(z\(s\),s∣ch\)−u∗\(z\(s\),s∣y\(s\)\)∥22\)1/2=ℒFM1/2\.\\mathbb\{E\}\[\\eta\_\{h\}\]\\leq\\left\(\\mathbb\{E\}\_\{s,z\(s\)\}\\\|v\_\{\\phi\}\(z\(s\),s\\mid c\_\{h\}\)\-u^\{\*\}\(z\(s\),s\\mid y\(s\)\)\\\|\_\{2\}^\{2\}\\right\)^\{1/2\}=\\mathcal\{L\}\_\{\\mathrm\{FM\}\}^\{1/2\}\.\(38\)Thus minimizingℒFM\\mathcal\{L\}\_\{\\mathrm\{FM\}\}drives the anchor\-grid discrepancy‖y\(s\)−z\(s\)‖2\\\|y\(s\)\-z\(s\)\\\|\_\{2\}to zero\.
By Assumption 3 and the definition ofPh∗P\_\{h\}^\{\*\},
\|U\(Ph∗;ch\)−U\(Ph;ch\)\|≤L∑l=1Lh‖y\(sl\)−z\(sl\)‖2=L⋅‖y\(s\)−z\(s\)‖2,\|U\(P\_\{h\}^\{\*\};c\_\{h\}\)\-U\(P\_\{h\};c\_\{h\}\)\|\\leq L\\sum\_\{l=1\}^\{L\_\{h\}\}\\\|y\(s\_\{l\}\)\-z\(s\_\{l\}\)\\\|\_\{2\}=L\\cdot\\\|y\(s\)\-z\(s\)\\\|\_\{2\},\(39\)whenever the comparison is made before stochastic decoding and under the same observation context\. This proves the first term of Eq\. \([35](https://arxiv.org/html/2605.07339#A1.E35)\)\.
#### Step 2: discrete decoding contributes only a finite\-temperature perturbation\.
For the anchorzh\(l\)z^\{\(l\)\}\_\{h\}, lettl∗t\_\{l\}^\{\*\}denote the ground\-truth tool and define the squared\-distance softmax gap:
Gl\(zh\(l\)\):=mint∈𝒯h∖\{tl∗\}\(‖zh\(l\)−et‖22−‖zh\(l\)−etl∗‖22\)\.G\_\{l\}\(z\_\{h\}^\{\(l\)\}\):=\\min\_\{t\\in\\mathcal\{T\}\_\{h\}\\setminus\\\{t\_\{l\}^\{\*\}\\\}\}\\left\(\\\|z\_\{h\}^\{\(l\)\}\-e\_\{t\}\\\|\_\{2\}^\{2\}\-\\\|z\_\{h\}^\{\(l\)\}\-e\_\{t\_\{l\}^\{\*\}\}\\\|\_\{2\}^\{2\}\\right\)\.\(40\)Assumption[2](https://arxiv.org/html/2605.07339#Thmassumption2)implies a positive Euclidean margin at the expert anchor\. SinceℒFM\\mathcal\{L\}\_\{\\mathrm\{FM\}\}driveszh\(l\)z\_\{h\}^\{\(l\)\}towardy\(sl\)y\(s\_\{l\}\)andℒdec\\mathcal\{L\}\_\{\\mathrm\{dec\}\}is classification\-calibrated, the trained decoder preserves a positive local squared\-distance gap on the anchor neighborhood\. Denote its minimum bygl\>0g\_\{l\}\>0\. Then Eq\. \([2](https://arxiv.org/html/2605.07339#S3.E2)\) gives
ℙϵ\{t^h\(l\)≠tl∗∣zh\(l\)\}\\displaystyle\\mathbb\{P\}\_\{\\epsilon\}\\\{\\hat\{t\}\_\{h\}^\{\(l\)\}\\neq t\_\{l\}^\{\*\}\\mid z\_\{h\}^\{\(l\)\}\\\}=∑t≠tl∗pϕ\(t∣zh\(l\),𝒯h\)\\displaystyle=\\sum\_\{t\\neq t\_\{l\}^\{\*\}\}p\_\{\\phi\}\(t\\mid z\_\{h\}^\{\(l\)\},\\mathcal\{T\}\_\{h\}\)\(41\)≤\(Nh−1\)exp\(−gl/ϵ\)\.\\displaystyle\\leq\(N\_\{h\}\-1\)\\exp\(\-g\_\{l\}/\\epsilon\)\.\(42\)For any fixedgl\>0g\_\{l\}\>0,exp\(−gl/ϵ\)≤ϵ/gl\\exp\(\-g\_\{l\}/\\epsilon\)\\leq\\epsilon/g\_\{l\}for allϵ\>0\\epsilon\>0\. Hence
ℙϵ\{t^h\(l\)≠tl∗∣zh\(l\)\}≤\(Nh−1\)ϵgl\.\\mathbb\{P\}\_\{\\epsilon\}\\\{\\hat\{t\}\_\{h\}^\{\(l\)\}\\neq t\_\{l\}^\{\*\}\\mid z\_\{h\}^\{\(l\)\}\\\}\\leq\\frac\{\(N\_\{h\}\-1\)\\epsilon\}\{g\_\{l\}\}\.\(43\)Because the horizonLhL\_\{h\}is finite and the utility in Eq\. \([3](https://arxiv.org/html/2605.07339#S3.E3)\) is bounded over finite tool sequences, there existsBU<∞B\_\{U\}<\\inftysuch that changing one decoded tool can change the utility by at mostBUB\_\{U\}\. Therefore the total finite\-temperature perturbation is bounded by
\|𝔼ϵ\[U\(Ph;ch\)\]−U\(Ph;ch\)\|≤BU∑l=1Lh\(Nh−1\)ϵgl=κdecϵ,\\left\|\\mathbb\{E\}\_\{\\epsilon\}\[U\(P\_\{h\};c\_\{h\}\)\]\-U\(P\_\{h\};c\_\{h\}\)\\right\|\\leq B\_\{U\}\\sum\_\{l=1\}^\{L\_\{h\}\}\\frac\{\(N\_\{h\}\-1\)\\epsilon\}\{g\_\{l\}\}=\\kappa\_\{\\mathrm\{dec\}\}\\epsilon,\(44\)where
κdec:=BU\(Nh−1\)∑l=1Lhgl−1<∞\.\\kappa\_\{\\mathrm\{dec\}\}:=B\_\{U\}\(N\_\{h\}\-1\)\\sum\_\{l=1\}^\{L\_\{h\}\}g\_\{l\}^\{\-1\}<\\infty\.\(45\)The stop mechanism is handled identically becauseℒdec\\mathcal\{L\}\_\{\\mathrm\{dec\}\}contains the cross\-entropy termlogpϕ\(stop∗∣zh\(l\),ch\)\\log p\_\{\\phi\}\(\\operatorname\{stop\}^\{\*\}\\mid z\_\{h\}^\{\(l\)\},c\_\{h\}\); minimizing it drives the predicted stopping distribution to the ground\-truth stopping indicator and contributes to the same finite constantκdec\\kappa\_\{\\mathrm\{dec\}\}\.
#### Step 3: feedback stability controls observation perturbations\.
Letoobe the observation returned by the environment and leto^\\hat\{o\}be its perturbed or predicted counterpart\. Assumption[4](https://arxiv.org/html/2605.07339#Thmassumption4)states that the context update and observation encoder are contractive in the latent space\. Equivalently, for the context metric induced by the encoder, there are finite constantsρ∈\[0,1\)\\rho\\in\[0,1\)andβo\>0\\beta\_\{o\}\>0such that
dc\(U\(ch,t^h,o\),U\(ch,t^h,o^\)\)≤βo‖o−o^‖2\.d\_\{c\}\\\!\\big\(U\(c\_\{h\},\\hat\{t\}\_\{h\},o\),U\(c\_\{h\},\\hat\{t\}\_\{h\},\\hat\{o\}\)\\big\)\\leq\\beta\_\{o\}\\\|o\-\\hat\{o\}\\\|\_\{2\}\.\(46\)SinceU\(P;c\)U\(P;c\)is evaluated through the encoded context and the finite\-horizon execution trace, its context dependence is Lipschitz on the compact operational subset\. LetLcL\_\{c\}be this context Lipschitz constant\. Then
𝔼\[\|U\(Ph;U\(ch,t^h,o\)\)−U\(Ph;U\(ch,t^h,o^\)\)\|\]≤Lcβo𝔼\[‖o−o^‖2\]\.\\mathbb\{E\}\\left\[\|U\(P\_\{h\};U\(c\_\{h\},\\hat\{t\}\_\{h\},o\)\)\-U\(P\_\{h\};U\(c\_\{h\},\\hat\{t\}\_\{h\},\\hat\{o\}\)\)\|\\right\]\\leq L\_\{c\}\\beta\_\{o\}\\,\\mathbb\{E\}\[\\\|o\-\\hat\{o\}\\\|\_\{2\}\]\.\(47\)Settingκenv:=Lcβo\\kappa\_\{\\mathrm\{env\}\}:=L\_\{c\}\\beta\_\{o\}gives the third term of Eq\. \([35](https://arxiv.org/html/2605.07339#A1.E35)\)\.
Combining Eqs\. \([39](https://arxiv.org/html/2605.07339#A1.E39)\), \([44](https://arxiv.org/html/2605.07339#A1.E44)\), and \([47](https://arxiv.org/html/2605.07339#A1.E47)\) by the triangle inequality proves Eq\. \([35](https://arxiv.org/html/2605.07339#A1.E35)\)\. Moreover, Eq\. \([38](https://arxiv.org/html/2605.07339#A1.E38)\) shows thatℒFM→0\\mathcal\{L\}\_\{\\mathrm\{FM\}\}\\to 0implies‖y\(s\)−z\(s\)‖2→0\\\|y\(s\)\-z\(s\)\\\|\_\{2\}\\to 0, and the cross\-entropy termℒdec→0\\mathcal\{L\}\_\{\\mathrm\{dec\}\}\\to 0implies correct tool and stop decoding on the expert anchors\. Therefore, as the flow error, decoding temperature, and observation perturbation vanish, the generated plan utility converges to the oracle utility\.□\\square
### A\.3Proof of Theorem 2
#### Theorem 2 \(Unseen Tool Generalization\)\.
Let𝒯unseen\\mathcal\{T\}\_\{\\mathrm\{unseen\}\}be an unseen toolset whose embeddings lie on the semantic manifoldℳ\\mathcal\{M\}\. The expected generalization error satisfies
𝔼\[Errunseen\]≤C⋅\(δshift\+ϵcover\),\\mathbb\{E\}\[\\operatorname\{Err\}\_\{\\mathrm\{unseen\}\}\]\\leq C\\cdot\(\\delta\_\{\\mathrm\{shift\}\}\+\\epsilon\_\{\\mathrm\{cover\}\}\),\(48\)whereC\>0C\>0is a manifold\-dependent constant,δshift\\delta\_\{\\mathrm\{shift\}\}is the semantic shift of the unseen tool manifold relative to the training tool manifold, andϵcover\\epsilon\_\{\\mathrm\{cover\}\}is the covering radius of the training tool embeddings\.
Proof\.Letℳtrain⊂ℳ\\mathcal\{M\}\_\{\\mathrm\{train\}\}\\subset\\mathcal\{M\}andℳunseen⊂ℳ\\mathcal\{M\}\_\{\\mathrm\{unseen\}\}\\subset\\mathcal\{M\}denote the compact semantic regions occupied by training and unseen tools, respectively\. Formalize the two quantities in Eq\. \([48](https://arxiv.org/html/2605.07339#A1.E48)\) as
δshift:=supe∈ℳunseeninfe¯∈ℳtrain‖e−e¯‖2,ϵcover:=supe¯∈ℳtrainmint∈𝒯train‖e¯−et‖2\.\\delta\_\{\\mathrm\{shift\}\}:=\\sup\_\{e\\in\\mathcal\{M\}\_\{\\mathrm\{unseen\}\}\}\\inf\_\{\\bar\{e\}\\in\\mathcal\{M\}\_\{\\mathrm\{train\}\}\}\\\|e\-\\bar\{e\}\\\|\_\{2\},\\qquad\\epsilon\_\{\\mathrm\{cover\}\}:=\\sup\_\{\\bar\{e\}\\in\\mathcal\{M\}\_\{\\mathrm\{train\}\}\}\\min\_\{t\\in\\mathcal\{T\}\_\{\\mathrm\{train\}\}\}\\\|\\bar\{e\}\-e\_\{t\}\\\|\_\{2\}\.\(49\)For any unseen tooltu∈𝒯unseent\_\{u\}\\in\\mathcal\{T\}\_\{\\mathrm\{unseen\}\}with embeddingetue\_\{t\_\{u\}\}, choosee¯∈ℳtrain\\bar\{e\}\\in\\mathcal\{M\}\_\{\\mathrm\{train\}\}such that‖etu−e¯‖2≤δshift\\\|e\_\{t\_\{u\}\}\-\\bar\{e\}\\\|\_\{2\}\\leq\\delta\_\{\\mathrm\{shift\}\}and then choose a training toolπ\(tu\)∈𝒯train\\pi\(t\_\{u\}\)\\in\\mathcal\{T\}\_\{\\mathrm\{train\}\}such that‖e¯−eπ\(tu\)‖2≤ϵcover\\\|\\bar\{e\}\-e\_\{\\pi\(t\_\{u\}\)\}\\\|\_\{2\}\\leq\\epsilon\_\{\\mathrm\{cover\}\}\. The triangle inequality yields:
‖etu−eπ\(tu\)‖2≤δshift\+ϵcover\.\\\|e\_\{t\_\{u\}\}\-e\_\{\\pi\(t\_\{u\}\)\}\\\|\_\{2\}\\leq\\delta\_\{\\mathrm\{shift\}\}\+\\epsilon\_\{\\mathrm\{cover\}\}\.\(50\)
By Assumption 1, distances onℳ\\mathcal\{M\}encode functional similarity\. Since the decoder in Eq\. \([2](https://arxiv.org/html/2605.07339#S3.E2)\), the encoded plan anchors, and the utility components in Eq\. \([3](https://arxiv.org/html/2605.07339#S3.E3)\) are smooth functions of semantic embeddings on the compact operational subset, their composition defines a Lipschitz excess risk map onℳ\\mathcal\{M\}\. Thus there exists a finite constantC\>0C\>0, depending only on the local condition number of the manifold charts, the decoder smoothness, and the utility Lipschitz constants, such that replacing an unseen tool by its semantic proxy changes the induced planning error by at most
Err\(tu\)≤C‖etu−eπ\(tu\)‖2\.\\operatorname\{Err\}\(t\_\{u\}\)\\leq C\\\|e\_\{t\_\{u\}\}\-e\_\{\\pi\(t\_\{u\}\)\}\\\|\_\{2\}\.\(51\)Combining Eqs\. \([50](https://arxiv.org/html/2605.07339#A1.E50)\) and \([51](https://arxiv.org/html/2605.07339#A1.E51)\) gives
Err\(tu\)≤C\(δshift\+ϵcover\)\.\\operatorname\{Err\}\(t\_\{u\}\)\\leq C\(\\delta\_\{\\mathrm\{shift\}\}\+\\epsilon\_\{\\mathrm\{cover\}\}\)\.\(52\)Taking expectation overtu∼𝒯unseent\_\{u\}\\sim\\mathcal\{T\}\_\{\\mathrm\{unseen\}\}preserves the bound and proves Eq\. \([48](https://arxiv.org/html/2605.07339#A1.E48)\)\.□\\square
#### Interpretation\.
The proof shows that the unseen\-tool error depends on geometric coverage in the latent semantic space rather than on the number of discrete tool labels\. If the unseen tools lie near the training semantic manifold and the training embeddings form a fine cover, then a continuous latent anchor that is correct for the training proxy remains correct for the unseen tool up to a controlled Lipschitz perturbation\.
### A\.4Proof of Proposition 2
#### Proposition 2 \(Closed\-loop Error Contraction\)\.
LetEclosedE\_\{\\mathrm\{closed\}\}denote the cumulative closed\-loop planning error over a reasoning chain and letEopenE\_\{\\mathrm\{open\}\}denote the cumulative open\-loop error\-accumulation envelope induced by the same sequence of local phase errors\. If the state update mechanism satisfies Assumption[4](https://arxiv.org/html/2605.07339#Thmassumption4)with contraction ratioρ<1\\rho<1, then
Eclosed≤Eopen\.E\_\{\\mathrm\{closed\}\}\\leq E\_\{\\mathrm\{open\}\}\.\(53\)The inequality is strict over subsequent phases whenever a nonzero local error has already entered the context state\.
Proof\.Letch∗c\_\{h\}^\{\*\}be the oracle context at phasehhand define the closed\-loop context errorehclosed:=dc\(ch,ch∗\)e\_\{h\}^\{\\mathrm\{closed\}\}:=d\_\{c\}\(c\_\{h\},c\_\{h\}^\{\*\}\)in the latent context metric\. Letah≥0a\_\{h\}\\geq 0denote the local phase error introduced at phasehhby the combined effects of flow approximation, decoding, and observation perturbation\. By Assumption[4](https://arxiv.org/html/2605.07339#Thmassumption4), the update map is contractive, and the closed\-loop plan\-execute\-replan procedure satisfies
eh\+1closed≤ρehclosed\+ah,0≤ρ<1,e\_\{h\+1\}^\{\\mathrm\{closed\}\}\\leq\\rho e\_\{h\}^\{\\mathrm\{closed\}\}\+a\_\{h\},\\qquad 0\\leq\\rho<1,\(54\)withe1closed=0e\_\{1\}^\{\\mathrm\{closed\}\}=0because the initial query is shared by the generated and oracle executions\.
The corresponding open\-loop error envelope does not discard stale latent anchors and does not condition future plans on the corrected observation\. It therefore accumulates the same local errors without contraction:
eh\+1open=ehopen\+ah,e1open=0\.e\_\{h\+1\}^\{\\mathrm\{open\}\}=e\_\{h\}^\{\\mathrm\{open\}\}\+a\_\{h\},\\qquad e\_\{1\}^\{\\mathrm\{open\}\}=0\.\(55\)Unrolling the two recurrences gives, for everyh≥2h\\geq 2,
ehclosed≤∑i=1h−1ρh−1−iai,ehopen=∑i=1h−1ai\.e\_\{h\}^\{\\mathrm\{closed\}\}\\leq\\sum\_\{i=1\}^\{h\-1\}\\rho^\{h\-1\-i\}a\_\{i\},\\qquad e\_\{h\}^\{\\mathrm\{open\}\}=\\sum\_\{i=1\}^\{h\-1\}a\_\{i\}\.\(56\)Since0≤ρ<10\\leq\\rho<1, each coefficient satisfiesρh−1−i≤1\\rho^\{h\-1\-i\}\\leq 1, henceehclosed≤ehopene\_\{h\}^\{\\mathrm\{closed\}\}\\leq e\_\{h\}^\{\\mathrm\{open\}\}for every phasehh\. Summing over the reasoning chain yields:
Eclosed:=∑h=1Hehclosed≤∑h=1Hehopen:=Eopen\.E\_\{\\mathrm\{closed\}\}:=\\sum\_\{h=1\}^\{H\}e\_\{h\}^\{\\mathrm\{closed\}\}\\leq\\sum\_\{h=1\}^\{H\}e\_\{h\}^\{\\mathrm\{open\}\}:=E\_\{\\mathrm\{open\}\}\.\(57\)
To prove strictness, suppose a nonzero local errorai\>0a\_\{i\}\>0enters the context at phaseii\. At any later phaseh\>i\+1h\>i\+1, the contribution ofaia\_\{i\}to the closed\-loop error is at mostρh−1−iai\\rho^\{h\-1\-i\}a\_\{i\}, whereas its contribution to the open\-loop envelope is exactlyaia\_\{i\}\. Becauseρh−1−i<1\\rho^\{h\-1\-i\}<1, this contribution is strictly smaller in the closed loop\. Therefore the closed\-loop cumulative error is strictly attenuated over subsequent phases whenever a nonzero local error has already occurred\.□\\square
## Appendix BExperimental Details
### B\.1Benchmark Construction Details
Data Aggregation and Standardization\.We build a unified, comprehensive tool\-use benchmark by aggregating data from four prominent public sources:τ2\\tau^\{2\}\-bench\(providing executable domains with real tools and databases\),ToolBench\(contributing large\-scale API reasoning trajectories\),API\-Bank\(ensuring broad schema coverage\), andGTA\(offering workflow\-style task metadata\)\. To ensure a rigorous evaluation protocol, we standardize the underlying tool schemas, task metadata, gold reasoning workflows, and explicitly define the dataset splits\. In total, the unified benchmark features a dynamically evolving toolset of 3,930 unique tools and encompasses 6,865 complex multi\-step tasks\. To systematically evaluate semantic generalization, the toolset spans diverse functional phases \(e\.g\., retrieval, verification, and database operations\) and is rigorously partitioned, ensuring 599 tools are strictly unseen during testing\.
State\-Conditioned Closed\-Loop Protocol\.For executable evaluation, our primary experiments strictly adhere to a feedback\-conditioned decoding formulation\. At each planning step, given the user task, available toolsets, the executed action prefix, and our proposed compact state representationchc\_\{h\}, the model must either predict the subsequent discrete tool call or explicitly trigger the termination mechanism\. Crucially, this setup operates under a strict forward\-execution regime\. The system has absolutely no access to oracle remaining plans, fundamentally preventing future trajectory leakage and ensuring a realistic assessment of the agent’s dynamic replanning capabilities\.
Executable Domains and Discriminative Signal\.For physical execution, we strictly focus on thetelecomandretaildomains derived fromτ2\\tau^\{2\}\-bench, curating a highly challenging test split of 140 closed\-loop trajectories \(63telecomand 77retail\)\. The evaluation in these domains replays every prediction against real domain tools, initial states, and policies\. While the telecom domain is largely saturated by current strong baselines, the retail split provides the most discriminative evaluation signal\. It explicitly challenges the model with complex, database\-backed operational decisions—such as returning, exchanging, or modifying orders—that strictly depend on accurate intermediate state lookups\.
### B\.2Baselines Implementation Details
To rigorously evaluate the efficacy of the proposed FlowAgent, we systematically compare it against four representative baselines\. The detailed implementation configurations for each baseline are as follows:
- •Direct\-LLM:Serving as the direct\-prompt baseline, this approach evaluates the inherent capabilities of instruction\-tuned LLMs\. The model directly predicts the next tool or the stop signal based purely on its prompt, without any benchmark\-specific supervised fine\-tuning \(SFT\) or reinforcement learning \(RL\) adaptation\.
- •Standard SFT:Serving as our clean supervised baseline, this model is fine\-tuned to predict the next tool given the exact same context formulation as our method: the user task, available tools, the executed action prefix, and the compact state representation\. Crucially, this baseline operates explicitly without the continuous Flow Matching \(FM\) prior, directly mapping the compact state to the next action\.
- •RAG Planning:Functioning as the retrieval\-prior baseline, this method implements a retrieval\-augmented LLM executor\. For a given current state, it retrieves a semantically similar trajectory or state row from the training set\. The retrieved next\-tool decision or plan hint is then fed as an explicit prompt into the same LLM executor to guide the current prediction\.
- •ToolRL:Serving as the RL\-route baseline, we directly implement the methodology proposed in ToolRL\[[11](https://arxiv.org/html/2605.07339#bib.bib11)\]and evaluate it on our newly constructed benchmark\. To achieve this, our executable environment is specifically adapted to interface with the ToolRL and VERL training frameworks, and the policy is explicitly trained using Group Relative Policy Optimization \(GRPO\) to maximize trajectory\-level rewards\.
### B\.3Evaluation Metrics Formulation
To holistically assess the performance of the generated tool plans and their executable discrete translations, we deploy the following metric suite:
- •Overall Success & Retail Success:The primary holistic metric evaluated over all trajectory rows\. For next\-action rows, success strictly requires both predicting the correct tool and generating an executable action payload\. For stopping rows, it requires correctly triggering the termination mechanism\. We separately report Retail Success to isolate the performance on the most challenging, dynamic database\-backed domain\.
- •Tool EM & Retail Tool EM:This metric evaluates the pure planning policy\. It measures the strict exact match of the predicted discrete tool identityt∈Tht\\in T\_\{h\}or the termination token\. Similarly, Retail Tool EM isolates the model’s ability to make the hardest DB\-backed operation decisions without confounding execution errors\.
- •Pred Exec:A system\-level execution metric evaluating whether the predicted discrete action payload can be successfully parsed and executed within the real tool environment \(i\.e\., whether the state update operator𝒰\\mathcal\{U\}successfully returns a valid observationoho\_\{h\}\)\.
- •Arg Value EM:Evaluates the precision of the schema\-driven structured grounding module\. It is computed as the exact match of the instantiated argument key\-value pairs against the gold execution trace\. This metric is aggregated exclusively over action rows, as termination rows do not entail argument generation\.
### B\.4Configurations
Experiments on all datasets are conducted with the following hardware and software configuration:
- •Operating System: Ubuntu 20\.04\.6 LTS
- •CPU: Intel\(R\) Xeon\(R\) CPU E5\-2650 v2 @ 2\.60GHz
- •GPU: 3×\\timesNVIDIA H800 GPUs, each with 80 GB of memory
- •System RAM: 128 GB
## Appendix CAdditional Experiments
Diagnostic Baselines\.To establish a fundamental baseline, we evaluate several heuristic methods as detailed in Table[6](https://arxiv.org/html/2605.07339#A3.T6)\. These approaches serve strictly as diagnostic checks rather than mature frameworks\. We implement simple strategies including always stopping and global majority voting\. These trivial strategies achieve only 0\.2714 overall success and fail completely at execution prediction\. This demonstrates that the evaluation requires genuine reasoning\. The Domain Majority baseline perfectly predicts executable actions but fails to generate valid arguments\. The State Key Majority baseline successfully recovers many tool names and achieves a Tool EM score of 0\.7643\. However, it produces a critically low Pred Exec score of 0\.6364\. This discrepancy proves that predicting correct tool identifiers remains insufficient for actual task completion and highlights the necessity of semantic planning\. Furthermore, the Lexical Retrieval baseline provides a basic similarity floor\. It struggles with precise argument generation despite finding relevant historical records\. Its limited success directly justifies our adoption of retrieval augmented models in the main evaluation\.
Table 6:Performance of diagnostic heuristic baselines\. The results establish a basic performance floor and highlight the insufficiency of simple tool name matching\.MethodOverallRetailToolPredArg ValueSuccess↑\\uparrowSuccess↑\\uparrowEM↑\\uparrowExec↑\\uparrowEM↑\\uparrowAlways Stop0\.27140\.03900\.2714\-\-Global Majority0\.27140\.03900\.2714\-\-Domain Majority0\.40000\.27270\.40001\.00000\.1067State Key Majority0\.53570\.51950\.76430\.63640\.2411Lexical Retrieval0\.52860\.50650\.56430\.78570\.3083
Grounding Component Ablation\.Our methodology strictly regularizes the semantic consistency between generated plans and prevailing observational contexts\. The models frequently hallucinate invalid arguments even when successfully selecting the appropriate tool\. To evaluate the engineering mechanisms enforcing this consistency, we conduct an ablation study in Table[7](https://arxiv.org/html/2605.07339#A3.T7)\. We intentionally freeze the latent trajectory generation to maintain identical tool selection across all variants\. Consequently, the Tool EM metric remains perfectly constant\. We evaluate the removal of specific grounding components including schema normalization, entity binding, field mapping, and state validation\. The results reveal that state validation provides the primary defense against execution failures\. Removing this validation step degrades the overall success from 0\.7357 to 0\.7071 and drastically reduces the retail success rate\. Furthermore, the Pred Exec score drops to 0\.8857\. This degradation precisely mirrors the performance of the baseline lacking any validation\. Other components maintain stable performance on the current evaluation subset\. Ultimately, this experiment proves that explicitly verifying generated parameters against environmental constraints is mandatory for task completion\.
Table 7:Ablation study of individual grounding components\. The tool selection process is fixed to isolate the contribution of specific execution validation mechanisms\.MethodOverallRetailToolRetailPredArg ValueSuccess↑\\uparrowSuccess↑\\uparrowEM↑\\uparrowTool EM↑\\uparrowExec↑\\uparrowEM↑\\uparrowNo Grounding0\.70710\.46750\.74290\.53250\.87620\.5455Full Grounding\\cellcolorbestblue0\.7357\\cellcolorbestblue0\.51950\.74290\.5325\\cellcolorbestblue0\.9619\\cellcolorbestblue0\.5613w/o Schema Nor\.0\.73570\.51950\.74290\.53250\.96190\.5613w/o Entity Bind\.0\.73570\.51950\.74290\.53250\.96190\.5613w/o Field Map\.0\.73570\.51950\.74290\.53250\.95240\.5613w/o State Val\.0\.70710\.46750\.74290\.53250\.88570\.5455
Prior Injection Sensitivity\.The methodology translates latent paths into discrete actions\. To determine the optimal mechanism for providing these latent priors to the discrete decoder, we conduct a sensitivity analysis in Table[8](https://arxiv.org/html/2605.07339#A3.T8)\. We initially evaluate representational formats using isolated pilot experiments\. Soft prefixes and structured text achieve high similarity scores in static isolation\. However, we specifically select structured text conditioning because the text format remains completely auditable and aligns naturally with the desired output schema\. This formatting choice fundamentally guarantees identical execution behavior during training and inference\. We subsequently evaluate actual planning capabilities using dynamic loop experiments\. The unconditioned flow prior yields a basic overall success rate of 0\.6786\. Integrating the prevailing context state creates the state conditioned prior and elevates overall success to 0\.7357\. Providing multiple candidates degrades performance to 0\.7000\. Injecting noise further reduces reliability\. Ultimately, the state conditioned text prior provides the best balance of system transparency and reasoning accuracy\.
Table 8:Sensitivity analysis of prior injection mechanisms\. The table compares isolated pilot formats against dynamic loop performance to justify the selection of state conditioned text priors\.MethodEvaluation ModeOverallOverallRetailRetailArg ValueSuccess↑\\uparrowTool EM↑\\uparrowSuccess↑\\uparrowTool EM↑\\uparrowEM↑\\uparrowSoft Prefix PilotStatic Pilot\-0\.8916\-0\.55000\.7698Unstructured Text PilotStatic Pilot\-0\.8916\-0\.55000\.7599Structured Text PilotStatic Pilot\-0\.8916\-0\.55000\.7867Unconditioned Flow PriorDynamic Loop0\.67860\.68570\.41560\.42860\.5099State Conditioned PriorDynamic Loop\\cellcolorbestblue0\.7357\\cellcolorbestblue0\.7429\\cellcolorbestblue0\.5195\\cellcolorbestblue0\.5325\\cellcolorbestblue0\.5613Multiple Candidate PriorDynamic Loop0\.70000\.70000\.45450\.45450\.4585Noisy Prior InjectionDynamic Loop0\.67140\.67860\.40260\.41560\.4901
## Appendix DBroader Impact
The proposed FlowAgent framework introduces a major advancement in agentic reasoning and carries positive impacts for the research community and society\. By mitigating error accumulation and improving decision boundaries, FlowAgent substantially enhances the reliability of tool orchestration\. Training reinforcement learning agents typically requires massive computing resources\. As theoretically proven and empirically validated in our work, the continuous flow design significantly accelerates convergence and stabilizes optimization dynamics\. Standard discrete methods are notoriously susceptible to cascading failures and environment overfitting\. By shifting the paradigm toward continuous trajectory generation, FlowAgent offers a robust execution mechanism\. This ensures that language models interact faithfully with dynamic environments, fostering the development of safer and reliable artificial intelligence systems\.Similar Articles
SkillFlow: Flow-Driven Recursive Skill Evolution for Agentic Orchestration
SkillFlow proposes a flow-driven recursive skill evolution framework for LLM-based agentic orchestration, using Tempered Trajectory Balance to prevent strategy collapse and provide transparent credit assignment. Experiments on 14 datasets show significant improvements over baselines in QA, math, code, and decision-making tasks.
FlowRAG: Synergizing Explicit Reasoning via Frequency-Aware Multi-Granularity Graph Flow
FlowRAG proposes a novel semantic-aware retrieval framework that constructs a quad-level heterogeneous graph and uses frequency-aware weighted flow to extract explicit reasoning paths, achieving state-of-the-art performance on complex reasoning benchmarks.
Inducing Reasoning Primitives from Agent Traces
Introduces Reasoning Primitive Induction, a method that mines successful ReAct traces to cluster recurrent reasoning moves into typed pseudo-tools, outperforming the original agent by tens of percentage points on benchmarks.
Flow Reasoning Models: Scaling Reasoning Through Iterative Self-Refinement
Flow Reasoning Models (FRMs) introduce a training and test-time-scaling framework for discrete flow models on structured reasoning tasks. By using self-verification and self-conditioning, FRMs achieve nearly 100% solve rates on Sudoku and Zebra puzzles with far fewer passes than previous baselines.
ReasoningFlow: Discourse Structures for Understanding LLM Reasoning Traces
Introduces ReasoningFlow, a framework to capture discourse structures of large language model reasoning traces as directed acyclic graphs, enabling fine-grained analysis of reasoning behaviors like self-reflection and backtracking. Based on manual and automatic annotation of thousands of traces, it reveals structural similarities across models and that most erroneous steps do not contribute to final answers.