TL;DR
K²-Agent is a hierarchical framework for mobile device control that mirrors human cognition by separating and co-evolving strategic planning ("knowing what") and action execution ("knowing how"). By combining a training-free, self-correcting loop for high-level planning with a curriculum-guided reinforcement learning strategy for low-level execution, it achieves state-of-the-art performance on AndroidWorld using only raw screenshots and open-source models.
What Problem Does This Paper Address?
Building autonomous agents that can control mobile devices via visual inputs is a major goal in AI, but current approaches hit a wall when tasks require long-horizon planning and precise UI interactions. Existing methods generally fall into two categories: training-free agents (which rely on clever prompting but are capped by the base model's fixed capabilities) and learning-based agents (which fine-tune models via reinforcement learning or supervised learning but struggle with long-term credit assignment and generalize poorly to new apps).
Crucially, most existing hierarchical models treat the planner-executor split as a purely structural division, applying the same training rules to both layers. This paper addresses this limitation by explicitly decoupling declarative knowledge (the high-level strategy of what steps to take) from procedural knowledge (the low-level skill of how to precisely click, swipe, or type), allowing them to follow different optimization paths and co-evolve.
Methods
K²-Agent splits the control problem into a two-layer Planner-Executor architecture:
- High-Level Planner ($\pi_H$): This module operates in a training-free mode to maintain a language-based declarative knowledge base ($K_G$). Bootstrapped from just a single human demonstration per task category, it runs a Summarize–Reflect–Locate–Revise (SRLR) loop. When an execution fails, the planner reflects on the trajectory, pinpoints the exact failure point, and performs "local surgeries" on its instructions using text-based operations (Add, Delete, Update, Highlight).
- Low-Level Executor ($\pi_L$): This is a trainable policy (initialized with a 7B parameter model) that translates the planner's sub-goals into atomic UI actions. It is optimized using a novel Curriculum-Guided Group Relative Policy Optimization (C-GRPO) algorithm featuring two key mechanisms:
- Error-Decoupled Replay Balancing: It categorizes execution errors into type errors (e.g., swiping instead of clicking) and parameter errors (e.g., clicking the wrong coordinates) and routes them into separate experience pools to ensure balanced mini-batch sampling.
- Dynamic Demonstration Injection: To prevent the model from getting lost in vast GUI action spaces, the framework dynamically prepends variable-length expert action prefixes ("hints") to the prompts based on task difficulty and training stage, gradually weaning the model off them as it improves.
Datasets
- AndroidWorld: The primary benchmark used for training and evaluation, consisting of 116 tasks across 20 applications with randomized parameters to prevent memorization.
- ScreenSpot-v2: A benchmark containing tasks across Mobile, Desktop, and Web domains, used to evaluate the agent's cross-platform visual grounding capabilities in a zero-shot setting.
- Android-in-the-Wild (AitW): Used to validate the zero-shot transferability of the agent's procedural skills on complex, long-horizon tasks (specifically the General and WebShopping subsets).
Key Insights and Ideas
- Decoupled Update Rules: "Thinking" and "practicing" require fundamentally different optimization strategies. High-level planning is symbolic and explicit, making it ideal for text-based reflection and memory editing (SRLR). Low-level execution behaves like motor memory, which is best refined through interactive reinforcement learning (C-GRPO).
- Dual Generalization: Because the two knowledge systems are decoupled, they generalize independently. The language-based declarative plans are model-agnostic and can be transferred to entirely different VLM backbones (like Gemini or GPT-4o) to instantly boost their performance. Meanwhile, the executor develops a platform-agnostic "muscle memory" for visual language that transfers zero-shot even to desktop and web interfaces.
- Curriculum-Driven Exploration: Pure reinforcement learning struggles with sparse rewards in large action spaces. Dynamically injecting expert prefixes bridges the exploration gap, stabilizing training and accelerating convergence.
Key Results
- AndroidWorld SOTA: K²-Agent achieved a 76.1% success rate, setting a new state-of-the-art among open-source, screenshot-only models and outperforming several prominent closed-source baselines.
- Cross-Platform Generalization: When evaluated zero-shot on ScreenSpot-v2, the low-level executor achieved an 91.3% overall accuracy, rivaling specialized grounding models trained on massive GUI datasets.
- Long-Horizon Transfer: On AitW, without any fine-tuning, K²-Agent achieved success rates of 86.5% on AitW-General and 68.3% on AitW-WebShopping, significantly outperforming prior SFT and RL baselines.
- Resource Efficiency: Unlike typical learning-based agents that require tens of thousands of data samples and hundreds of GPUs, K²-Agent bootstraps from a single demonstration per task and trains its executor on a single server with 8× NVIDIA A100 GPUs in about eight hours.
Limitations and Future Work
- Visual Observability Blindspots: The SRLR reflection loop relies entirely on visual feedback from screenshots. If a task fails due to non-visual issues—such as OS-level freezes, dropped touch events, network delays, or background system interrupts—the agent cannot accurately diagnose or correct the root cause.
- Backbone VLM Bottlenecks: A significant portion of remaining failures stem from the intrinsic limitations of current foundation models, such as difficulties with strict multi-step ordering, long-context text handling, or complex multi-document reasoning. The authors suggest that integrating external memory systems or stronger visual encoders could help overcome these frontier challenges.
Summary updated