@tool decorated Android control for Strands Agents
Project description
@tool decorated Android control for Strands Agents & DevDuck.
Drive any adb-connected Android device (phone / tablet / emulator) from an LLM — let your agent text people, read notifications, launch apps, take screenshots, drive the UI, take physical photos, stream logcat events, mutate settings.
📘 Full docs: cagataycali.github.io/strands-adb
Install
pip install strands-adb
brew install android-platform-tools # or apt / pacman / winget
Enable USB debugging on your phone, plug it in, accept the trust dialog.
adb devices
# 59230DLCH0012Z device
Quickstart
from strands import Agent
from strands_adb import adb
agent = Agent(tools=[adb])
agent("take a screenshot of my phone and describe what's on screen")
DevDuck (1 line)
export DEVDUCK_TOOLS="strands_adb:adb;strands_tools:shell"
devduck "open whatsapp and read the last message from mom"
👁️ Agent can SEE the screen
screenshot returns a proper Converse API image block — the same format as strands_tools.image_reader. The agent doesn't just get a file path, it actually receives the pixels and reasons over them:
agent("take a screenshot and tell me what app is open")
# → adb(action="screenshot") returns PNG bytes in Converse image block
# → vision model reads it → "You're on the WhatsApp chat with Mom..."
Disable with include_image=False if you just want the file path.
🎬 Record What The Agent Does
Non-blocking screen recording — start before the agent acts, stop after. Review the video to see what actually happened.
adb(action="screen_record_start", output_path="/tmp/run.mp4")
agent("open whatsapp and reply to mom") # agent works while recording
result = adb(action="screen_record_stop")
print(result["merged_path"]) # single mp4, auto-stitched past 180s
90+ Actions, One Tool
| Domain | Actions |
|---|---|
| Device | list, select, info, battery, wake, unlock |
| UI | tap, swipe, type, key, gestures, smart_tap |
| Screen | screenshot (image block), screen_record, screen_record_start/stop (bg), frames, ui_dump, ui_find |
| Apps | list, launch, kill, install, uninstall, clear_data |
| Files | push, pull, ls |
| Intents | open_url, share_text, start_activity |
| Camera | camera_photo (image block), camera_video |
| Sensors | accelerometer, gyro, light, pressure, step counter |
| Thermals | CPU / skin / battery / GPU / modem temps |
| Settings | brightness, ringer, airplane, bluetooth, any setting_put |
| Logs | logcat one-shot, log_stream → event_bus, notifications_parsed |
| A11y | enable services, captions, magnification, font scale |
| Comms | dial, sms_compose, media_control, volume |
Docs
- Installation
- Quickstart
- Connect a Device — USB / wireless / SSH
- Vision — screenshots as image blocks
- Smart Tap — semantic UI automation
- Camera — physical photos
- Logcat Streaming — event bus integration
- DevDuck Integration
- Safety — production hardening
- Examples — WhatsApp, notifications, autonomous
- Architecture
- API Reference
Safety
- Dry-run mode for destructive ops
- Allowlist/denylist for package operations
- No plaintext PIN/password storage
- Full audit logging of every adb invocation
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strands_adb-0.19.1.tar.gz.
File metadata
- Download URL: strands_adb-0.19.1.tar.gz
- Upload date:
- Size: 110.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48f675341380655cff8cf7a1ed8a4f60dbb67d3ed78254c4fbfe00cc7477b2af
|
|
| MD5 |
65fc4688cfc3162bb774c68fc53efcfd
|
|
| BLAKE2b-256 |
a9a82d5cbcca57dcdbbbb77c0d0b7955eb250d928fe4fefdf20a0f76755b3310
|
File details
Details for the file strands_adb-0.19.1-py3-none-any.whl.
File metadata
- Download URL: strands_adb-0.19.1-py3-none-any.whl
- Upload date:
- Size: 80.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c3bfb5396b68b683d403006ca025faf594f28d0e136179b6a4a584fa2710e79
|
|
| MD5 |
e2cd8b3a50cfa81b2e902e4e3502e92e
|
|
| BLAKE2b-256 |
28f5e09fdcae8990b9c6e1208f00736ba3afb6c8e00e030b4d195b66a6008e5d
|