johnmalek312 edb55c99c3 feat: graceful device disconnect handling with DeviceDisconnectedError
Add DeviceDisconnectedError to the driver layer so cloud device
disconnects (409/timeout/connection errors) propagate cleanly instead
of crashing the workflow or being silently swallowed.

- CloudDriver: add max_retries=4 (~7.5s backoff), wrap all SDK calls
  via _call() helper that translates ConflictError/APIConnectionError/
  APITimeoutError into DeviceDisconnectedError, remove 7 silent
  try/except blocks that returned fake values on failure
- StateProvider: let DeviceDisconnectedError bypass retry loop; fix
  pre-existing bug where `from last_error` used str instead of exception
- DroidAgent: catch DeviceDisconnectedError in run_manager and
  execute_task, finalize with success=False and clear reason
- FastAgent/CodeActAgent: re-raise DeviceDisconnectedError from
  screenshot and get_state try/except blocks
- ManagerAgent/StatelessManagerAgent: re-raise DeviceDisconnectedError
  from screenshot; use shared_state.device_date (fetched once at
  startup) instead of calling get_date() every step
2026-02-20 18:22:35 +11:00
2026-02-19 12:03:24 +01:00
2026-01-29 10:08:24 +01:00
2025-11-01 01:26:13 +01:00
2025-10-22 22:19:18 +11:00
2025-10-25 22:00:16 +11:00
2025-11-10 21:44:34 +11:00
2025-11-01 16:44:34 +01:00
2025-04-15 10:39:41 +02:00
2025-10-13 10:37:39 +11:00
2025-10-09 07:08:45 +11:00

DroidRun is a powerful framework for controlling Android and iOS devices through LLM agents. It allows you to automate device interactions using natural language commands. Checkout our benchmark results

Why Droidrun?

  • 🤖 Control Android and iOS devices with natural language commands
  • 🔀 Supports multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama, DeepSeek)
  • 🧠 Planning capabilities for complex multi-step tasks
  • 💻 Easy to use CLI with enhanced debugging features
  • 🐍 Extendable Python API for custom automations
  • 📸 Screenshot analysis for visual understanding of the device
  • 🫆 Execution tracing with Arize Phoenix

📦 Installation

Note: Python 3.14 is not currently supported. Please use Python 3.11 3.13.

pip install droidrun

🚀 Quickstart

Read on how to get droidrun up and running within seconds in our docs!

Quickstart Video

🎬 Demo Videos

  1. Accommodation booking: Let Droidrun search for an apartment for you

    Droidrun Accommodation Booking Demo


  1. Trend Hunter: Let Droidrun hunt down trending posts

    Droidrun Trend Hunter Demo


  1. Streak Saver: Let Droidrun save your streak on your favorite language learning app

    Droidrun Streak Saver Demo

💡 Example Use Cases

  • Automated UI testing of mobile applications
  • Creating guided workflows for non-technical users
  • Automating repetitive tasks on mobile devices
  • Remote assistance for less technical users
  • Exploring mobile UI with natural language commands

👥 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Security Checks

To ensure the security of the codebase, we have integrated security checks using bandit and safety. These tools help identify potential security issues in the code and dependencies.

Running Security Checks

Before submitting any code, please run the following security checks:

  1. Bandit: A tool to find common security issues in Python code.

    bandit -r droidrun
    
  2. Safety: A tool to check your installed dependencies for known security vulnerabilities.

    safety scan
    
S
Description
No description provided
Readme MIT 109 MiB
Languages
Python 96.6%
Jinja 3.3%