Under Submission

PowerLens: Taming LLM Agents for Safe and Personalized Mobile Power Management

Anonymous Authors

Under Double-Blind Review

Watch Demo App Overview

Abstract

What is PowerLens and why does it matter?

Battery life remains a critical challenge for mobile devices, yet existing power management mechanisms rely on static rules or coarse-grained heuristics that ignore user activities and personal preferences. We present PowerLens, a system that tames the reasoning power of LLMs for safe and personalized mobile power management on Android devices. The key idea is that LLMs' commonsense reasoning can bridge the semantic gap between user activities and system parameters, enabling zero-shot, context-aware policy generation that adapts to individual preferences through implicit feedback. PowerLens employs a multi-agent architecture that recognizes user context from UI semantics and generates holistic power policies across 18 device parameters. A PDL-based constraint framework verifies every action before execution, while a two-tier memory system learns individualized preferences from implicit user overrides through confidence-based distillation, requiring no explicit configuration and converging within 3–5 days. Extensive experiments on a rooted Android device show that PowerLens achieves 81.7% action accuracy and 38.8% energy saving over stock Android, outperforming rule-based and LLM-based baselines, with high user satisfaction, fast preference convergence, and strong safety guarantees, with the system itself consuming only 0.5% of daily battery capacity.

Demo Videos

See PowerLens in action on a real Android device.

Demo 1: Real-Time Power Management β€” PowerLens adapting policies in real time while playing music on Spotify.

Demo 2: Hidden Feature β€” Background Download Protection β€” Discovered by real users in our case study. Both devices start a download and lock the screen. Battery Saver kills it; PowerLens keeps it alive and completes successfully.

Why PowerLens?

Traditional power savers apply one-size-fits-all rules that degrade user experience. PowerLens understands context and learns what matters to each user.

Motivation: Traditional power saver vs PowerLens

Traditional power saver vs. PowerLens in a low-battery navigation scenario. Global rules degrade experience by throttling GPS and dimming brightness; PowerLens preserves app-critical resources and learned user preferences.

System Architecture

A multi-agent pipeline that observes, decides, validates, and learns from every interaction.

PowerLens system architecture

PowerLens system overview. Each cycle: ❶ Accessibility captures UI tree, ❷ Activity Agent recognizes context, ❸ Policy Agent generates strategy, ❹❺ Execution Agent verifies and applies via shell commands, ❻ Feedback Agent detects user overrides. The Memory System stores preferences for personalization.

Agent 1
Activity Agent

Recognizes current user activity from UI semantics and system state. Outputs activity type, sub-activity, criticality level, and a context signature for memory retrieval.

LLM Call
Agent 2
Policy Agent

Generates holistic power policies across 18 parameters with priority arbitration: STM user locks > LPM context rules > LPM general profile. Respects PDL safety constraints.

LLM Call
Agent 3
Execution Agent

Verifies each action against PDL constraints and device capabilities (LLM call 3), then generates root shell commands (LLM call 4). Two-stage design prevents hallucinated reasoning from leaking into commands.

2 LLM Calls
Agent 4
Feedback Agent

Detects user overrides via deterministic state differencing—no LLM needed. Writes override constraints to STM and logs events for the Extractor's analysis.

Deterministic

Two-Tier Memory System

Learning user preferences without asking—from short-term observations to long-term personal rules.

Memory system: STM to LPM promotion

Two-tier memory architecture: Short-Term Memory (STM) captures session-scoped state; the Extractor asynchronously distills consistent patterns into Long-term Personal Memory (LPM) via confidence-based promotion.

1

Observe

When a user manually overrides a setting (e.g., increases brightness after the system dimmed it), the Feedback Agent detects this via state differencing and logs a STRONG signal in STM.

2

Accumulate Confidence

The Extractor (async, LLM-powered) infers user intent and updates confidence: cnew = cold × λΔt + r, where λ=0.93 applies daily decay and r is the reward (+0.2 strong, +0.08 weak, −0.5 conflict).

3

Promote to LPM

When confidence exceeds τc=0.8 (typically 3 days of consistent behavior), the candidate is promoted to a stable context rule. The LLM generalizes patterns (e.g., "Saturday 9AM" + "Sunday 9AM" → "weekend morning").

