Qwen-UI-Agent Deep Dive: Alibaba Open-Sources a Real-World GUI Agent — AI Finally Grows Hands That Can Operate Phones and Computers

1. Introduction: From “Talking” to “Doing” — A Paradigm Shift

On August 20, 2026, Alibaba’s Tongyi Qianwen team officially released Qwen-UI-Agent — a real-world-centric foundation GUI agent model. This is not just another large language model; it is a digital executor that enables AI to “see the screen, click buttons, and fill forms” — to actually operate phones and computers on your behalf.

In the past, telling ChatGPT “book the earliest high-speed train from Beijing to Hangzhou tomorrow” would yield a text guide. Now, Qwen-UI-Agent can directly manipulate your phone screen — opening the 12306 app, selecting the train, filling in details, and completing the payment.

This is a paradigm leap from advisor to executor.

This article provides an in-depth technical analysis of Qwen-UI-Agent across six dimensions: system architecture, training paradigm, benchmark evaluation, code implementation, safety mechanisms, and industry impact.


2. System Architecture Overview

2.1 System Panorama

The architecture of Qwen-UI-Agent can be summarized as four layers spanning three domains: the environment infrastructure layer at the bottom, the action space and model layer in the middle, the Harness orchestration layer on top, covering mobile, desktop, web, and DeepSearch scenarios horizontally.

+------------------------------------------------------------------+
|                    Harness Layer (Proactive Service + Cross-Platform) |
|  +------------------------------------------------------------+  |
|  | Notification | Task Planning | Cross-Device State | User   |  |
|  | Perception   | & Scheduling  | Management         | Confirm|  |
|  +------------------------------------------------------------+  |
+------------------------------------------------------------------+
                              |
+------------------------------------------------------------------+
|                     Model Layer (Qwen-UI-Agent 7B / 27B)          |
|  +------------------------------------------------------------+  |
|  |  Vision Encoder  |  Qwen-3.5 Backbone  |  Action Decoder  |  |
|  |  (Screen Understanding)| (Reasoning & Planning)| (Action Gen)|  |
|  +------------------------------------------------------------+  |
+------------------------------------------------------------------+
                              |
+------------------------------------------------------------------+
|                  Unified Action Space (Hybrid)                    |
|  +------------------+------------------+----------------------+  |
|  |  GUI Operations  |  CLI Execution   |  Batched Actions    |  |
|  |  (click/type/    |  (Bash/Scripts)  |  (Parallel Batch    |  |
|  |   scroll/swipe)  |                  |   Execution)        |  |
|  +------------------+------------------+----------------------+  |
+------------------------------------------------------------------+
                              |
+------------------------------------------------------------------+
|                   Environment Infrastructure Layer                 |
|  +------------------+------------------+----------------------+  |
|  |  Sandbox Cluster  |  Real-Device     |  Web/Desktop        |  |
|  |  (Android Emu)    |  Mobile Runtime  |  Sandbox (Docker/VM)|  |
|  |                   |  (100+ Phones)   |                      |  |
|  +------------------+------------------+----------------------+  |
+------------------------------------------------------------------+

      Mobile              Desktop              Web              DeepSearch
    (Android/iOS)      (Ubuntu/Windows)   (Chrome/Firefox)    (Browse+Reason)

Key Design Philosophy: Unify GUI operations, CLI commands, and API calls into a single action space, breaking the limitation of “purely visual clicking.” The model autonomously selects the most appropriate interaction method for each scenario — GUI clicking when visual confirmation is needed, code execution for batch processing.

2.2 Model Specifications

ParameterQwen-UI-Agent-7BQwen-UI-Agent-27B
Parameters7B27B
Min GPU Memory~10GB~24GB
Base ModelQwen 3.5-7BQwen 3.5-27B
Inference EnginevLLM / TransformersvLLM / Transformers
LicenseApache 2.0Apache 2.0

Additionally, the team provides a 35B-A3B (Mixture-of-Experts with 3B active parameters) variant and a lightweight 4B version, catering to different deployment scenarios.


3. Key Technical Innovations

3.1 Real-Device Training Environment: Bridging the Sim-to-Real Gap

A major pain point for traditional GUI agents is the sim-to-real gap: they score high in simulated benchmarks but fail on real devices. The reasons are simple — simulators don’t generate login popups, network fluctuations, or app UI updates on the fly.

The Qwen-UI-Agent team built a real-device farm with 100+ physical smartphones and 150+ real apps:

+------------------------------------------------------------------+
|              Real-Device Mobile Runtime Architecture              |
|                                                                  |
|  +------------------+     +------------------+                   |
|  |  Physical Phone  |---->|  Health-Aware    |                   |
|  |  Cluster         |     |  Scheduler       |                   |
|  |  (100+ devices)  |     |  - State Monitor |                   |
|  |  - Android 14/15 |     |  - Auto-Failover |                   |
|  |  - Various OEMs  |     |  - Account Mgmt  |                   |
|  +------------------+     +------------------+                   |
|          |                        |                              |
|          v                        v                              |
|  +------------------+     +------------------+                   |
|  |  Virtual Screen  |     |  Task Dispatch   |                   |
|  |  Technology      |     |  Engine          |                   |
|  |  - Multi-session |     |  - Task Building |                   |
|  |  - Concurrent    |     |  - Trajectory    |                   |
|  |    Rollout (20x) |     |    Collection    |                   |
|  +------------------+     +------------------+                   |
|          |                        |                              |
|          +------------------------+                              |
|                       |                                          |
|                       v                                          |
|  +------------------------------------------------------------+ |
|  |  MobileWorld-Real Benchmark (400+ tasks, 100+ apps)         | |
|  +------------------------------------------------------------+ |
+------------------------------------------------------------------+

