The growing deployment of compact large language models on smartphones is enabling autonomous on-device decision-making, such as emerging mobile GUI agents. However, many mobile decisions, such as network configuration when users switch apps or connectivity conditions change, must satisfy stringent latency constraints to preserve user experience. In this paper, we propose PEAM, an on-device LLM-based communication agent that autonomously generates personalized network-configuration rules executable within milliseconds. Specifically, PEAM first fine-tune the on-device LLM with a dataset constructed from manually annotated real-user data to integrate the communication knowledge into the local model. PEAM then operates in two phases. In the rule-generation phase, which is performed when the device is idle, such as overnight, PEAM analyzes historical network-configuration records in batches and reflects across batches to consolidate consistent evidence, reduce local bias, and derive robust configuration rules. To enable more accurate and stable rule generation over time, PEAM further constructs a user profile from high-confidence rules to capture the user's network preferences and incorporates this profile into each rule-generation cycle. In the rule-execution phase, PEAM is invoked when the communication context changes, such as when users switch apps or connectivity conditions change, and searches the rule library to identify and execute the appropriate rule. Experiments demonstrate that PEAM, based on a fine-tuned 4B model, achieves 99.13% correct network configuration decisions, while 92.50% of the rules generated by PEAM are valid, outperforming the traditional expert-rule based method by 4.41% and 84.50%, respectively.
Figures & tables
Figure 1: Modeling personalized mobile network configuration from historical decision records. PEAM infers why a user prefers a particular configuration and determines what configuration action should be executed.
Figure 2: Overview of PEAM. The framework contains four stages: (1) Record Acquisition collects user-initiated configuration records; (2) Periodic Update performs clustering, batch-wise record analysis, and cross-batch reflection to generate personalized rules; (3) User-Level Local Memory maintains the rule base and user profile; and (4) Real-Time Execution retrieves and executes matched rules without invoking the LLM.
Figure 3: Prompt template for Record Analysis. The yellow boxes contain fixed task and output constraints, the blue box contains the user profile generated in the previous update period, and the green box contains the semantic representations of the current records.
Method
Simulated User Dataset
Real User Dataset
Model Pricing
REA
RCR
TRR
JMS
REA
RCR
TRR
Input
Output
Expert Rules
94.72
6.06
8.00
22.15
48.68
2.92
2.56
-
-
Qwen3.5-Flash
86.58
25.93
56.86
51.90
74.99
12.49
51.35 (19/37)
0.028
0.278
Gemini-3-Flash
92.24
54.79
80.19
64.55
72.51
15.47
49.02 (25/51)
0.500
3.000
GPT-5.2
87.56
57.25
87.47
55.72
71.87
20.96
38.89 (14/36)
1.750
14.00
PEAM
99.13
60.58
92.50
81.32
72.34
25.86
38.10 (24/63)
-
-
Table 1: End-to-end performance on the simulated-user and real-user datasets, together with API pricing for the cloud-based LLM baselines. REA, RCR, and TRR are reported as percentages. Values in parentheses denote the number of triggered rules over the total number of generated rules. The Improvement row reports the absolute gain over the strongest baseline for each metric. Input and output prices are reported in USD per million tokens. Bold and underlined values denote the best and second-best results, respectively.
Method
Record Analysis
Reflection
User Profiling
SS
JMS
IT
SS
JMS
IT
SS
JMS
IT
Qwen3.5-Flash
0.7451
74.35
8.73
0.6577
66.91
7.34
0.8726
87.98
2.57
Gemini-3-Flash
0.6973
79.69
4.74
0.6433
64.88
17.31
0.8593
85.54
2.58
GPT-5.2
0.7418
81.06
13.80
0.8377
73.05
9.76
0.8582
89.89
6.59
PEAM
0.8361
86.68
15.64
0.8955
84.12
13.98
0.9112
87.10
5.31
Improvement
+0.0910
+5.62
-
+0.0578
+11.07
-
+0.0386
-
-
Table 2: Task-level performance on Record Analysis, Cross-Batch Consolidation, and User Profiling. IT is reported in seconds. The Improvement row reports the absolute gain over the strongest baseline for each metric. Bold and underlined values denote the best and second-best results, respectively.
Method
Record Analysis
Reflection
User Profiling
Real-time Execution
SS
JMS
IT
SS
JMS
IT
SS
JMS
IT
Retrieval Time
PEAM
0.8413
84.06
35.53
0.8563
75.21
32.62
0.8952
84.64
11.87
-
PEAM-Q
0.8132
80.80
33.17
0.8608
72.09
59.29
0.7991
64.56
8.950
0.5730
Table 3: Task-level performance of AndesVL-based PEAM under two deployment configurations. PEAM denotes the full-precision model evaluated on an NVIDIA A100 GPU, whereas PEAM-Q denotes the quantized model deployed on a smartphone. Inference time (IT) is reported in seconds, while retrieval time is reported in milliseconds.
Variant
REA
RCR
TRR
JMS
PEAM
99.13
60.58
92.50
81.32
- w/o Clustering
98.61
49.57
91.79
65.80
- w/o Reflection
92.44
67.96
43.21
70.43
- w/o User Profiling
97.36
61.31
85.26
75.27
Table 4: Ablation results for the major components of PEAM. REA, RCR, and TRR are reported as percentages.
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
Intent
Condition
Optimize cellular network usage for smooth meeting scenarios.
Table A1: Rule Conditions for Network Switching Intents
Figure A1: On-device deployment of PEAM.
Metric
Retrieval Time
Execution Time
Cellular-to-Cellular
Cellular-to-Wi-Fi
Time (ms)
0.573
614.2
93.57
Appendix
Table A2: Runtime of strategy retrieval and execution. All times are reported in milliseconds.
Intent
Objective Evaluation
Subjective Evaluation
Interview Results
When using Douyin at two regular home locations, prefer connecting to the home Wi-Fi network; switch to cellular data when Wi-Fi is unavailable.
—
—
When using Nike Run Club at home, prefer connecting to Wi-Fi.
—
—
At home, prefer connecting to the home Wi-Fi network regardless of the app being used.
—
—
PEAM Analysis Results
Switch to the cellular network when using Douyin or watching short videos at specific locations such as POI-1 and POI-2 to ensure a smooth viewing experience.
Fully Compliant (55)
Fully Compliant
Appendix
Table A3: Comparison Between User Interview Results and PEAM Analysis Results for User 001
Intent
Objective Evaluation
Subjective Evaluation
Interview Results
Use the China Mobile app for faster login; switch to the corresponding carrier SIM when opening the app, and switch back to Wi-Fi after login.
—
—
Connect to Wi-Fi when downloading apps from the app store to save cellular data.
—
—
Switch to the SIM 1 cellular network before using Alipay to ensure network stability.
—
—
Connect to the commonly used Wi-Fi network when entering a regular location.
—
—
Switch back to a more stable cellular network when Wi-Fi quality is poor.
—
—
Appendix
Table A4: Comparison Between User Interview Results and PEAM Analysis Results for User 002
Intent
Objective Evaluation
Subjective Evaluation
Interview Results
When using Xiaohongshu in the first regular area at home, prefer manually connecting to the home Wi-Fi network.
—
—
When using Bilibili in the first regular area at the office, prefer manually connecting to an available Wi-Fi network; switch to cellular when the network quality is poor.
—
—
PEAM Analysis Results
Connect to the cellular network when entering the company location.
Partially Compliant (2)
Not Mentioned
Habitually switch to Wi-Fi when using Xiaohongshu at the company location POI-1.
Partially Compliant (1)
Not Mentioned
Appendix
Table A5: Comparison Between User Interview Results and PEAM Analysis Results for User 003
Intent
Objective Evaluation
Subjective Evaluation
Interview Results
Prefer using SIM 1 for Douyin short videos, possibly because SIM 1 has sufficient cellular data.
—
—
Switch to SIM 2 for Douyin and TeamTalk when the SIM 1 network quality is poor.
—
—
Switch to the cellular network when Wi-Fi quality is poor while using apps such as Youdao Dictionary and WeChat.
—
—
Proactively switch to the cellular network before leaving a regular location, likely to avoid lag caused by weak signals near the edge of Wi-Fi coverage.
—
—
Connect to another phone’s hotspot for internet access during phone data backup or data migration.
—
—
Appendix
Table A6: Comparison Between User Interview Results and PEAM Analysis Results for User 004
Intent
Objective Evaluation
Subjective Evaluation
Interview Results
When cellular data becomes stuck, prefer switching to a Wi-Fi network with better signal quality to continue using apps.
—
—
Manually connect to the in-building Wi-Fi network at POI-1.
—
—
Prefer using the company Wi-Fi network when using TeamTalk at the office.
—
—
Use cellular data to access Tencent News when Wi-Fi is unavailable.
—
—
When playing DNF Mobile, switch to cellular data if the connected Wi-Fi network has poor quality.
—
—
Appendix
Table A7: Comparison Between User Interview Results and PEAM Analysis Results for User 005
Intent
Objective Evaluation
Subjective Evaluation
Interview Results
When using Douyin, switch to cellular data if the connected Wi-Fi network becomes stuck.
—
—
PEAM Analysis Results
Switch to the SIM 2 cellular network when the Wi-Fi user experience score is poor or relatively low to obtain a stable network connection.
Fully Compliant (4)
Partially Compliant
Switch to the cellular network when watching Douyin live streams on holiday mornings to ensure smooth viewing and avoid lag.
Partially Compliant (2)
Partially Compliant
Connect to SSID-1 at POI-1.
Fully Compliant (9)
Not Mentioned
Appendix
Table A8: Comparison Between User Interview Results and PEAM Analysis Results for User 006
Category
Features
Spatiotemporal Context
Timestamp, POI, geofence
Foreground Application
App package name, app scene, app foreground dwell time, app-scene foreground dwell time
Network Access Status
Network access type, data SIM slot, PLMN, roaming status
Large Language Model (LLM) agents have moved beyond generating responses to executing multi-step tasks by calling tools, observing the results, and iteratively deciding the next action. Most agent systems run on desktops or servers, which support tool use and task automation. Mobile devices are also important agent environments because they are widely accessible and contain users' data, sensors, and daily-use applications. Existing mobile agents mainly operate smartphones through graphical user interface (GUI) actions such as tapping, swiping, and typing, which often form long, interface-dependent sequences, cannot directly access device capabilities, and make execution boundaries difficult to define. We present PalmClaw, an open-source agent framework that runs natively on mobile phones and manages the sessions, memory, skills, tools, and agent loop directly on the device. PalmClaw exposes device capabilities as device tools with explicit arguments, structured results, and clearly defined execution boundaries. This design enables agents to use mobile capabilities directly while keeping each action explicit and controlled. Experiments show an 11.5% relative improvement in task success and a 94.9% reduction in completion time over the strongest baseline, with lower setup burden and traces illustrating how execution boundaries are applied. Code is available at https://github.com/ModalityDance/PalmClaw.
Hongru Cai, Yongqi Li, Ran Wei +1
The Hong Kong Polytechnic University · Hangzhou Diagens Biotechnology Co., Ltd.
Large language models (LLMs) on mobile devices can act as agents that call external software tools to complete complex tasks, but the major challenge of supporting on-device mobile agentic AI with LLMs is the long latency of LLM tool calling on mobile devices. In particular, the decode phase is the main contributor of such long latency, but is hard to speed up on mobile processors as it is bound by memory bandwidth rather than compute power. To address this limitation, in this paper we present SchemaWeaver, a new on-device mobile agentic AI technique that enforces schema-guided parallel decoding in the decode phase of LLM tool calling, to reduce its latency by producing multiple tokens in each decode pass. SchemaWeaver can be generically applied to the LLM inference engine on mobile devices without involving any training efforts or changes on LLMs, and our experiment results on major mobile SoCs and LLM families show that SchemaWeaver can reduce the LLM tool calling latency by up to 3.9 times, compared to the competitive baselines.
Large language model (LLM) agents are increasingly attractive for automating network configuration, yet their reliability and failure patterns are poorly understood. An essential prerequisite is to assess such agents in a realistic but risk-free environment. Existing benchmarks, however, fall short: they often treat configuration as static command generation or rely on overly simplified settings. Such evaluations understate the core challenges of network configuration, where correctness requires reasoning about protocol complexity and topology dependence. We present NetConfArena, an executable benchmark for evaluating LLM agents in closed-loop network configuration. NetConfArena places agents in emulated multi-device networks, provides a standardized and compact action interface for task execution, and evaluates the resulting network behavior with hidden task-specific executable test cases. The benchmark relies on an LLM-assisted, emulation-grounded pipeline, which converts human-oriented network materials into reusable parameterized task templates. We evaluate representative LLM agents on 480 task instances instantiated from 96 protocol-focused task templates, yielding 3840 execution trajectories, and show that failures are not limited to command errors. The failures also reveal gaps in task-specification adherence and robust planning and execution. These findings suggest two future directions: using validated trajectories as supervision signals to improve foundation models, and designing harness mechanisms that make agent execution more reliable and accountable.
Chang Liu, Xiaohui Xie, Xinyi Chen +1
Department of Computer Science and Technology, Tsinghua University, Beijing, China