An Android-native autonomous agent that uses vision-language models to see and operate your phone — no PC or ADB required. Inspired by X-PLUG/MobileAgent.
Kotlin
55
14 commits
updated May 31, 2026
User Instruction
|
v
+-----------+ +------------------+ +-------------------+
| Screenshot | --> | Manager (Plan) | --> | Executor (Action) |
| + UI Det | | Create/update | | Select next |
| | | task subgoals | | atomic action |
+-----------+ +------------------+ +-------------------+
^ |
| v
+-----------+ +-------------+
| Notetaker | <---- (on success) <---- | Reflector |
| Extract | | Compare |
| info | | before & |
+-----------+ | after |
+-------------+
Each iteration captures a screenshot, detects interactive UI elements via the Accessibility API, and feeds annotated images to a vision-language model. The agent loop runs up to a configurable number of steps (default 25) and supports automatic error recovery with replanning.
| Action | Description |
|---|---|
tap | Single tap at coordinates |
long_press | Long press with configurable duration |
swipe | Swipe gesture between two points |
type | Text input to focused field |
system_button | Back / Home / Enter |
answer | Return answer to user |
wait | Pause before next action |
finished | Mark task complete |
app/src/main/java/com/mobileagent/app/
├── agent/ # Core agent loop & phases (Manager, Executor, Reflector, Notetaker)
├── api/ # LLM API clients (OpenAI-compatible, Anthropic Claude)
├── controller/ # Device control (Accessibility, ScreenCapture, UI detection)
├── service/ # Android services (Accessibility, Foreground, FloatingWindow)
├── data/ # Preferences (DataStore)
├── ui/ # Jetpack Compose UI (screens, navigation, theme)
└── util/ # Helpers (JSON parsing, coordinate conversion, permission checks)
# Clone the repository
git clone https://github.com/<your-username>/MobileAgent-Android.git
cd MobileAgent-Android
# Build
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug
Grant permissions — Open the app and navigate to the Permissions tab. Enable:
Configure API — Go to Settings and enter:
gpt-4o, claude-sonnet-4-20250514)Run a task — On the Home screen, enter an instruction like "Open Settings and turn on Dark Mode", then tap Start.
| Component | Technology |
|---|---|
| Language | Kotlin 1.9 |
| UI | Jetpack Compose + Material 3 |
| Architecture | MVVM |
| Navigation | Compose Navigation |
| Networking | OkHttp 4 |
| Serialization | kotlinx.serialization |
| Preferences | Jetpack DataStore |
| Concurrency | Kotlin Coroutines |
| Min SDK | 26 (Android 8.0) |
| Target SDK | 34 (Android 14) |
| Permission | Purpose |
|---|---|
INTERNET | API communication |
FOREGROUND_SERVICE | Background agent execution |
FOREGROUND_SERVICE_MEDIA_PROJECTION | Screen capture service type |
SYSTEM_ALERT_WINDOW | Floating status window |
POST_NOTIFICATIONS | Foreground service notification (Android 13+) |
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS | Keep accessibility service alive |
| Accessibility Service | Perform taps, swipes, text input |
This project is an Android-native reimplementation inspired by the Mobile-Agent framework developed by Tongyi Lab, Alibaba Group.
Original repository: X-PLUG/MobileAgent
Paper (v1): Mobile-Agent: Autonomous Multi-Modal Mobile Device Agent with Visual Perception (Wang et al., 2024)
Paper (v2): Mobile-Agent-v2: Mobile Device Operation Assistant with Effective Navigation via Multi-Agent Collaboration (Wang et al., 2024)
The original Mobile-Agent runs as a Python script controlling the phone via ADB from a desktop. This project reimplements the core ideas as a standalone Android app — no PC or ADB connection required.
This project actively participates in and acknowledges the LINUX.DO community. Thanks to the community members for their feedback and support.
MIT License. See LICENSE for details.
14 commits
Kotlin
92.9%
C++
5.8%
CMake
1.4%
An Android-native autonomous agent that uses vision-language models to see and operate your phone — no PC or ADB required. Inspired by X-PLUG/MobileAgent.
Kotlin
55
14 commits
updated May 31, 2026
User Instruction
|
v
+-----------+ +------------------+ +-------------------+
| Screenshot | --> | Manager (Plan) | --> | Executor (Action) |
| + UI Det | | Create/update | | Select next |
| | | task subgoals | | atomic action |
+-----------+ +------------------+ +-------------------+
^ |
| v
+-----------+ +-------------+
| Notetaker | <---- (on success) <---- | Reflector |
| Extract | | Compare |
| info | | before & |
+-----------+ | after |
+-------------+
Each iteration captures a screenshot, detects interactive UI elements via the Accessibility API, and feeds annotated images to a vision-language model. The agent loop runs up to a configurable number of steps (default 25) and supports automatic error recovery with replanning.
| Action | Description |
|---|---|
tap | Single tap at coordinates |
long_press | Long press with configurable duration |
swipe | Swipe gesture between two points |
type | Text input to focused field |
system_button | Back / Home / Enter |
answer | Return answer to user |
wait | Pause before next action |
finished | Mark task complete |
app/src/main/java/com/mobileagent/app/
├── agent/ # Core agent loop & phases (Manager, Executor, Reflector, Notetaker)
├── api/ # LLM API clients (OpenAI-compatible, Anthropic Claude)
├── controller/ # Device control (Accessibility, ScreenCapture, UI detection)
├── service/ # Android services (Accessibility, Foreground, FloatingWindow)
├── data/ # Preferences (DataStore)
├── ui/ # Jetpack Compose UI (screens, navigation, theme)
└── util/ # Helpers (JSON parsing, coordinate conversion, permission checks)
# Clone the repository
git clone https://github.com/<your-username>/MobileAgent-Android.git
cd MobileAgent-Android
# Build
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug
Grant permissions — Open the app and navigate to the Permissions tab. Enable:
Configure API — Go to Settings and enter:
gpt-4o, claude-sonnet-4-20250514)Run a task — On the Home screen, enter an instruction like "Open Settings and turn on Dark Mode", then tap Start.
| Component | Technology |
|---|---|
| Language | Kotlin 1.9 |
| UI | Jetpack Compose + Material 3 |
| Architecture | MVVM |
| Navigation | Compose Navigation |
| Networking | OkHttp 4 |
| Serialization | kotlinx.serialization |
| Preferences | Jetpack DataStore |
| Concurrency | Kotlin Coroutines |
| Min SDK | 26 (Android 8.0) |
| Target SDK | 34 (Android 14) |
| Permission | Purpose |
|---|---|
INTERNET | API communication |
FOREGROUND_SERVICE | Background agent execution |
FOREGROUND_SERVICE_MEDIA_PROJECTION | Screen capture service type |
SYSTEM_ALERT_WINDOW | Floating status window |
POST_NOTIFICATIONS | Foreground service notification (Android 13+) |
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS | Keep accessibility service alive |
| Accessibility Service | Perform taps, swipes, text input |
This project is an Android-native reimplementation inspired by the Mobile-Agent framework developed by Tongyi Lab, Alibaba Group.
Original repository: X-PLUG/MobileAgent
Paper (v1): Mobile-Agent: Autonomous Multi-Modal Mobile Device Agent with Visual Perception (Wang et al., 2024)
Paper (v2): Mobile-Agent-v2: Mobile Device Operation Assistant with Effective Navigation via Multi-Agent Collaboration (Wang et al., 2024)
The original Mobile-Agent runs as a Python script controlling the phone via ADB from a desktop. This project reimplements the core ideas as a standalone Android app — no PC or ADB connection required.
This project actively participates in and acknowledges the LINUX.DO community. Thanks to the community members for their feedback and support.
MIT License. See LICENSE for details.
14 commits
Kotlin
92.9%
C++
5.8%
CMake
1.4%