Phone Agent for Openclaw

A sophisticated mobile automation skill that enables AI agents to control Android devices through USB ADB by analyzing UI structures and executing precise hardware-level commands.

lanlan314
v1.0.0
Mar 31, 2026
0
678
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install phone-agent-lan

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install phone-agent-lan using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Phone Agent?

Phone Agent is a specialized tool within the Openclaw Skills ecosystem designed for deep integration between AI agents and physical Android hardware. Unlike vision-based systems that rely on heavy image processing, this skill utilizes UI Dump technology to parse XML layouts directly from the device. This approach ensures high precision and lower latency when identifying screen elements.

By leveraging the Android Debug Bridge (ADB), Phone Agent allows users to bridge the gap between desktop AI workflows and mobile application environments. It provides a robust interface for performing complex sequences such as launching apps, navigating menus via coordinates, and simulating user inputs, making it an essential component for mobile-centric automation tasks.

Phone Agent Use Cases

  • Automated mobile application testing and quality assurance.
  • Remote message orchestration and social media automation.
  • Workflow automation for apps without public APIs or web interfaces.
  • Data extraction from mobile-only banking or fintech applications.
  • Batch processing of mobile tasks such as clearing notifications or updating settings.

How Phone Agent Works

  1. The skill establishes a secure connection to an Android device using the USB ADB protocol.
  2. When a command is issued, the agent captures the current screen state using a UI Automator dump to generate an XML representation of the interface.
  3. The skill parses the XML to locate specific UI elements based on text, resource IDs, or clickable attributes.
  4. Precise coordinates are calculated from element bounds to ensure accurate interaction.
  5. The agent executes the required action—such as a tap, swipe, or text input—directly through the ADB shell.
  6. Real-time feedback is provided to the AI agent to confirm the success of the operation or handle errors like disconnected devices.

Phone Agent Setup

Prerequisites

Ensure you have adb, python3, and a compatible Android device.

Device Configuration

  1. Enable Developer Options by tapping Build Number 7 times in your phone settings.
  2. Enable USB Debugging.
  3. For Xiaomi devices, additionally enable USB Debugging (Security Settings).
  4. Connect the phone to your workstation via USB and authorize the connection.

Verification

Confirm your device is recognized by running:

adb devices

Check the installation of the Openclaw Skills component:

ls -la ~/.openclaw/skills/phone-agent/agent.py

Phone Agent Data Schema & Taxonomy

Phone Agent manages its operations through structured XML data and local CLI execution. The following table describes the primary data artifacts:

Artifact Location/Source Description
UI Dump /sdcard/dump.xml The raw XML structure of the current mobile screen.
Screenshot Temporary files Visual capture of the device screen for verification.
Coordinates XML bounds attribute Logical mapping of UI elements (e.g., [x1,y1][x2,y2]).
Package IDs Android Manifest Unique identifiers for apps (e.g., com.tencent.mm).

Metadata is processed in-memory to calculate center-point coordinates for touch events.

Phone Agent Advanced Features

  • Multi-step UI workflow orchestration via Python scripting.
  • Support for hardware keys including HOME, BACK, and POWER simulations.
  • Integration with monkey runner for rapid app launching via package names.
  • Automated coordinate calculation from complex XML bounds strings.
  • Persistent ADB server management for stable long-term automation sessions.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*