Paper: 2605.12481 Authors: Xuhao Hu, Xi Zhang, Haiyang Xu, Kyle Qiao, Jingyi Yang, Xuanjing Huang, Jing Shao, Ming Yan, Jieping Ye Categories: cs.AI

The Gap

Computer use agents can now control computers through both low-level GUI actions (click, type) and high-level tool calls (file operations via API). Prior work treats these as separate: GUI-only agents like Claude Computer Use and UFO execute everything through pixel-level interactions, while tool-augmented agents like Cradle add tools but lack principled switching logic. The result? Agents either take 20 GUI steps to copy a file when one API call would suffice, or prematurely jump to tools when GUI context is still needed.

The core problem: no training data exists for interleaved GUI-Tool trajectories. Collecting real tool execution traces is expensive and brittle (environment dependencies, API changes). Existing GUI datasets like Mind2Web contain only click-and-type sequences. Without trajectory-level supervision showing *when to switch between modalities, agents can’t learn optimal orchestration.

Problem: Hybrid action space (GUI + Tools) but no switching logic
   |
   v
Assumption: Optimal paths exist that interleave GUI and tools
   |
   v
Method: Synthesize GUI-Tool trajectories + RL for switching decisions
   |
   v
Evidence: 46.85% accuracy on OSWorld-MCP (66% over baseline)
   |
   v
Conclusion: Trajectory synthesis + staged RL enables GUI-Tool orchestration

The Increment

One sentence: Before ToolCUA, agents either used only GUI or bolted on tools without learning when to switch; after ToolCUA, agents learn to orchestrate GUI and tools through synthetic trajectory training and reinforcement learning that rewards efficient path selection.

Core Mechanism

ToolCUA operates in three stages. First, it generates training data by taking existing GUI-only trajectories and inserting tool calls at appropriate points. The system builds a “grounded tool library” by analyzing GUI action sequences (e.g., a sequence of clicks to copy a file) and creating corresponding API tools with preconditions derived from the GUI context. This produces diverse interleaved trajectories without manual annotation.

Second, it performs “Tool-Bootstrapped GUI RFT” (Reinforced Fine-Tuning). The agent is warmed up with supervised learning on synthetic trajectories, then trained with single-turn RL at critical decision points—moments where the agent must choose between continuing with GUI or switching to a tool. The RL signal comes from comparing outcomes: did the tool call succeed and shorten the path?

Third, ToolCUA undergoes online agentic RL in a high-fidelity environment (OSWorld-MCP) with a custom reward function. The “Tool-Efficient Path Reward” gives positive signal for successful tool use that reduces steps, negative signal for failed tool calls or unnecessary GUI detours, and neutral signal for pure GUI paths that work but are suboptimal. The agent learns through trial and error which switching points actually pay off.

Stage 1: Trajectory Synthesis
   GUI-only data --> [Analyze patterns] --> Grounded tool library
                                        |
                                        v
                         [Insert tool calls] --> GUI-Tool trajectories

Stage 2: Tool-Bootstrapped RFT
   Synthetic data --> [SFT warmup] --> [Single-turn RL at switch points]
                                                    |
                                                    v
                                            Better switching policy

Stage 3: Online Agentic RL
   [Agent acts in environment] --> [Tool-Efficient Path Reward]
            ^                                      |
            |                                      v
            +-------------- [Policy update] <------+

Think of ToolCUA like training a chef who can both cook from scratch (GUI) and use pre-made ingredients (tools). Stage 1 is creating a recipe book by watching chefs cook everything from scratch, then noting “here you could’ve used canned tomatoes instead of peeling 10 tomatoes.” Stage 2 is practicing those recipes with a mentor who says “yes, switch to canned here” or “no, fresh is better for this dish.” Stage 3 is running a real kitchen where you learn through service: if using canned tomatoes gets the dish out faster without complaints, that’s reinforced; if it ruins the flavor, you learn to stick with fresh.

The key insight: you can’t learn optimal switching by only seeing one modality. The synthetic trajectories provide the “what if” counterfactuals (what if I’d used a tool here?), and the RL stages provide the “does it actually work” ground truth.

