Skip to main content

@tool decorated Android control for Strands Agents

Project description

Strands ADB

strands-adb 🤖

Give your agent a phone.

PyPI Docs License

@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

Screen Recording guide

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

Full actions guide

Docs

Safety

  • Dry-run mode for destructive ops
  • Allowlist/denylist for package operations
  • No plaintext PIN/password storage
  • Full audit logging of every adb invocation

Safety guide

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strands_adb-0.19.2.tar.gz (110.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strands_adb-0.19.2-py3-none-any.whl (80.0 kB view details)

Uploaded Python 3

File details

Details for the file strands_adb-0.19.2.tar.gz.

File metadata

  • Download URL: strands_adb-0.19.2.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

Hashes for strands_adb-0.19.2.tar.gz
Algorithm Hash digest
SHA256 4dd9c047154f7faec6d89d3d8f6f1e6b3c47db29680b91e18a4a46be452d7463
MD5 21c1e56fa4ed6301dc62dbab1c75a471
BLAKE2b-256 7de5cc1dab2f3d1b6ff81326f200acef6173aa2556d3e266db5ff5721e8627ee

See more details on using hashes here.

File details

Details for the file strands_adb-0.19.2-py3-none-any.whl.

File metadata

  • Download URL: strands_adb-0.19.2-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

Hashes for strands_adb-0.19.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e80efadc2edd0058f6189f68f5436a6555564ed429dc4a61c6259e24f91e1d1e
MD5 2f3e9f4c1d86d09245aa63c0e375c809
BLAKE2b-256 53884d09d9f7effdf516f6a1377bc257372cf95baced87871b39f8b11c6c460d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page