Technical Highlights:

  • Health-Aware Scheduler: Monitors application status, account login states, and network conditions in real-time, automatically switching on failure
  • Virtual Screen Technology: Enables multiple application sessions per physical device, boosting concurrent rollout efficiency by ~20x
  • Real-Device Training Data: The model directly encounters real login states, dynamic content, and random popups, fundamentally mitigating the sim-to-real gap

3.2 Hybrid GUI + CLI Unified Action Space

This is one of Qwen-UI-Agent’s most critical design innovations. Traditional GUI agents can only click and scroll; Qwen-UI-Agent fuses GUI operations with CLI commands into a single action space:

+------------------------------------------------------------------+
|                                                                  |
|              Unified Action Space                                |
|                                                                  |
|   +-------------------+    +-------------------+                 |
|   |  GUI Actions      |    |  CLI Actions      |                 |
|   |                   |    |                   |                 |
|   |  - click(x,y)     |    |  - bash_exec()    |                 |
|   |  - type(text)     |    |  - python_exec()  |                 |
|   |  - scroll(dx,dy)  |    |  - file_ops()     |                 |
|   |  - long_press()   |    |  - grep/find      |                 |
|   |  - swipe()        |    |  - awk/sed        |                 |
|   |  - key_combos()   |    |  - curl/wget      |                 |
|   +--------+----------+    +--------+----------+                 |
|            |                       |                              |
|            +----------+------------+                              |
|                       |                                           |
|              +--------v--------+                                  |
|              | Batched Actions |  ← Single inference outputs      |
|              |  (Batch Exec)   |     multiple actions             |
|              +--------+--------+     ~40% of actions batched      |
|                       |              ~60% step reduction          |
+-----------------------|-------------------------------------------+
                        v
              +------------------+
              | Execution Engine  |
              | GUI Exec | CLI Exec |
              +------------------+

Batched Actions Mechanism: On desktop, a single model inference can output multiple coherent actions to be completed in one go. In OSWorld tasks, CLI commands and GUI clicks emerge as the two dominant action types, with approximately 40% of action outputs being batched.

# Batched Actions Example: Action sequence output in a single inference
actions = [
    {"type": "gui_click", "x": 450, "y": 320, "desc": "Open file manager"},
    {"type": "gui_type", "text": "/home/user/data", "desc": "Enter path"},
    {"type": "gui_key_combo", "keys": ["Ctrl", "Enter"], "desc": "Confirm navigation"},
    {"type": "cli_bash", "command": "ls -la *.csv | wc -l", "desc": "Count CSV files"},
    {"type": "cli_bash", "command": "head -n 5 report.csv", "desc": "Preview first 5 rows"},
]
# All 6 actions output in a single model inference

Execution step statistics show that Batched Actions reduce overall execution trajectory length by approximately 60%, dramatically improving long-horizon task efficiency.

3.3 Three-Stage Training Paradigm

Qwen-UI-Agent’s training pipeline consists of three progressive stages:

+------------------------------------------------------------------+
|              Three-Stage Training Pipeline                        |
|                                                                  |
|  Stage 1: SFT (Supervised Fine-Tuning)                           |
|  +------------------------------------------------------------+ |
|  |  - Domain-Conditioned Expert Training                      | |
|  |  - Sliding-Window Training for Long Trajectories           | |
|  |  - In-Distribution Data Mixing for General Capability      | |
|  +------------------------------------------------------------+ |
|             |                                                    |
|             v                                                    |
|  Stage 2: Action RL (Action-Level Reinforcement Learning)        |
|  +------------------------------------------------------------+ |
|  |  - Localization Error Correction (click offset)            | |
|  |  - Loop Detection & Termination                            | |
|  |  - Premature Termination Identification                   | |
|  |  - Action-Aware Reward Function                            | |
|  |  → +7% success rate, -21.3% reasoning tokens               | |
|  +------------------------------------------------------------+ |
|             |                                                    |
|             v                                                    |
|  Stage 3: Online RL (Online Reinforcement Learning)              |
|  +------------------------------------------------------------+ |
|  |  - 100+ step long-horizon trajectory training              | |
|  |  - ~10,000 concurrent environments                         | |
|  |  - Model-Adaptive Curriculum Learning                      | |
|  |  - Verifier-Guided Online RL                               | |
|  |  → -11.2% "false success", +14.7% verification actions     | |
|  +------------------------------------------------------------+ |
+------------------------------------------------------------------+

3.3.1 Sliding-Window Training for SFT

Long-horizon GUI tasks produce extremely long trajectory sequences (100+ steps), which traditional SFT struggles with due to memory constraints. Qwen-UI-Agent employs a sliding-window training strategy:

def sliding_window_training(trajectory, window_size=4096, stride=2048):
    """
    Sliding window training: splits long trajectories into overlapping windows
    
    Args:
        trajectory: Full trajectory containing (screen_obs, action, reward) sequence
        window_size: Window size in tokens
        stride: Sliding step size
    """
    windows = []
    tokens = tokenize_trajectory(trajectory)
    
    # Split long trajectory into overlapping windows
    for start in range(0, len(tokens) - window_size + 1, stride):
        window = tokens[start:start + window_size]
        windows.append(window)
    
    # Compute loss independently for each window
    for window in windows:
        # Only compute loss on action tokens in the latter half of the window
        action_mask = get_action_mask(window)
        loss = cross_entropy_loss(
            model_output=model(window),
            targets=window,
            reduction_mask=action_mask
        )
        loss.backward()
    
    # Accumulate gradients and update parameters
    optimizer.step()
    optimizer.zero_grad()