Key Concepts

  • Grounded Tool Library: Instead of hand-coding APIs, ToolCUA automatically generates tools by analyzing GUI trajectories. If a trajectory shows “click file → click copy → click destination → click paste,” the system creates a copy_file(source, dest) tool with preconditions extracted from the GUI state (file must exist, destination must be writable). “Grounded” means the tool’s semantics come from observed GUI behavior, not abstract specifications. This solves the cold-start problem: you don’t need existing tool documentation to teach an agent about tools.

  • Tool-Efficient Path Reward: Standard RL rewards task completion, but that doesn’t distinguish between a 3-step tool path and a 20-step GUI path. ToolCUA’s reward function explicitly penalizes unnecessary length and rewards appropriate tool use. Concretely: +1 for task success, +0.5 for each tool call that reduces steps compared to pure GUI, -0.3 for failed tool calls, -0.1 per extra GUI step beyond the tool-optimal path. This creates gradient toward efficiency, not just correctness.

  • Single-Turn RL at Switch Points: Full trajectory RL is sample-inefficient because most steps are unambiguous (obviously click the button). ToolCUA identifies “switch points”—states where both GUI continuation and tool invocation are plausible—and applies RL only there. Think of it like teaching chess: you don’t need RL to learn pawn moves, but you do need it to learn when to sacrifice material for position. This focuses learning where it matters and speeds up training.

Framework Shift

Before (GUI-only or tool-bolted):        After (ToolCUA):

Task --> [Agent] --> GUI actions         Task --> [Agent] --> Decision point
              |                                        |
              v                                        +---> GUI action
         Success (slow)                                |
                                                       +---> Tool call
                                                             |
                                                             v
                                                       Success (fast)

Linear execution, one modality            Branching execution, learned switching

From sequential single-modality execution to hierarchical dual-modality orchestration, the core shift is treating modality selection as a learned decision problem rather than a fixed architectural choice.

Expert Assessment

Problem choice: Real gap. Every practitioner building computer use agents hits this: you add tools to speed things up, but the agent doesn’t know when to use them. The paper correctly identifies that the bottleneck isn’t tool availability but switching logic. However, the framing slightly oversells novelty—tool-augmented agents have existed (Toolformer, Gorilla), but applying this to GUI domains is genuinely new.

Method maturity: The trajectory synthesis pipeline is clever and practical. Grounding tools in GUI behavior sidesteps the annotation bottleneck. The staged training (SFT → single-turn RL → online RL) is sound engineering, not a conceptual breakthrough. The Tool-Efficient Path Reward is reasonable but hand-tuned (those +0.5/-0.3 coefficients smell like hyperparameter search). A simpler baseline would be: just train on synthetic trajectories with SFT—does the RL actually matter? The paper doesn’t ablate this cleanly.

Experimental integrity: OSWorld-MCP is a solid benchmark (real desktop tasks, not toy environments). The 66% relative improvement is impressive, but the absolute accuracy (46.85%) reveals the task is still hard. Baselines are fair: they compare against GUI-only and tool-augmented variants. One concern: the synthetic trajectory generation uses heuristics to decide where tools fit—if those heuristics are too conservative or aggressive, they bias the learned policy. The paper doesn’t deeply analyze failure modes or show where the agent still makes wrong switching decisions.

Writing quality: The method section is dense but complete. The related work undersells connections to hierarchical RL and options frameworks, which have studied action abstraction for decades. The results section focuses on aggregate metrics; case studies showing specific switching decisions would strengthen intuition. The “grounded tool library” concept is introduced late—it should be front and center since it’s the key enabler.

Verdict: weak accept — Solid execution on a real problem with meaningful empirical gains, but the conceptual contribution is incremental (applying known RL techniques to a new domain) and the writing doesn’t fully illuminate the method’s inner workings.

Takeaways

Steal the trajectory synthesis pipeline: If you’re building agents with hybrid action spaces (e.g., code generation + terminal execution, or web navigation + API calls), you can repurpose single-modality data by analyzing patterns and inserting higher-level actions. The key is making those insertions “grounded”—derived from observed behavior, not abstract specs.

Focus RL on decision points, not full trajectories: Most agent actions are deterministic given the state. Apply RL only where genuine ambiguity exists (switch points, exploration-exploitation tradeoffs). This is faster and more sample-efficient than end-to-end RL.

Reward efficiency, not just correctness: If your agent can solve tasks in multiple ways, standard success/failure rewards won’t push it toward better solutions. Add explicit efficiency terms (path length, resource usage, latency) to the reward function.

Beware synthetic data bias: The quality of your synthetic trajectories caps your agent’s performance. If your heuristics for inserting tools are wrong, the agent learns wrong switching logic. Validate synthetic data against real usage patterns before scaling up training.

