Agent+P: Guiding UI Agents via Symbolic Planning
Organizations: University of Notre Dame · Arizona State University
Abstract
Large Language Model (LLM)-based UI agents show great promise for UI automation but often hallucinate in long-horizon tasks due to their lack of understanding of the global UI transition structure. To address this, we introduce AGENT+P, a novel framework that leverages symbolic planning to guide LLM-based UI agents. Specifically, we model an app's UI transition structure as a UI Transition Graph (UTG), which allows us to reformulate the UI automation task as a pathfinding problem on the UTG. This further enables an off-the-shelf symbolic planner to generate a provably correct and optimal high-level plan, preventing the agent from redundant exploration and guiding the agent to achieve the automation goals. AGENT+P is designed as a plug-and-play framework to enhance existing UI agents. Evaluation on the AndroidWorld benchmark demonstrates that AGENT+P improves the success rates of state-of-the-art UI agents by up to 14.32% and reduces the action steps by 37.70%. Our code is available at: https://github.com/KiteFlyKid/agentp.
Figures & tables
| Nodes | Edges | |||
|---|---|---|---|---|
| Agent | ||||
| DroidRun | 27.0 | 71.2 | 62.7 | 168.0 |
| LX-GUIAgent | 29.3 | 53.8 | 65.9 | 129.2 |
| AutoGLM | 39.4 | 42.0 | 90.6 | 100.3 |
| Finalrun | 23.8 | 55.0 | 59.5 | 125.6 |
| UI-Venus | 18.0 | 50.7 | 66.0 | 108.0 |
| UI Automation Notation | Classical Planning Equivalent |
|---|---|
| A UI state (UI) | A state where the predicate is true |
| The set of all UIs | The state space |
| The initial UI | The initial state , defined by |
| The target UI | The goal , specified by the condition |
| A UI transition via the edge with label | A planning action |
| Precondition: the app is on UI |
| User Task Execution | |||
|---|---|---|---|
| Approach | SR (%) | Steps | Time (s) |
| DroidRun | 15.91 | 5.18 | 33.38 |
| + Agent+P | 28.41 | 17.09 | 99.50 |
| MobileUse | 9.09 | 20.45 | 256.02 |
| + Agent+P | 11.36 | 19.61 | 219.28 |
| T3A | 24.32 | 17.89 | 114.39 |
| Component | Variant | SR (%) |
|---|---|---|
| UTG Builder | w/o Dynamic Update | 34.09 |
| Node Selector | w/o Embedding | 36.36 |
| w/o MLLM | 27.27 | |
| Plan Generator | DFS-based | 22.73 |
| BFS-based | 25.00 | |
| Agent+P (Full Method) | 38.64 | |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| App | Tasks | Nodes | Edges |
|---|---|---|---|
| VLC | 3 | 85 | 190 |
| Simple Calendar Pro | 17 | 24 | 25 |
| Tasks | 5 | 86 | 127 |
| Markor | 16 | 14 | 17 |
| OsmAnd | 3 | 152 | 508 |
| Method | SR (%) | Improvement |
|---|---|---|
| DroidRun | 77.59 | – |
| + Agent+P | 78.45 | +0.86 |
| MobileUse | 51.72 | – |
| + Agent+P | 62.93 | +11.21 |
| T3A | 62.07 | – |
| + Agent+P | 63.79 | +1.72 |
| Category | Content |
|---|---|
| Natural Language Instructions | — UTG Navigation Guide — Current UI: MainActivity — NAVIGATION PLAN FOR YOUR GOAL — Goal Analysis: Based on your goal, the system identified these target destinations: • ManageEventTypesActivity Confidence: 95% OPTIMAL PATH (Follow these steps in order): Step 1: Navigate from MainActivity to SettingsActivity Step 2: Navigate from SettingsActivity to ManageEventTypesActivity IMMEDIATE NEXT ACTION: on click the ImageView widget with content-description “more options” via API call “virtualinvoke r0.<android.content.Context: void startActivity(android.content.Intent)>(r1) ()” This will take you to: SettingsActivity Total steps in optimal path: 2 |
| Usage Tips | This path was computed using PDDL planning for guaranteed optimality — USAGE TIPS — • If a NAVIGATION PLAN is shown above, follow it step by step for optimal path • The plan was computed using formal PDDL planning algorithms • If no plan exists, the target is unreachable from current location • Some UI elements may not be visible - scroll if needed |
| Fallback | — ALL AVAILABLE NAVIGATION OPTIONS FROM HERE — • TO REACH: EventActivity on click ImageButton widget with content-description “New Event” via API call “virtualinvoke r0.<android.content.Context: void startActivity(android.content.Intent)>(r1) ()" • TO REACH: SettingsActivity on click Button widget with content-description “Settings” via API call “virtualinvoke r0.<android.content.Context: void startActivity(android.content.Intent)>(r1) ()" • TO REACH: TaskActivity on click ImageButton widget via api call “virtualinvoke r2.<android.content.Context: void startActivity(android.content.Intent)>( r3) ()” — End Navigation Guide — |