This approach ensures stable gradient propagation across long trajectories while avoiding memory overflow.

3.3.2 Action RL: Correcting Recurring Action Errors

The Action RL phase specifically targets three categories of common action errors:

Error TypeManifestationSolution
Localization ErrorClick offset, e.g., clicking “Cancel” instead of “Confirm”Visual feature-based re-localization reward
Repetitive LoopRepeated clicking on the same interface, infinite loopLoop detector + negative reward
Premature TerminationDeclaring success before task completionTask completion verification reward

The most striking effect of Action RL: reasoning tokens decreased by 21.3%, while actual execution steps increased by 8.4%. This means the model became more “decisive” — far less meaningless self-doubt, while being more willing to take extra steps to ensure tasks are truly completed.

3.3.3 Online RL: Large-Scale Concurrent Long-Horizon Optimization

The Online RL phase is Qwen-UI-Agent’s “secret weapon”:

class OnlineRLTrainer:
    """
    Large-scale concurrent online reinforcement learning trainer
    """
    def __init__(self, num_envs=10000, max_trajectory_length=150):
        self.num_envs = num_envs
        self.max_trajectory_length = max_trajectory_length
        self.environments = self._init_environments(num_envs)
        self.curriculum = AdaptiveCurriculum()
    
    def train_step(self, model, num_iterations=1000):
        for iteration in range(num_iterations):
            # 1. Sample tasks from curriculum
            tasks = self.curriculum.sample_tasks(batch_size=self.num_envs)
            
            # 2. Parallel rollout execution
            rollouts = []
            for env, task in zip(self.environments, tasks):
                trajectory = env.run_episode(
                    model=model,
                    task=task,
                    max_steps=self.max_trajectory_length
                )
                rollouts.append(trajectory)
            
            # 3. Auto-verifier scoring
            rewards = []
            for trajectory in rollouts:
                verifier_score = self.auto_verifier(trajectory)
                rewards.append(verifier_score)
            
            # 4. Model-Adaptive Curriculum Learning
            # Tasks with mid-range success rates (30-70%) get higher sampling weight
            # Mastered tasks are replaced with harder ones
            self.curriculum.update(rollouts, rewards)
            
            # 5. GRPO policy optimization
            loss = compute_grpo_loss(model, rollouts, rewards)
            loss.backward()
            optimizer.step()
        
        return model

Model-Adaptive Curriculum Learning core idea: task difficulty is dynamically adjusted. Tasks with 30%-70% success rates receive the highest sampling weight (the “zone of proximal development”), tasks below 10% are temporarily shelved, and tasks above 90% are marked as “mastered” and replaced with harder ones.

Behavioral changes from Online RL: The model learned to “verify before submitting.” On OSWorld, the proportion of trajectories containing verification actions increased by 14.7%, while the “false success” rate (model claiming completion but actually failing) decreased by 11.2%.

3.4 AutoResearch Data Flywheel

One of Qwen-UI-Agent’s most impressive designs is the AutoResearch-style data flywheel — letting AI construct training data, set up environments, diagnose failures, and plan iterations autonomously, with humans providing only supervision and correction.

+------------------------------------------------------------------+
|                   AutoResearch Data Flywheel                      |
|                                                                  |
|   +------------+    +------------+    +------------+             |
|   | Task       |--->| Environment|--->| Trajectory |             |
|   | Construction|   | Setup      |   | Collection |             |
|   | - Knowledge |   | - Sandbox  |   | - Model    |             |
|   |   Aware     |   |   Config   |   |   Inference|             |
|   | - Capability|   | - Verifier |   | - Action   |             |
|   |   Aware     |   |   Gen      |   |   Execution|             |
|   | - Coverage  |   | - Init     |   | - Result   |             |
|   |   Analysis  |   |   State    |   |   Logging  |             |
|   +------------+    +------------+    +------------+             |
|         |                 |                 |                     |
|         +-----------------+-----------------+                     |
|                           |                                       |
|                           v                                       |
|   +------------------------------------------------------------+ |
|   |  Failure Analysis Engine                                      | |
|   |  +------------------+  +------------------+                 | |
|   |  | Pattern          |  | Root Cause       |                 | |
|   |  | Recognition      |  | Analysis         |                 | |
|   |  | - Recurring      |  | - Localization   |                 | |
|   |  |   Error Patterns |  |   Errors         |                 | |
|   |  | - Long-horizon   |  | - Planning       |                 | |
|   |  |   Failure Chains |  |   Errors         |                 | |
|   |  | - Environment    |  | - Execution      |                 | |
|   |  |   Related Failures| |   Errors         |                 | |
|   |  +------------------+  +------------------+                 | |
|   +------------------------------------------------------------+ |
|                           |                                       |
|                           v                                       |
|   +------------------------------------------------------------+ |
|   |  Iteration Planning Engine                                    | |
|   |  → Generate next-round training data collection plan         | |
|   |  → Targeted supplementation of weak scenarios                | |
|   |  → Human supervision + directed correction                   | |
|   +------------------------------------------------------------+ |
+------------------------------------------------------------------+

Knowledge- and Capability-Aware Task Synthesis: The system analyzes which tasks the current model performs poorly on, then automatically generates targeted training tasks rather than random sampling. This dramatically improves data efficiency.


4. Benchmark Evaluation

4.1 Core Benchmark Results

BenchmarkDescriptionQwen-UI-AgentGPT-5.6 SolClaude Opus 4.8Gemini 3.1 Pro
MobileWorldSimulated mobile benchmark82.1%67.5%62.3%58.1%
MobileWorld-RealReal-device benchmark92.2%85.4%84.7%86.2%
AndroidDailyAndroid daily tasks97.5%79.8%92.6%93.8%
OSWorld-VerifiedDesktop operations79.5%76.2%83.4%73.3%
WebArenaWeb interaction73.6%71.2%69.5%65.3%
ScreenSpot-ProGUI visual grounding81.5%
BrowseComp-ZHDeepSearch (Chinese)75.0%

Key Insights:

  • Mobile: Complete dominance — 12 points ahead of GPT-5.6 Sol on MobileWorld, 14.6 points ahead of Claude Opus 4.8
  • Real-device (MobileWorld-Real): 92.2% success rate validates the real-device training strategy
  • Desktop: 79.5% on OSWorld-Verified, second overall but surpassing GPT-5.5 and Gemini 3.1 Pro
  • Web: 73.6% on WebArena, first among all comparison models

4.2 Cross-Scenario Capability Radar

                      Mobile General
                      (MobileWorld)
                        82.1
                      /      \
                     /        \
   DeepSearch       /          \       Real-Device Mobile
  (BrowseComp-ZH) 97.5 -------- 92.2  (MobileWorld-Real)
      75.0          |    \   /   |
                    |     \ /    |
                    |     / \    |
                    |    /   \   |
      81.5          |   /    \  |        79.5
  (ScreenSpot-Pro)  |  /     \  |  (OSWorld-Verified)
                    | /       \ |
                    |/         \|
                   73.6 --------
                   (WebArena)
           
     Legend: Qwen-UI-Agent  ——    GPT-5.6 Sol  - - - 
     Note: The radar extends outward for higher values (max 100)

Qwen-UI-Agent forms an absolute advantage on mobile, while achieving international top-tier levels on desktop, web, and GUI grounding. It is currently the most balanced open-source cross-platform GUI agent.

4.3 General and Agentic Capability Preservation

A common dilemma for GUI agents is that over-optimizing GUI capabilities harms foundational reasoning. Qwen-UI-Agent excels at maintaining general capabilities:

BenchmarkQwen-UI-AgentQwen 3.5-27BUI-Venus 30B-A3BGUI-Owl 32B
MMMU-Pro72.473.532.439.5
MMLU-Pro86.586.065.673.9
MathVision82.882.036.850.6
IFEval90.290.481.384.5
Tau2-Bench89.989.222.76.1
Terminal-Bench 2.050.141.13.20.0

The data shows that Qwen-UI-Agent significantly surpasses the base model on agentic tasks while maintaining comparable performance on general reasoning benchmarks. In contrast, other GUI-specialized models (UI-Venus, GUI-Owl) show severe degradation on general capabilities. This is thanks to the carefully designed domain-conditioned training + in-distribution data mixing strategy in the SFT phase.


5. Code Implementation: From Deployment to Inference

5.1 Model Inference

import torch
from transformers import AutoModelForCausalLM, AutoProcessor

# Load model (7B version as example)
model_path = "Qwen/Qwen-UI-Agent-7B"
model = AutoModelForCausalLM.from_pretrained(
    model_path,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True
)
processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)

def run_gui_agent(task_prompt: str, screenshot_path: str, max_steps: int = 50):
    """
    Run GUI agent to execute a task
    
    Args:
        task_prompt: User task description
        screenshot_path: Current screen screenshot path
        max_steps: Maximum execution steps
    """
    # Build model input
    messages = [
        {
            "role": "user",
            "content": [
                {"type": "image", "image": screenshot_path},
                {"type": "text", "text": task_prompt}
            ]
        }
    ]
    
    # Convert to model input format
    inputs = processor.apply_chat_template(
        messages, 
        return_tensors="pt",
        add_generation_prompt=True
    ).to(model.device)
    
    # Generate actions
    with torch.no_grad():
        outputs = model.generate(
            **inputs,
            max_new_tokens=1024,
            temperature=0.1,
            do_sample=True,
            top_p=0.9
        )
    
    # Parse actions
    response = processor.decode(
        outputs[0][inputs.input_ids.shape[1]:], 
        skip_special_tokens=True
    )
    actions = parse_actions(response)
    
    return actions

def parse_actions(model_output: str) -> list:
    """
    Parse action sequences from model output
    """
    actions = []
    import re
    
    for line in model_output.strip().split("\n"):
        line = line.strip()
        if not line:
            continue
        
        if line.startswith("gui_click"):
            match = re.match(
                r"gui_click\(x=(\d+),\s*y=(\d+)(?:,\s*desc=\"([^\"]*)\")?\)", 
                line
            )
            if match:
                actions.append({
                    "type": "gui_click",
                    "x": int(match.group(1)),
                    "y": int(match.group(2)),
                    "desc": match.group(3) or ""
                })
        elif line.startswith("gui_type"):
            match = re.match(
                r"gui_type\(text=\"([^\"]*)\"(?:,\s*desc=\"([^\"]*)\")?\)", 
                line
            )
            if match:
                actions.append({
                    "type": "gui_type",
                    "text": match.group(1),
                    "desc": match.group(2) or ""
                })
        elif line.startswith("cli_bash"):
            match = re.match(
                r"cli_bash\(command=\"([^\"]*)\"(?:,\s*desc=\"([^\"]*)\")?\)", 
                line
            )
            if match:
                actions.append({
                    "type": "cli_bash",
                    "command": match.group(1),
                    "desc": match.group(2) or ""
                })
    
    return actions