论文: 2605.12481 作者: Xuhao Hu, Xi Zhang, Haiyang Xu, Kyle Qiao, Jingyi Yang, Xuanjing Huang, Jing Shao, Ming Yan, Jieping Ye 分类: cs.AI

缺口

计算机使用智能体现在可以通过低级 GUI 操作(点击、输入)和高级工具调用(通过 API 进行文件操作)来控制计算机。

此前的工作将两者分开处理:纯 GUI 智能体如 Claude Computer Use 和 UFO 完全通过像素级交互执行任务,而工具增强智能体如 Cradle 虽然添加了工具但缺乏原则性的切换逻辑。

结果?智能体要么用 20 步 GUI 操作去复制一个文件(其实一个 API 调用就够了),要么在还需要 GUI 上下文时过早跳转到工具。

核心问题:不存在交错的 GUI-工具轨迹训练数据

收集真实的工具执行轨迹既昂贵又脆弱(环境依赖、API 变更)。

现有的 GUI 数据集如 Mind2Web 只包含点击和输入序列。

没有轨迹级别的监督来展示何时在模态间切换,智能体就无法学习最优编排。

问题:混合动作空间(GUI + 工具)但无切换逻辑
   |
   v
假设:存在交错使用 GUI 和工具的最优路径
   |
   v
方法:合成 GUI-工具轨迹 + 用 RL 学习切换决策
   |
   v
证据:在 OSWorld-MCP 上达到 46.85% 准确率(比基线高 66%)
   |
   v
结论:轨迹合成 + 分阶段 RL 实现 GUI-工具编排

增量

一句话:ToolCUA 之前,智能体要么只用 GUI,要么硬加工具但不知何时切换;ToolCUA 之后,智能体通过合成轨迹训练和奖励高效路径选择的强化学习,学会了编排 GUI 和工具。

核心机制

ToolCUA 分三个阶段运作。

首先,它通过获取现有的纯 GUI 轨迹并在适当位置插入工具调用来生成训练数据。

系统通过分析 GUI 动作序列(例如一系列点击来复制文件)并创建相应的 API 工具(前置条件从 GUI 上下文中提取),构建”接地工具库”。

这样就能产生多样的交错轨迹,无需人工标注。

其次,它执行”工具引导的 GUI RFT”(强化微调)。

智能体先用合成轨迹进行监督学习预热,然后在关键决策点——智能体必须在继续 GUI 或切换到工具之间做选择的时刻——用单轮 RL 训练。

RL 信号来自结果比较:工具调用成功了吗?缩短路径了吗?

第三,ToolCUA 在高保真环境(OSWorld-MCP)中进行在线智能体 RL,使用定制的奖励函数。

“工具高效路径奖励”对成功减少步数的工具使用给予正信号,对失败的工具调用或不必要的 GUI 绕路给予负信号,对有效但次优的纯 GUI 路径给予中性信号。

智能体通过试错学习哪些切换点真正有回报。

阶段 1:轨迹合成
   纯 GUI 数据 --> [分析模式] --> 接地工具库
                                |
                                v
                   [插入工具调用] --> GUI-工具轨迹

阶段 2:工具引导 RFT
   合成数据 --> [SFT 预热] --> [在切换点进行单轮 RL]
                                        |
                                        v
                                  更好的切换策略

阶段 3:在线智能体 RL
   [智能体在环境中行动] --> [工具高效路径奖励]
            ^                          |
            |                          v
            +-------- [策略更新] <------+

把 ToolCUA 想象成训练一个既能从头做菜(GUI)又能用预制食材(工具)的厨师。

阶段 1 是创建食谱书:观察厨师从头做所有菜,然后标注”这里你本可以用罐装番茄代替剥 10 个番茄”。

阶段 2 是在导师指导下练习这些食谱,导师会说”对,这里换罐装”或”不,这道菜用新鲜的更好”。

阶段 3 是经营真实厨房,通过服务学习:如果用罐装番茄能更快出菜且没人抱怨,这就得到强化;如果毁了味道,你就学会坚持用新鲜的。

关键洞察:只看一种模态无法学习最优切换。

合成轨迹提供”如果”的反事实(如果我在这里用工具会怎样?),RL 阶段提供”实际有效吗”的真实验证。

关键概念

  • 接地工具库:ToolCUA 不是手工编码 API,而是通过分析 GUI 轨迹自动生成工具。

如果轨迹显示”点击文件 → 点击复制 → 点击目标 → 点击粘贴”,系统就创建一个 copy_file(source, dest) 工具,前置条件从 GUI 状态中提取(文件必须存在,目标必须可写)。

“接地”意味着工具的语义来自观察到的 GUI 行为,而非抽象规范。

这解决了冷启动问题:你不需要现有的工具文档就能教智能体使用工具。

  • 工具高效路径奖励:标准 RL 奖励任务完成,但无法区分 3 步工具路径和 20 步 GUI 路径。

ToolCUA 的奖励函数明确惩罚不必要的长度,奖励恰当的工具使用。

具体来说:任务成功 +1,每个相比纯 GUI 减少步数的工具调用 +0.5,失败的工具调用 -0.3,超出工具最优路径的每个额外 GUI 步骤 -0.1。

这创造了朝向效率而非仅仅正确性的梯度。

  • 切换点的单轮 RL:完整轨迹 RL 样本效率低,因为大多数步骤是明确的(显然要点那个按钮)。

ToolCUA 识别”切换点”——GUI 继续和工具调用都合理的状态——只在那里应用 RL。

就像教国际象棋:你不需要 RL 来学习兵的走法,但需要它来学习何时牺牲子力换取位置。

这将学习集中在重要之处,加速训练。

框架转变

之前(纯 GUI 或硬加工具):         之后(ToolCUA):

任务 --> [智能体] --> GUI 操作      任务 --> [智能体] --> 决策点
              |                                   |
              v                                   +---> GUI 操作
         成功(慢)                               |
                                                  +---> 工具调用
                                                        |
                                                        v
                                                  成功(快)

线性执行,单一模态                   分支执行,学习切换

从顺序的单模态执行到分层的双模态编排,核心转变是将模态选择视为学习的决策问题,而非固定的架构选择

专家评审

选题眼光:真实缺口。

每个构建计算机使用智能体的实践者都会遇到这个问题:你添加工具来加速,但智能体不知道何时使用它们。

论文正确识别出瓶颈不是工具可用性而是切换逻辑。

不过,框架略微夸大了新颖性——工具增强智能体已经存在(Toolformer、Gorilla),但将其应用到 GUI 领域确实是新的。

方法成熟度:轨迹合成管道巧妙且实用。

在 GUI 行为中接地工具绕过了标注瓶颈。

分阶段训练(SFT → 单轮 RL → 在线 RL)是扎实的工程,不是概念突破。

工具高效路径奖励合理但手工调整(那些 +0.5/-0.3 系数闻起来像超参数搜索)。

一个更简单的基线是:只用 SFT 在合成轨迹上训练——RL 真的有用吗?论文没有干净地消融这一点。

实验诚意:OSWorld-MCP 是可靠的基准(真实桌面任务,非玩具环境)。

66% 的相对提升令人印象深刻,但绝对准确率(46.85%)揭示任务仍然很难。

基线公平:他们与纯 GUI 和工具增强变体比较。

一个担忧:合成轨迹生成使用启发式来决定工具适合哪里——如果这些启发式过于保守或激进,它们会偏置学习到的策略。

论文没有深入分析失败模式或展示智能体仍然做出错误切换决策的地方。

写作功力:方法部分密集但完整。

相关工作低估了与分层 RL 和选项框架的联系,这些框架几十年来一直在研究动作抽象。

结果部分关注聚合指标;展示具体切换决策的案例研究会增强直觉。

“接地工具库”概念引入较晚——它应该放在最前面,因为它是关键推动者。

判决弱接收 — 在真实问题上扎实执行,有意义的实证收益,但概念贡献是增量式的(将已知 RL 技术应用到新领域),写作没有完全阐明方法的内部运作。

要点总结

偷走轨迹合成管道:如果你在构建混合动作空间的智能体(例如代码生成 + 终端执行,或网页导航 + API 调用),你可以通过分析模式并插入更高级别的动作来重新利用单模态数据。

关键是让这些插入”接地”——源自观察到的行为,而非抽象规范。

将 RL 集中在决策点,而非完整轨迹:大多数智能体动作在给定状态下是确定性的。

只在存在真正歧义的地方(切换点、探索-利用权衡)应用 RL。

这比端到端 RL 更快、样本效率更高。

奖励效率,不仅仅是正确性:如果你的智能体能以多种方式解决任务,标准的成功/失败奖励不会推动它走向更好的解决方案。

在奖励函数中添加明确的效率项(路径长度、资源使用、延迟)。

警惕合成数据偏差:合成轨迹的质量限制了智能体的性能上限。

如果你插入工具的启发式是错的,智能体就学到错误的切换逻辑。

在扩大训练规模之前,根据真实使用模式验证合成数据。