Use 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://:8080 The public path is local-first:
http://:8080
If 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:
/health
apps if needed
Keep 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://:8080 Built-in help:
agent-android --helphUse the one-off CLI when you already know the exact action you want.
Connectivity:
agent-android --health --url http://:8080 Discovery:
agent-android --apps --url http://:8080 agent-android --list --url http://:8080 agent-android --id com.example:id/search --url http://:8080 agent-android --text Search --url http://:8080 agent-android --inputs --url http://:8080 agent-android --refId 7 --url http://:8080 agent-android --xpath 7 --url http://:8080 agent-android --get-attr 7 text --url http://:8080 Actions:
agent-android --launch com.xingin.xhs --url http://:8080 agent-android --tap 7 --url http://:8080 agent-android --input 7 "hello world" --url http://:8080 agent-android --swipe up --url http://:8080 agent-android --back --url http://:8080 agent-android --press home --url http://:8080 agent-android --screenshot --url http://:8080 Waiting and output:
agent-android --wait-for Search --timeout 30 --url http://:8080 agent-android --list --raw --url http://:8080 Use 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 or find
Filter by text or content description.
id
Filter by Android resource ID.
ref
Show the full element detail for one refId.
x or xpath
Generate XPath candidates and validate their runtime match counts.
xx
Tap by the best unique generated XPath candidate. Refuses ambiguous matches.
vx [idx] or validatex [idx]
Validate one XPath against the runtime. Optionally inspect one match by zero-based index.
t or tap
Tap the element center point from the current tree.
tx or tapx
Tap one runtime-resolved XPath target.
i or input
Input text into a refId target.
Use --clear or "" to clear instead of typing.
ix or inputx
Input text into one XPath target.
Use ix or --clear to clear the field.
sw [--dur N] [--dist N] or swipe ...
Swipe down/up/left/right with optional duration and distance.
p or press ...Press a system key.
b or back
Press Back.
la or launch
Launch an app by package name.
s [path] or screenshot [path]
Capture a screenshot to an auto-generated or explicit path.
wf [--t N] or waitfor ...
Wait for an element to appear.
g or get
Read an attribute such as text, class, bounds, x, y, or xpath.
apps
List launcher apps from /apps.
raw
Toggle raw JSON mode.
varsShow current URL, timeout, raw mode, and tree cache state.
set timeout 30Set 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://:8080 .healthappsla lt i hello bsappsla 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://: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 and make sure the XPath resolves to exactly one runtime match.
Stop and ask for user help when:
共 1 个版本