Mobilerun: Open-Source Framework for LLM-Based Mobile Automation
Mobilerun is an open-source framework that enables users to control Android and iOS devices with LLM agents, supporting automation through natural language commands, multiple model integrations, and various execution modes.
Framework Overview and Capabilities
Mobilerun is an open-source framework for controlling Android and iOS devices with LLM agents, enabling users to automate tasks through natural language commands. It supports integration with multiple models, including OpenAI, Anthropic, Gemini, and others, and allows automation via CLI, Docker, Python code, or a terminal UI. The framework also provides tools for extending agent capabilities, such as custom tools, structured output, and app cards. It combines accessibility trees with screenshots for visual understanding and supports tracing execution with platforms like Arize Phoenix or Langfuse. For users who prefer local control, Mobilerun Framework is ideal, offering runtime on their own machine. In contrast, Mobilerun Cloud provides hosted real or virtual devices, API workflows, and managed device operations. ADB-only mode is also supported for Android control, enabling actions like tapping, swiping, and taking screenshots through ADB commands.
Installation and Setup Instructions
To install and set up Mobilerun, use the uv tool with the command uv tool install mobilerun for CLI usage or uv pip install mobilerun for CLI + Python integration. For Anthropic support, install the optional extra with uv tool install "mobilerun[anthropic]". After installation, run mobilerun setup and mobilerun configure to initialize the framework. To execute a task, use mobilerun run "Open settings and turn on dark mode". Before starting, ensure ADB is installed and an Android device has Developer options and USB debugging enabled. Install the Mobilerun Portal app on the device to enable accessibility service and prepare it for local control. Verify the setup with mobilerun ping, which should return Portal is installed and accessible. For wireless debugging on Android 11+, enable Wireless Debugging in Developer options, note the IP address and port, and pair the device using adb pair IP:PAIRING_PORT and the pairing code. For iOS, install the CLI via Homebrew or the installation script, list the iPhone UDID with mobilerun-ios list, and start local mode with mobilerun-ios --local .
Execution Modes and Automation Features
The mobilerun framework supports multiple execution modes and automation features tailored for Android and iOS devices. Users can issue commands like mobilerun run "Open the settings app and tell me the Android version" to perform tasks, with options such as --vision for visual recognition or --reasoning for complex actions like sending emails. The --ios flag enables iOS-specific commands, while --steps and --debug allow for detailed control and troubleshooting.
Vision mode can be activated with --vision, sending screenshots to the LLM, or using --vision-only for apps without accessibility tree data. Cloud device types include Personal (user-owned hardware), Cloud Phone (Hosted) (scalable automation), and Physical Phone (Hosted) (for high authenticity workflows). The mobile-harness skill allows coding agents like Claude Code or Codex to control devices directly.
iOS connections differ from Android, relying on a local HTTP API (port 8080 by default) and mobilerun-ios backed by WebDriverAgent. Custom ports must be explicitly passed with --device http://127.0.0.1:18080 due to auto-discovery limitations. Authentication issues or non-auto-discovered servers require manual URL input.
Cloud and Device Management
The Mobilerun project offers a cloud-based solution for managing mobile devices, enabling users to control both local and cloud-hosted virtual or physical phones through managed infrastructure and API-driven workflows. According to github.com and github.com, Mobilerun Cloud is ideal for scenarios requiring managed devices, fleet workflows, or cloud APIs without the need to run an agent locally. Users can execute commands such as taking screenshots on iOS devices using the mobilerun run command, with the option to specify a server URL explicitly, as noted in docs.mobilerun.ai. For persistent device management, mobilerun.ai describes the deployment of an agent on Android or iOS using Connect and eSIM. The platform also provides a REST API for device layer management, as outlined in mobilerun.ai. mobilerun.ai highlights the scalability of the service, allowing users to start free and run up to 100 phones simultaneously in self-serve mode, with enterprise options available for larger needs.
Security and Contribution Practices
The mobilerun project emphasizes security and contribution practices by integrating tools like bandit and safety scan to identify potential vulnerabilities before changes are submitted, as outlined in Security Checks (github.com). The project supports cross-platform mobile automation for both Android and iOS, with flexibility in LLM providers and the ability to combine visual and accessibility data for more accurate automation, according to Key features (x.com). For macOS users, setup requires Xcode, a signed iPhone with Developer Mode enabled, and the mobilerun-ios tool, as detailed in macOS with Xcode installed (docs.mobilerun.ai). The project also includes specialized agents for messaging platforms, social media, and web services, as described in Messenger Agent (mobilerun.ai) and Google Search Agent (mobilerun.ai). The project is open-source and licensed under the MIT license.
Sources and reporting notes
Based on published source material. No independent hands-on testing is claimed.