5.2 GUI Action Executor

class GUIExecutor:
    """
    GUI operation executor: converts model action instructions to device operations
    """
    
    def __init__(self, device_type="android"):
        self.device_type = device_type
        if device_type == "android":
            import uiautomator2 as u2
            self.device = u2.connect()  # Connect to real device or emulator
        elif device_type == "desktop":
            import pyautogui
            self.pyautogui = pyautogui
        
    def execute(self, action: dict):
        """Execute a single action"""
        action_type = action["type"]
        
        if action_type == "gui_click":
            self._click(action["x"], action["y"])
        elif action_type == "gui_type":
            self._type(action["text"])
        elif action_type == "gui_scroll":
            self._scroll(action["dx"], action["dy"])
        elif action_type == "gui_key_combo":
            self._key_combo(action["keys"])
        elif action_type == "cli_bash":
            self._exec_bash(action["command"])
        elif action_type == "batch_execute":
            for sub_action in action["actions"]:
                self.execute(sub_action)
    
    def _click(self, x: int, y: int):
        if self.device_type == "android":
            self.device.click(x, y)
        else:
            self.pyautogui.click(x, y)
    
    def _type(self, text: str):
        if self.device_type == "android":
            self.device.send_keys(text)
        else:
            self.pyautogui.typewrite(text)
    
    def _exec_bash(self, command: str):
        import subprocess
        result = subprocess.run(
            command, shell=True, capture_output=True, text=True, timeout=30
        )
        return {
            "stdout": result.stdout,
            "stderr": result.stderr,
            "returncode": result.returncode
        }
    
    def _key_combo(self, keys: list):
        import pyautogui
        pyautogui.hotkey(*keys)
    
    def execute_batch(self, actions: list):
        """Execute batch action sequence"""
        results = []
        for action in actions:
            try:
                result = self.execute(action)
                results.append({
                    "action": action, 
                    "status": "success", 
                    "result": result
                })
            except Exception as e:
                results.append({
                    "action": action, 
                    "status": "failed", 
                    "error": str(e)
                })
                if self._recoverable(e):
                    continue
                else:
                    break
        return results

5.3 Real-Device Test Framework

class RealDeviceTestFramework:
    """
    Real-device test framework for evaluating GUI agents on physical devices
    """
    
    def __init__(self, devices: list, apps: list):
        self.devices = devices
        self.apps = apps
        self.auto_judge = AutoJudge()
    
    def run_evaluation(self, model, tasks: list, num_episodes=3):
        """Run evaluation on real devices"""
        results = []
        
        for task in tasks:
            task_results = []
            for episode in range(num_episodes):
                # Reset device to initial state
                device = self._reset_device(task.required_apps)
                
                # Run agent
                trajectory = []
                screenshot = device.screenshot()
                done = False
                step = 0
                
                while not done and step < task.max_steps:
                    actions = run_gui_agent(task.instruction, screenshot)
                    
                    for action in actions:
                        step += 1
                        trajectory.append({
                            "step": step,
                            "screenshot": screenshot,
                            "action": action,
                            "timestamp": time.time()
                        })
                        
                        try:
                            observation = device.execute(action)
                        except Exception as e:
                            observation = {"error": str(e)}
                        
                        done = self._check_completion(trajectory, task)
                        if done:
                            break
                    
                    screenshot = device.screenshot()
                
                # Auto-scoring
                judge_result = self.auto_judge.evaluate(trajectory, task)
                task_results.append({
                    "episode": episode,
                    "success": judge_result["success"],
                    "steps": step,
                    "trajectory": trajectory,
                    "judge_detail": judge_result
                })
            
            results.append({
                "task": task,
                "episodes": task_results,
                "avg_success": sum(r["success"] for r in task_results) / num_episodes
            })
        
        return results
    
    def _reset_device(self, required_apps):
        """Reset device to baseline state"""
        device = random.choice(self.devices)
        device.reset_to_home()
        for app in required_apps:
            device.launch_app(app)
            device.kill_app(app)  # Clear cached state
        return device

6. Safety Mechanisms

Safety is the most sensitive issue for GUI agents — an AI that can operate your phone and computer, without proper safety mechanisms, would be disastrous. Qwen-UI-Agent implements multi-layered safety protection:

+------------------------------------------------------------------+
|              Qwen-UI-Agent Safety Decision Tree                   |
|                                                                  |
|                         User Input                                |
|                             |                                     |
|                             v                                     |
|  +------------------+      +------------------+                 |
|  | Layer 1:          |      | Layer 2:          |                 |
|  | Legality Filter   |      | Risk Classification|                |
|  | - Illegal request |      | - High-risk ops   |                 |
|  |   detection       |      |   identification  |                 |
|  | - Sensitive       |      | - Sensitive       |                 |
|  |   keyword filter  |      |   scenario        |                 |
|  | - Compliance      |      |   classification  |                 |
|  |   check           |      | - Payment/Delete/ |                 |
|  |                   |      |   Authorization   |                 |
|  +--------+---------+      +--------+---------+                 |
|           |                         |                             |
|           | Legal/Low-Risk          | Medium/High-Risk             |
|           v                         v                             |
|  +------------------+      +------------------+                 |
|  | Layer 3:          |      | Layer 4:          |                 |
|  | Direct Execution  |      | Pause & Confirm  |                 |
|  | - Normal flow     |      | - Generate op    |                 |
|  | - Real-time       |      |   description    |                 |
|  |   screen monitor  |      | - Wait for user  |                 |
|  | - Anomaly         |      |   confirmation   |                 |
|  |   detection       |      | - Auto-abandon   |                 |
|  |                   |      |   on timeout     |                 |
|  +--------+---------+      +--------+---------+                 |
|           |                         |                             |
|           |                         +--------+                    |
|           |                                  |                    |
|           v                                  v                    |
|  +------------------+      +------------------+                 |
|  | Execution        |      | Execute after    |                 |
|  | Complete         |      | User Confirm     |                 |
|  |                  |      | or               |                 |
|  |                  |      | Reject & Log     |                 |
|  +------------------+      +------------------+                 |
+------------------------------------------------------------------+
class SafetyController:
    """
    GUI agent safety controller
    """
    
    SENSITIVE_OPERATIONS = {
        "payment": {
            "keywords": ["pay", "payment", "transfer", "purchase", "checkout", "buy"],
            "action": "pause_and_confirm"
        },
        "data_deletion": {
            "keywords": ["delete", "remove", "clear", "uninstall", "format"],
            "action": "pause_and_confirm"
        },
        "authorization": {
            "keywords": ["authorize", "login", "permission", "agree", "allow"],
            "action": "pause_and_confirm"
        },
        "illegal": {
            "keywords": ["crack", "hack", "steal", "fraud", "gambling"],
            "action": "reject_immediately"
        }
    }
    
    def __init__(self):
        self.sensitive_detector = self._build_detector()
    
    def _build_detector(self):
        from transformers import pipeline
        classifier = pipeline(
            "text-classification",
            model="Qwen/Qwen-UI-Agent-Safety",
            device="cuda"
        )
        return classifier
    
    def check_action(self, action: dict, context: dict) -> dict:
        """
        Check action safety
        
        Returns:
            {
                "safe": bool,
                "level": "safe" | "warning" | "dangerous" | "illegal",
                "action": "proceed" | "pause" | "reject",
                "message": str
            }
        """
        # 1. Quick keyword detection
        action_text = self._action_to_text(action)
        for category, config in self.SENSITIVE_OPERATIONS.items():
            for keyword in config["keywords"]:
                if keyword in action_text.lower():
                    if config["action"] == "reject_immediately":
                        return {
                            "safe": False,
                            "level": "illegal",
                            "action": "reject",
                            "message": f"Illegal operation detected, execution rejected"
                        }
                    elif config["action"] == "pause_and_confirm":
                        return {
                            "safe": False,
                            "level": "dangerous",
                            "action": "pause",
                            "message": f"Sensitive operation detected ({category}), please confirm"
                        }
        
        # 2. Semantic-level safety detection
        safety_score = self.sensitive_detector(
            f"Action: {action_text}\nContext: {context.get('app_name', '')} - {context.get('screen_text', '')}"
        )
        
        if safety_score["label"] == "DANGEROUS" and safety_score["score"] > 0.9:
            return {
                "safe": False,
                "level": "warning",
                "action": "pause",
                "message": "Potential risk detected, please confirm your intent"
            }
        
        return {
            "safe": True,
            "level": "safe",
            "action": "proceed",
            "message": ""
        }
    
    def _action_to_text(self, action: dict) -> str:
        action_type = action.get("type", "")
        if action_type == "gui_click":
            return f"Click at ({action.get('x')}, {action.get('y')})"
        elif action_type == "gui_type":
            return f"Type text: {action.get('text', '')}"
        elif action_type == "cli_bash":
            return f"Execute command: {action.get('command', '')}"
        return str(action)
    
    def pause_and_confirm(self, action: dict, timeout=30) -> bool:
        """
        Pause and wait for user confirmation
        """
        print(f"\n⚠️ Safety Alert: About to perform sensitive operation:")
        print(f"  - Operation type: {action.get('type')}")
        print(f"  - Description: {action.get('desc', 'No description')}")
        print(f"\nEnter Y to confirm, or N to reject:")
        
        import signal
        def timeout_handler(signum, frame):
            raise TimeoutError("User confirmation timeout")
        
        signal.signal(signal.SIGALRM, timeout_handler)
        signal.alarm(timeout)
        
        try:
            user_input = input().strip().upper()
            signal.alarm(0)
            return user_input == "Y"
        except TimeoutError:
            print("⏰ Confirmation timeout, operation automatically cancelled")
            return False

7. Application Scenarios

7.1 Cross-App One-Stop Workflow

User instruction: “Check the earliest high-speed train from Beijing to Hangzhou, then find the metro time from Hangzhou West to Alibaba Xixi Campus, calculate when I can arrive at the office, and finally create a DingTalk meeting.”

Qwen-UI-Agent’s execution flow:

Step 1: Open 12306 App → Query Beijing→Hangzhou trains → Get earliest G28 (07:00→12:23)
Step 2: Open Amap → Plan Hangzhou East→Alibaba Xixi Campus metro → Line 19, ~45 min
Step 3: Calculate: 12:23 arrival + 45 min metro = ~13:08 at office
Step 4: Open DingTalk → Create meeting → Title "Project Sync" → Time 13:30 → Invite Zhang San, Li Si
Step 5: Set 5-minute reminder → Complete

7.2 Cross-Device Collaborative Workflow

