Install
openclaw skills install agent-androidControl Android over LAN without USB, ADB, or root.
openclaw skills install agent-androidUse this skill to drive an Android device through the public agent-android beta surface published in the aivanelabs/ai-rpa repo.
Runtime prerequisites:
agent-android is available on PATHuv tool install aivane-agent-android; then run uv tool update-shell if the command is still not foundhttp://<device-ip>:8080The public path is local-first:
http://<device-ip>:8080If an agent-android command suddenly stops working, first check whether the AIVane app or its local API service has exited on the phone.
Every Android control task should follow the same short loop:
/healthapps if neededKeep the loop short. Prefer inspect -> act -> inspect over long speculative command chains.
Start the REPL with the user-provided device URL:
agent-android --repl --url http://<device-ip>:8080Built-in help:
agent-android --helphUse the one-off CLI when you already know the exact action you want.
Connectivity:
agent-android --health --url http://<device-ip>:8080Discovery:
agent-android --apps --url http://<device-ip>:8080agent-android --list --url http://<device-ip>:8080agent-android --id com.example:id/search --url http://<device-ip>:8080agent-android --text Search --url http://<device-ip>:8080agent-android --inputs --url http://<device-ip>:8080agent-android --refId 7 --url http://<device-ip>:8080agent-android --xpath 7 --url http://<device-ip>:8080agent-android --get-attr 7 text --url http://<device-ip>:8080Actions:
agent-android --launch com.xingin.xhs --url http://<device-ip>:8080agent-android --tap 7 --url http://<device-ip>:8080agent-android --input 7 "hello world" --url http://<device-ip>:8080agent-android --swipe up --url http://<device-ip>:8080agent-android --back --url http://<device-ip>:8080agent-android --press home --url http://<device-ip>:8080agent-android --screenshot --url http://<device-ip>:8080Waiting and output:
agent-android --wait-for Search --timeout 30 --url http://<device-ip>:8080agent-android --list --raw --url http://<device-ip>:8080Use the REPL for exploratory tasks and smoke runs. Short aliases and long names both work.
health or hl
Check /health.l [n] or list [n]
List the first n elements, or all cached elements when n is omitted.ss or snapshot
Force-refresh the UI tree and print it again.f <text> or find <text>
Filter by text or content description.id <resourceId>
Filter by Android resource ID.ref <refId>
Show the full element detail for one refId.x <refId> or xpath <refId>
Generate XPath candidates and validate their runtime match counts.xx <refId>
Tap by the best unique generated XPath candidate. Refuses ambiguous matches.vx <xpath> [idx] or validatex <xpath> [idx]
Validate one XPath against the runtime. Optionally inspect one match by zero-based index.t <refId> or tap <refId>
Tap the element center point from the current tree.tx <xpath> or tapx <xpath>
Tap one runtime-resolved XPath target.i <refId> <text> or input <refId> <text>
Input text into a refId target.
Use --clear or "" to clear instead of typing.ix <xpath> <text> or inputx <xpath> <text>
Input text into one XPath target.
Use ix <xpath> -- or --clear to clear the field.sw <d|u|l|r> [--dur N] [--dist N] or swipe ...
Swipe down/up/left/right with optional duration and distance.p <back|home|recents> or press ...
Press a system key.b or back
Press Back.la <package> or launch <package>
Launch an app by package name.s [path] or screenshot [path]
Capture a screenshot to an auto-generated or explicit path.wf <text> [--t N] or waitfor ...
Wait for an element to appear.g <refId> <attr> or get <refId> <attr>
Read an attribute such as text, class, bounds, x, y, or xpath.apps
List launcher apps from /apps.raw
Toggle raw JSON mode.vars
Show current URL, timeout, raw mode, and tree cache state.set timeout 30
Set the default wait timeout in seconds.h or help
Show the built-in help text.q or quit
Exit the REPL.agent-android --repl --url http://<device-ip>:8080.healthappsla <package>lt <refId>i <refId> hellobsappsla com.example.appllref 12x 12vx //EditText[@text='Search']i 7 --cleari 7 hello worldix //EditText[@text='Search'] --ix //EditText[@text='Search'] -- hello worldagent-android command fails, first check whether the AIVane app or phone-side API service has exited.agent-android is not found, run uv tool update-shell, reopen the terminal, and retry.curl http://<device-ip>:8080/health.health works but UI commands fail, run ss to force-refresh the tree before tapping or inputting.tx or ix fails, run vx <xpath> and make sure the XPath resolves to exactly one runtime match.Stop and ask for user help when: