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
Table 1: Average UTG node and edge counts. Headers compare app-specific success rate ( SRapp ) with the overall average ( SR ).
UI Automation Notation
Classical Planning Equivalent
A UI state (UI) u∈U
A state s∈S where the predicate at(u) is true
The set of all UIs U
The state space S
The initial UI uinit
The initial state sinit , defined by at(uinit)
The target UI utarget
The goal G , specified by the condition at(utarget)
A UI transition via the edge (ui,uj) with label a
A planning action
Precondition: the app is on UI ui
pre(a):at(ui)
Table 2: Mapping of UI automation notation to classical planning equivalent.
Figure 1: Overview of Agent+P .
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
Table 3: Agent+P compared with existing UI agents and traditional UI Automation approaches. We highlight the rows where Agent+P is integrated. SR is short for Success Rate.
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
Table 4: Ablation results for Agent+P .
Figure 2: Node Selector accuracy.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: Step-by-step case study.
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
Appendix
Table 5: Statistics of the AndroidWorld subset used in evaluation.
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
Appendix
Table 6: Performance of Agent+P and baselines on the full AndroidWorld benchmark.
Figure 4: Graphviz visualization of the UTG of Simple Calendar Pro in AndroidWorld. An activity is a unit of Android UI Google Developers (2025) . Edge labels are removed for visual clarity.
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 —
Appendix
Table 7: Example natural language prompt for the Simple Calendar Pro app with the task Add a new event type named ‘1-on-1 meeting’ .