Add AndroidToolkit for mobile device automation via ADB #3804
+768
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds an Android toolkit for agent interaction with Android devices/emulators, as part of the broader effort to support OS-level environments for computer and mobile use. The originally proposed
UbuntuToolkitwas dropped since it duplicates the existingTerminalToolkit.AndroidToolkit
ADB-based toolkit providing 14 tools for device interaction:
get_device_info,execute_adb_command,get_current_activityinstall_app,uninstall_app,list_installed_apps,launch_apptap,swipe,long_press,input_text,press_keytake_screenshot,get_ui_hierarchy(viauiautomator dump)Supports multi-device targeting via
device_serialand configurable timeouts.Files changed
camel/toolkits/android_toolkit.py— new toolkitcamel/toolkits/__init__.py— exportAndroidToolkittest/toolkits/test_android_toolkit.py— 28 unit tests with mocked ADB subprocess callsOriginal prompt
This section details on the original issue you should resolve
<issue_title>[Feature Request] Add
ubuntuandandroidtoolkits and environments for computer and mobile use</issue_title><issue_description>### Required prerequisites
Motivation
Refer to:
Summary
Add full Ubuntu and Android execution environments—including toolkits, VMs/emulators, sandboxes, action/observation spaces, and orchestration—so CAMEL agents can operate across desktop and mobile ecosystems through GUI, API, or hybrid interaction modes.
This upgrade will enable richer multi-device autonomy and real-world agent behaviors.
Notes: some of the features are supported in https://github.com/camel-ai/camel/blob/master/camel/runtimes/ubuntu_docker_runtime.py and https://github.com/camel-ai/crab
🎯 Motivation
To build general autonomous agents, CAMEL needs platform-level environments where agents can interact with real operating systems, software, GUIs, and devices.
Right now, CAMEL lacks:
Adding Ubuntu and Android support unlocks significant new research and practical applications.
📦 Proposed Additions
1. Ubuntu Toolkit + Execution Environment
Ubuntu Toolkit Capabilities
Ubuntu VM / Sandbox / Runtime
Based on Ubuntu 22.04 LTS
Runs either as:
With optional GUI stack using:
Preinstalled Ubuntu Software
Potential defaults:
2. Android Toolkit + Execution Environment
Android Toolkit Capabilities
ADB commands
App installation/removal
Input simulation: tap, swipe, long press
Typing/text events
Screenshot + screen recording
UI hierarchy extraction
Intent launching and permission control
Optional UI automation via:
uiautomator2Appiumespresso(advanced)Android Execution Environment
Android Emulator (x86/ARM)
Sandbox with ADB bridge
Optional GUI access via:
Configurable:
3. Action and Observation Spaces (GUI / API / Hybrid)
Action Spaces
Agents should be able to choose actions across different modalities:
GUI-Based Actions
API-Based Actions
Hybrid Actions
Observation Spaces
4. Orchestration Layer for Runtimes and Emulators
Centralized orchestration for:
Possible orchestrator modes:
5. Integration of VNC / noVNC
Why
To give agents and developers GUI visibility.
What to integrate
ubuntuandandroidtoolkits and environments for computer and mobile use #3561✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.