+------------------------------------------------------------------+
|              Cross-Device Collaborative Workflow Example          |
|                                                                  |
|  Mobile Device                      Desktop                       |
|  +------------------+              +------------------+          |
|  | 1. Find receipts  |  --transfer--> | 4. Receive images|          |
|  |    in gallery     |               | 5. CLI parse data |          |
|  | 2. OCR receipt    |  --transfer--> | 6. Generate Excel |          |
|  |    information    |               |    expense report  |          |
|  | 3. Confirm        |               |                   |          |
|  |    categories     |               |                   |          |
|  +------------------+              +------------------+          |
|                                                                  |
|  Harness Layer maintains cross-device state context              |
|  +------------------------------------------------------------+ |
|  | State Tracking: Receipt A identified → Receipt B transferred | |
|  |                 → Report generated                          | |
|  +------------------------------------------------------------+ |
+------------------------------------------------------------------+

7.3 DeepSearch + GUI Synergy

In the DeepSearch scenario, GUI and CLI capabilities work together:

def deep_search_with_gui(query: str):
    """
    GUI + DeepSearch collaborative workflow
    
    Pipeline:
    1. GUI opens browser to search keywords
    2. Locate data source URLs
    3. CLI downloads and analyzes data
    4. GUI performs follow-up actions
    """
    workflow = [
        # GUI Phase: Open browser and search
        {"type": "gui_click", "x": 100, "y": 50, "desc": "Open browser"},
        {"type": "gui_click", "x": 200, "y": 80, "desc": "Click address bar"},
        {"type": "gui_type", "text": query, "desc": "Enter search query"},
        {"type": "gui_key_combo", "keys": ["Enter"], "desc": "Start search"},
        
        # CLI Phase: Download data
        {"type": "cli_bash", "command": f"curl -s 'https://api.example.com/search?q={query}' | jq '.results' > data.json", "desc": "API data fetch"},
        {"type": "cli_bash", "command": "cat data.json | python3 -c \"import json,sys; d=json.load(sys.stdin); print(f'Found {len(d)} results')\"", "desc": "Data analysis"},
        
        # DeepSearch Phase: Deep reasoning
        {"type": "deep_search", "query": f"Analyze latest trends for {query}, generate report"},
        
        # GUI Phase: Present results
        {"type": "cli_bash", "command": "python3 generate_report.py", "desc": "Generate report"},
        {"type": "gui_click", "x": 300, "y": 400, "desc": "Open report file"},
    ]
    
    return workflow

8. Industry Impact and Future Outlook

8.1 Alibaba’s Full-Stack AI Strategy

The release of Qwen-UI-Agent is not an isolated event. On August 20, 2026, Alibaba simultaneously announced an 80 billion HKD placement, 100% allocated to AI investment. This move, together with Qwen-UI-Agent, forms the complete picture of Alibaba’s full-stack AI strategy:

  • Infrastructure: Alibaba Cloud + custom chips
  • Foundation Models: Qwen series (Qwen 3.5, Qwen-UI-Agent, Qwen-VL, etc.)
  • Middleware: ModelScope community + Alibaba Cloud Bailian platform
  • Application Layer: Tongyi Qianwen App, DingTalk AI, Taobao AI Assistant

8.2 Industry Significance

  1. From Simulation to Real Devices: Qwen-UI-Agent’s greatest contribution is not its benchmark scores, but raising the industry standard from “works in simulation” to “works on real devices”
  2. Open-Source Ecosystem: Fully open-source (Apache 2.0), the 7B version requires only 10GB of GPU memory, making it accessible to individual developers and SMEs
  3. Consumer Products: Consumer-grade products are expected to land in Q4 2026

8.3 Limitations and Challenges

According to the technical report, Qwen-UI-Agent still has some limitations:

  • Desktop complex long-horizon tasks (OSWorld-v2) partial progress score of 40.0% still has significant room for improvement
  • Real-device popup notifications and other interference factors can still affect execution stability
  • Seamless cross-platform workflow orchestration is still being optimized
  • Privacy protection mechanism transparency and user control need further strengthening

9. Summary

Qwen-UI-Agent marks a significant milestone in the GUI agent landscape. It solves the sim-to-real gap with real-device training, breaks the limitations of pure visual interaction with a Hybrid GUI+CLI action space, achieves autonomous capability iteration with the AutoResearch data flywheel, and conquers long-horizon task stability with large-scale concurrent online RL.

From a technical standpoint, it proves that: an open-source model can comprehensively outperform closed-source flagship models on real-device operations. From an industry perspective, it signals that the paradigm shift from AI that “only talks” to AI that “can do” has begun.

When AI finally grows the “hands” to operate phones and computers, automation of the digital world will enter a new era.


References:


9. Deployment Guide and Developer Best Practices

9.1 Environment Setup

# Deploy Qwen-UI-Agent-7B with vLLM
pip install vllm qwen-vl-utils

# Start model serving
python -m vllm.entrypoints.openai.api_server \
    --model Qwen/Qwen-UI-Agent-7B \
    --trust-remote-code \
    --dtype bfloat16 \
    --max-model-len 32768 \
    --gpu-memory-utilization 0.9 \
    --port 8000

9.2 Complete Agent Loop