4

Adapt to Change

If preferences shift, conflict signals rapidly erode the old rule (−0.5 per conflict). New candidates begin their own promotion cycle, and once promoted, replace the stale rule sharing the same context signature.

PowerLens App

A companion Android app that serves as the control center for PowerLens, built for rooted devices.

PowerLens app main screen

Main Dashboard

PowerLens app control panel

Parameter Controls

Live Dashboard

Real-time view of battery level, brightness, connectivity, CPU frequencies, and all monitored parameters at a glance.

Pipeline Monitor

Observe the 4-agent pipeline (Activity → Policy → Exec → Feedback) with live status indicators showing which agent is active.

Direct Controls

Manual control over 18+ device parameters across wireless, display, sensors, audio, and CPU categories—also used for testing and debugging.

Memory Management

Clear STM/LPM, dump logs, and manage the two-tier memory system. Supports data collection for evaluation experiments.

Tested Apps

PowerLens has been evaluated across 7 app categories covering 48 real-world usage tasks on 25 popular apps.

Navigation 4 apps · 8 tasks
Google Maps
Google Maps πŸ‡ΊπŸ‡Έ
Route navigation, real-time traffic, POI search
Baidu Maps
Baidu Maps πŸ‡¨πŸ‡³
Navigation, transit directions, local search
Amap
Amap πŸ‡¨πŸ‡³
Driving & walking navigation, ride-hailing
NAVITIME
NAVITIME πŸ‡―πŸ‡΅
Navigation, transit directions, route planning
Video 3 apps · 6 tasks
YouTube
YouTube πŸ‡ΊπŸ‡Έ
Video streaming, shorts, live streams
Bilibili
Bilibili πŸ‡¨πŸ‡³
Video watching, danmaku interaction, anime
Netflix
Netflix πŸ‡ΊπŸ‡Έ
Movie & TV series streaming, offline downloads
Meeting 4 apps · 7 tasks
Zoom
Zoom πŸ‡ΊπŸ‡Έ
Video/audio conferencing, screen sharing
Webex
Webex πŸ‡ΊπŸ‡Έ
Video/audio conferencing, screen sharing
Microsoft Teams
Microsoft Teams πŸ‡ΊπŸ‡Έ
Team collaboration, video calls, file sharing
Tencent Meeting
Tencent Meeting πŸ‡¨πŸ‡³
Video/audio conferencing, in-meeting chat
Social 4 apps · 7 tasks
Instagram
Instagram πŸ‡ΊπŸ‡Έ
Photo/video sharing, stories, reels
X
X (Twitter) πŸ‡ΊπŸ‡Έ
Microblogging, news feed, messaging
Weibo
Weibo πŸ‡¨πŸ‡³
Microblogging, trending topics, social feed
Xiaohongshu
Xiaohongshu πŸ‡¨πŸ‡³
Lifestyle sharing, reviews, shopping guides
Music 3 apps · 6 tasks
Spotify
Spotify πŸ‡ΈπŸ‡ͺ
Music streaming, playlists, podcasts
NetEase Cloud Music
NetEase Cloud Music πŸ‡¨πŸ‡³
Music streaming, lyrics, social comments
Deluxe Music HD
Deluxe Music HD πŸ‡©πŸ‡ͺ
Hi-fi music streaming, curated playlists
Content Feed 3 apps · 6 tasks
TikTok
TikTok πŸ‡¨πŸ‡³
Short video feed, trends, live streams
Reddit
Reddit πŸ‡ΊπŸ‡Έ
Community discussion, news aggregation
Zhihu
Zhihu πŸ‡¨πŸ‡³
Q&A platform, knowledge sharing, articles
Reading 4 apps · 8 tasks
WeRead
WeRead πŸ‡¨πŸ‡³
E-book reading, social reading, highlights
Dreame
Dreame πŸ‡ΈπŸ‡¬
Web novels, comics, serialized stories
Kindle
Kindle πŸ‡ΊπŸ‡Έ
E-book reading, dark/light mode, annotations
Yugto
Yugto πŸ‡΅πŸ‡­
E-books, audiobooks, serialized reading

25 apps · 7 categories · 48 tasks · 144 scenario instances (3 battery levels each)