MemGUI-Agent:一种具备主动上下文管理的端到端长距离移动式GUI代理工具
MemGUI-Agent: An End-to-End Long-Horizon Mobile GUI Agent with Proactive Context Management
摘要
基于MLLM的移动GUI代理在短期任务上取得了显著进展,但在需要保留多个步骤和应用转换过程中的中间信息的长期任务上仍然不可靠。我们认为这种局限性源于ReAct式提示方式——这种方式会被动地积累每个步骤的信息,导致提示信息过多,关键的信息被稀释掉。为了解决这一问题,我们提出了MemGUI-Agent,这是一种具有主动上下文管理功能的端到端长期移动GUI代理。MemGUI-Agent基于Context-as-Action(ConAct)机制构建,该机制将上下文管理视为与选择UI操作相同的策略所发出的核心操作。与被动地添加历史信息不同,ConAct保留了三个结构化的上下文字段:折叠后的操作历史、折叠后的UI状态以及最近的步骤记录,从而能够保存重要的UI信息,同时保持上下文的简洁性。为了让主动上下文管理能够在不同模型规模下被学习到,我们构建了MemGUI-3K数据集,该数据集包含2,956个轨迹数据,并带有完整的ConAct注释,可用于监督式训练和离线分析。在MemGUI-3K数据集上训练8B规模的模型后,得到了MemGUI-8B-SFT模型,该模型在MemGUI-Bench测试集上达到了最佳的8B性能,并且还能适用于MobileWorld测试集中的非分布性情况。代码、数据和训练好的模型都可以在https://memgui-agent.github.io/获取。
English Abstract
MLLM-based mobile GUI agents have made substantial progress on short-horizon tasks, yet remain unreliable on long-horizon tasks that require retaining intermediate facts across many steps and app transitions. We attribute this limitation to ReAct-style prompting, which passively accumulates per-step records, leading to prompt explosion and dilution of critical cross-app facts. To address this, we introduce MemGUI-Agent, an end-to-end long-horizon mobile GUI agent with proactive context management. MemGUI-Agent is built on Context-as-Action (ConAct), which casts context management as first-class actions emitted by the same policy that selects UI actions. Instead of passively appending history, ConAct maintains three structured context fields: folded action history, folded UI state, and recent step record, preserving critical UI facts while keeping context compact. To make proactive context management learnable across model scales, we construct MemGUI-3K, a 2,956-trajectory dataset with full ConAct annotations for supervised training and offline analysis. Training an 8B model on MemGUI-3K produces MemGUI-8B-SFT, an 8B MemGUI-Agent that achieves the best open-data 8B performance on MemGUI-Bench and generalizes to the out-of-distribution MobileWorld benchmark. Code, data, and trained models will be released at https://memgui-agent.github.io/.