agentdev
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ADB_BIN | No | Explicit path to an adb binary for the binary backend. Auto-detected when unset. | |
| ANDROID_SERIAL | No | Target Android device serial. Defaults to the first online device. | |
| AGENTDEV_SERIAL | No | Target Android device serial. Defaults to the first online device. | |
| AGENTDEV_UI_TTL | No | Seconds the UI hierarchy cache remains valid. | 1.5 |
| AGENTDEV_WORKDIR | No | Directory where screenshots and pulled files are written. | ~/.agentdev/out |
| ADB_SERVER_SOCKET | No | Where the adb server listens, e.g. tcp:127.0.0.1:5037. | tcp:127.0.0.1:5037 |
| AGENTDEV_ADB_HOST | No | Host where the adb server listens. | 127.0.0.1 |
| AGENTDEV_ADB_PORT | No | Port where the adb server listens. | 5037 |
| AGENTDEV_DEVICE_TMP | No | On-device scratch directory. | /data/local/tmp |
| AGENTDEV_MAX_OUTPUT | No | Maximum characters returned to the model per call. | 24000 |
| AGENTDEV_SHELL_TIMEOUT | No | Seconds allowed per shell call. | 60 |
| AGENTDEV_ALLOW_DANGEROUS | No | Set to 1 to unlock destructive tools gated behind --allow-dangerous. Defaults to 0 for read-only agents. | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Android device control via adb. Start with device_list/doctor, then use ui_dump to read the screen, tap_text/ui_find to act, logcat_dump and logcat_crashes to debug, shell_exec for anything else.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| doctorA | Check the runtime environment: adb backend, server reachability, device authorisation, key tools on the device. Run this first when anything fails. |
| device_listA | List Android devices visible to the adb server with their state. |
| device_selectB | Target one device by serial when several are connected. |
| adb_connectB | Attach a device over TCP/IP (wireless debugging): 'CONNECT phone:5555'. |
| device_infoA | Core hardware/OS identity of the target device (model, Android version, ABI, screen size/density, uptime, root state). |
| batteryB | Battery level, charging state, temperature and health. |
| net_infoA | IP addresses, Wi-Fi state, and default route of the device. |
| shell_execA | Run an arbitrary shell command on the device (run-as-shell of the adb user). Returns exit code, stdout, stderr. Destructive by definition. |
| file_lsB | List a directory on the device (path, size, mode). |
| file_pullA | Copy a file from the device to the local machine (host running agentdev). |
| file_pushB | Copy a local file to the device (e.g. an APK, config, or test asset). |
| logcat_dumpA | Read recent Android log entries, filtered by level/tag/pid/keyword. Use for debugging runtime behaviour without blocking on a live stream. |
| logcat_crashesB | Extract Java exceptions, ANRs, native crashes and 'Force finishing activity' lines. Optionally scope to one package. |
| ui_dumpA | Dump the accessibility hierarchy: every element with text, resource-id, bounds and tap centre. This is how you 'see' the screen. |
| ui_findA | Search the current screen for elements by text / resource-id / content-desc / class / clickable, without tapping. Returns tap coordinates. |
| tapB | Tap absolute screen coordinates. |
| tap_textA | Find an element by its visible text (or resource-id) and tap its centre. |
| swipeB | Swipe/scroll between two points. |
| long_pressB | Long-press a coordinate (context menus, drag handles). |
| input_textA | Type text into the focused field (uses adb input text). |
| key_eventB | Send a hardware key: home, back, recent, enter, delete, wakeup, sleep, volume_up/down, power, tab, space, escape, or a raw keycode number. |
| screenshotB | Capture a PNG screenshot and save it on the host running agentdev. |
| screen_stateB | Screen power state, lock state and current resolution. |
| app_startA | Launch an app by package name (resolves its launcher activity automatically). |
| app_stopA | Force-stop a running app (destructive: kills its state). |
| app_currentA | Which app/activity currently has focus. |
| app_listA | List installed packages, optionally filtered by name and whether they are third-party or system apps. |
| package_infoB | Version, install path, target SDK, permissions of a package. |
| app_installB | Install an APK from the host onto the device (adb install -r). |
| open_urlC | Open a URL in the device's default browser. |
| intent_sendC | Send a custom intent / broadcast / service (am start|broadcast|startservice). |
| ui_waitB | Wait until an element appears (or disappears) instead of guessing with sleeps. Polls the hierarchy until the criteria match or |
| scroll_toA | Swipe until an element becomes visible (up to max_swipes), then report its tap coordinates. No-op if it is already on screen. |
| device_unlockA | Wake the screen and dismiss the keyguard (optionally entering a PIN/password). Run this after a screen-off or lock timeout, before ui_dump. |
| device_waitA | Block until a device reaches state 'device' (use after adb_connect / reboots). |
| logcat_watchA | Stream logcat for a fixed window (max |
| settings_getA | Read an Android setting: namespace global | system | secure, key e.g. screen_brightness, airplane_mode_on, font_scale, location_mode. |
| settings_setA | Change an Android setting (e.g. brightness, stay-awake, font scale). Modifies device state — use only when the user asked for it. |
| file_readA | Read a small text file from the device (config, log, prefs export). |
| file_deleteC | Delete a file or directory on the device. |
| app_clear_dataB | Wipe an app's data and cache (pm clear) — resets it to a fresh-install state. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 41 tools
Most tools have clearly distinct purposes, and descriptions give good guidance. Some overlap remains within the hierarchy group (ui_dump, ui_find, ui_wait, scroll_to, tap_text) and the device-status group (device_info, battery, net_info, screen_state), though context usually disambiguates them.
Most names use domain prefixes (device_, file_, app_, ui_, settings_, logcat_), but word order is inconsistent (device_list vs open_url vs settings_get) and several tools are bare nouns or verbs (doctor, battery, tap, screenshot). The set is readable but not a single predictable convention.
41 tools is heavy for one server, well above the practical 3–15 range. Each maps to a real Android operation, but the surface is large enough to burden tool selection and could consolidate related status, file, and hierarchy helpers.
Coverage is broad: device lifecycle, files, apps, logs, settings, intents, input, and UI automation are all represented. Minor gaps include app uninstall, permission grant/revoke, reboot, and process/resource inspection, but core workflows are covered.