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

[![Awesome Strands Agents](https://img.shields.io/badge/Awesome-Strands%20Agents-00FF77?style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjkwIiBoZWlnaHQ9IjQ2MyIgdmlld0JveD0iMCAwIDI5MCA0NjMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik05Ny4yOTAyIDUyLjc4ODRDODUuMDY3NCA0OS4xNjY3IDcyLjIyMzQgNTYuMTM4OSA2OC42MDE3IDY4LjM2MTZDNjQuOTgwMSA4MC41ODQzIDcxLjk1MjQgOTMuNDI4MyA4NC4xNzQ5IDk3LjA1MDFMMjM1LjExNyAxMzkuNzc1QzI0NS4yMjMgMTQyLjc2OSAyNDYuMzU3IDE1Ni42MjggMjM2Ljg3NCAxNjEuMjI2TDMyLjU0NiAyNjAuMjkxQy0xNC45NDM5IDI4My4zMTYgLTkuMTYxMDcgMzUyLjc0IDQxLjQ4MzUgMzY3LjU5MUwxODkuNTUxIDQxMS4wMDlMMTkwLjEyNSA0MTEuMTY5QzIwMi4xODMgNDE0LjM3NiAyMTQuNjY1IDQwNy4zOTYgMjE4LjE5NiAzOTUuMzU1QzIyMS43ODQgMzgzLjEyMiAyMTQuNzc0IDM3MC4yOTYgMjAyLjU0MSAzNjYuNzA5TDU0LjQ3MzggMzIzLjI5MUM0NC4zNDQ3IDMyMC4zMjEgNDMuMTg3OSAzMDYuNDM2IDUyLjY4NTcgMzAxLjgzMUwyNTcuMDE0IDIwMi43NjZDMzA0LjQzMiAxNzkuNzc2IDI5OC43NTggMTEwLjQ4MyAyNDguMjMzIDk1LjUxMkw5Ny4yOTAyIDUyLjc4ODRaIiBmaWxsPSIjRkZGRkZGIi8+CjxwYXRoIGQ9Ik0yNTkuMTQ3IDAuOTgxODEyQzI3MS4zODkgLTIuNTc0OTggMjg0LjE5NyA0LjQ2NTcxIDI4Ny43NTQgMTYuNzA3NEMyOTEuMzExIDI4Ljk0OTIgMjg0LjI3IDQxLjc1NyAyNzIuMDI4IDQ1LjMxMzhMNzEuMTcyNyAxMDMuNjcxQzQwLjcxNDIgMTEyLjUyMSAzNy4xOTc2IDE1NC4yNjIgNjUuNzQ1OSAxNjguMDgzTDI0MS4zNDMgMjUzLjA5M0MzMDcuODcyIDI4NS4zMDIgMjk5Ljc5NCAzODIuNTQ2IDIyOC44NjIgNDAzLjMzNkwzMC40MDQxIDQ2MS41MDJDMTguMTcwNyA0NjUuMDg4IDUuMzQ3MDggNDU4LjA3OCAxLjc2MTUzIDQ0NS44NDRDLTEuODIzOSA0MzMuNjExIDUuMTg2MzcgNDIwLjc4NyAxNy40MTk3IDQxNy4yMDJMMjE1Ljg3OCAzNTkuMDM1QzI0Ni4yNzcgMzUwLjEyNSAyNDkuNzM5IDMwOC40NDkgMjIxLjIyNiAyOTQuNjQ1TDQ1LjYyOTcgMjA5LjYzNUMtMjAuOTgzNCAxNzcuMzg2IC0xMi43NzcyIDc5Ljk4OTMgNTguMjkyOCA1OS4zNDAyTDI1OS4xNDcgMC45ODE4MTJaIiBmaWxsPSIjRkZGRkZGIi8+Cjwvc3ZnPgo=&logoColor=white)](https://github.com/cagataycali/awesome-strands-agents)

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"

MCP Server (Claude Code / Claude Desktop / Cursor / any MCP client)

Expose adb + recorder over the Model Context Protocol:

No install needed — just uvx:

# stdio mode (default) — for Claude Code / Claude Desktop
uvx strands-adb

# HTTP mode — multi-client, background-capable
uvx strands-adb --http --port 8000

Claude Code:

claude mcp add strands-adb -- uvx strands-adb

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "strands-adb": {
      "command": "uvx",
      "args": ["strands-adb"]
    }
  }
}
Prefer pip?
pip install "strands-adb[mcp]"
strands-adb-mcp                    # stdio
strands-adb-mcp --http --port 8000 # HTTP

Now any MCP client can control your Android device — screenshots, UI automation, app control, sensors, everything.


👁️ 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.4.tar.gz (116.3 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.4-py3-none-any.whl (84.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: strands_adb-0.19.4.tar.gz
  • Upload date:
  • Size: 116.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.11

File hashes

Hashes for strands_adb-0.19.4.tar.gz
Algorithm Hash digest
SHA256 0c406fef1ceef4aef97c78d11c96b2057abab8792d727dee021fcc54a4e4eea3
MD5 a43cc190c5e77f46835ee7ec3a46d2a5
BLAKE2b-256 4511591686892e9f178002e00bb224a03bd2af8eef4bd93d39b13dd977d86be6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for strands_adb-0.19.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b33165437dfea2e62db06cc8b9c98152f724aa7b8a875691275b423374b5ef50
MD5 f1b2a6cb933f01921556413422583dd6
BLAKE2b-256 79b48667aa861d599c88eff24149781b6cf76f49534ae58bd1a73405fda2e690

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