class QwenUIAgent:
    """Complete GUI agent runtime loop"""
    
    def __init__(self, model_path: str, device_type: str = "android"):
        self.model = self._load_model(model_path)
        self.executor = GUIExecutor(device_type)
        self.safety = SafetyController()
        self.memory = []  # Short-term memory
        
    def run(self, task: str, max_steps: int = 100):
        """Complete task execution loop"""
        step = 0
        screenshot = self._capture_screen()
        task_history = [{"role": "system", "content": f"Task: {task}"}]
        
        while step < max_steps:
            # 1. Build context
            messages = task_history + [
                {
                    "role": "user",
                    "content": [
                        {"type": "image", "image": screenshot},
                        {"type": "text", "text": "Current screen shown above, output next action"}
                    ]
                }
            ]
            
            # 2. Model inference
            actions = self._predict(messages)
            
            # 3. Safety check
            for action in actions:
                check = self.safety.check_action(
                    action, 
                    {"app_name": self._current_app(), "screen_text": self._ocr(screenshot)}
                )
                
                if check["action"] == "reject":
                    print(f"❌ {check['message']}")
                    return {"status": "rejected", "reason": check["message"]}
                elif check["action"] == "pause":
                    confirmed = self.safety.pause_and_confirm(action)
                    if not confirmed:
                        print(f"⏭️ User rejected operation")
                        continue
                
                # 4. Execute action
                result = self.executor.execute(action)
                step += 1
                
                # 5. Update memory
                self.memory.append({"action": action, "result": result})
                task_history.append({
                    "role": "assistant", 
                    "content": f"Executed: {action}"
                })
                
                # 6. Check completion
                if self._is_complete(task, screenshot):
                    return {"status": "success", "steps": step}
                
                screenshot = self._capture_screen()
        
        return {"status": "max_steps_reached", "steps": step}

9.3 Compute Requirements and Deployment Recommendations

ScenarioRecommended ModelGPU ConfigurationRAMTarget Users
Personal Research / Prototyping7B1×RTX 4090 (24GB)32GBIndependent devs
Enterprise Mobile Automation27B1×A100 (80GB)64GBMid-size teams
Desktop + Web Full-Scene27B2×A100 (80GB)128GBLarge teams
Edge Device Deployment4B1×RTX 4060 (8GB)16GBIoT/Embedded
Cost-Efficient MoE35B-A3B1×A100 (80GB)64GBCost-sensitive

10. Deep Comparative Analysis: Why Does Qwen-UI-Agent Surpass GPT-5.6 Sol?

10.1 The Parameter Efficiency Puzzle

How can a 27B open-source model outperform GPT-5.6 Sol (estimated >1T parameters) on mobile benchmarks? The answer lies in data quality > data scale:

  1. The Scarcity Value of Real-Device Data: Trajectory data collected from 100+ physical phones contains real-world scenarios that simulators can never reproduce — popup ads, account logouts, network timeouts, app updates
  2. The Efficiency Revolution of Action Space: Batched Actions allow the model to accomplish more actual work within the same inference budget, rather than wasting compute on “where to look next” self-dialogue
  3. Goal Alignment in RL Training: Online RL directly optimizes end-to-end task success rate, rather than intermediate metrics (like localization accuracy), avoiding the “local optimum, global failure” trap

10.2 Comparison with Other GUI Agents

DimensionQwen-UI-AgentUI-TARS-2OpenCUA-72BClaude Opus 4.8
Open Source✅ Apache 2.0
Real-Device Training✅ 100+ devices❌ Sim-only
GUI+CLI Hybrid❌ GUI Only
Batched Actions✅ ~40%❌ Step-by-step
Online RL (100+ steps)✅ 10,000 concurrent
Data Flywheel
Mobile Performance92.2%84.7%
Desktop Performance79.5%Low83.4%
Web Performance73.6%69.5%

Qwen-UI-Agent demonstrates clear advantages in feature completeness and open-source ecosystem, making it the most comprehensive open-source GUI agent solution available today.


11. The Broader Context: Alibaba’s AI Strategy

11.1 The 80 Billion HKD Signal

On the same day Qwen-UI-Agent was released, Alibaba announced an 80 billion HKD (approximately $10.2 billion USD) secondary placement, with 100% of proceeds allocated to AI investment. This is the largest single AI investment by a Chinese tech company. The funds are expected to be deployed across:

  • AI Infrastructure Expansion: Additional GPU clusters for Alibaba Cloud, targeting 3× current capacity by 2027
  • Foundation Model R&D: Continued development of the Qwen model family
  • Application Ecosystem: AI-native features across Taobao, DingTalk, Alipay, and Cainiao

11.2 The Strategic Rationale

Alibaba’s investment in GUI agents is not just about automation — it’s about platform monetization. When AI agents can operate any app on a phone, the “gatekeeper” for digital services shifts from the app itself to the agent. An open-source agent that runs on Alibaba Cloud infrastructure creates a powerful ecosystem lock-in effect:

  1. Data flywheel: More users → more training data → better agent → more users
  2. Cloud consumption: Each agent inference consumes cloud compute
  3. Ecosystem expansion: Developers build on Qwen-UI-Agent → deploy on Alibaba Cloud

12. Conclusion and Future Outlook

The release of Qwen-UI-Agent marks the inflection point where GUI agents move from laboratories to the real world. With 100 real devices, 150 apps, 10,000 concurrent environments, and trajectories exceeding 100 steps, it has proven the viability of AI-operated digital devices.

Short-term (2026 Q4): Consumer-grade products will launch, with Tongyi Qianwen App and DingTalk integrating GUI Agent capabilities Medium-term (2027): Cross-device collaborative workflows will mature, with AI agents autonomously completing end-to-end tasks spanning phones, computers, and tablets Long-term (2028+): GUI agents will become the universal executor of the digital world — every device with a screen will be an AI-operable surface

When AI learns to see screens, click buttons, and write code, digital automation will no longer need APIs — because every screen is an API.


References: