Online reinforcement learning (RL) with verifiable rewards has driven rapid progress in mathematics, coding, and tool use, but scaling this success to GUI agents remains challenging due to the high cost of interactive environments and the scarcity of realistic training tasks. We introduce MAI-Gym, an open all-in-one platform that unifies GUI agent evaluation, data collection, and online RL training across mobile, computer, and web environments. Through a shared rollout pipeline, MAI-Gym ensures consistent agent behavior across evaluation and training, supports ten established benchmarks, and scales to 20,000 parallel environment instances. Beyond scalable infrastructure, MAI-Gym enables automated synthesis of diverse GUI applications and challenging tasks, including resettable mocked apps and coherent cross-app worlds with execution-validated task verifiers. Using MAI-Gym, we train MAI-Gym-9B, a unified 9B agent for mobile and computer use, achieving state-of-the-art performance among open GUI agents under 10B parameters: 78.4% on MobileWorld and 76.2% on OSWorld-Verified. Importantly, RL in a mocked train-ticketing app transfers to its real-world counterpart, improving task success on a phys- ical phone from 28.8% to 48.1%. We release the framework, synthesis skills, mocked apps, 2,000 verified tasks, and the model checkpoint to support repro- ducible research and further advances in scalable GUI agent training.
Figures & tables
Figure 1: Overview of MAI-Gym. Left: online GUI environments. Center: core capabilities. Bottom: the evaluation–diagnosis–synthesis–retraining loop. Right: performance comparison of MAI-Gym-9B with models of different sizes on MobileWorld and OSWorld-Verified.
System
Scope
Open-source Infrastructure
Tasks & Environments
Platforms
Benchmark evaluation
Online RL (# envs)
New environments
New World (files & app state)
Reward
BrowserGym [ Le Sellier De Chezelles et al., 2025 ]
8 ( )
×
×
×
Code
WebGym [ Bai et al., 2026 ]
×
✓256
×
×
VLM
MobileGym [ Wu et al., 2026 ]
s
×
✓256
Mocked apps
Pre-defined World
Code
GUI-Genesis [ Cao et al., 2026 ]
s
×
× †
Mocked apps
Generated per task, in app code
Code
PhoneWorld [ Liu et al., 2026 ]
×
× †
Mocked apps
Pre-defined World
Code
Table 1: Comparison with representative online GUI gyms.
Agent
Observation ot
Context ct
Actions yt
GUI agent
Screenshot
Last k screenshots + text history
Click, type, drag, …
CLI agent
Command output
Text history, often summarized
Shell commands
MAI-Gym
Screenshot + command output
Customized by the harness
Batched GUI + CLI actions
Table 2: Agent observations, context, and actions.
Figure 2: Architecture of MAI-Gym. Left: evaluation and RL training share one harness and rollout path; data collection uses the same path without the policy update. Center: the environment manager provides a common interface. Right: mobile, computer, and web instances hosted by deployment backends. Bottom: the dashboard. Purple tags mark extension points.
Figure 3: Window-wise history for rollout and training. Each turn is one step. With K=10 steps per window and O=2 overlapping steps, (a) appending history within a window enables KV-cache reuse; older screenshots become placeholders at window boundaries, while text is retained. (b) Training reuses these windows, applying loss only to new outputs (hatched). S/T: system prompt and task instruction.
Domain
Benchmark
Tasks
Max steps
Metric
Mobile
MobileWorld (GUI-only) [ MobileWorld Team, 2025 ]
117
100
Success rate
AndroidWorld [ Rawles et al., 2025 ]
116
Task-dependent
Success rate
MobileGym [ Wu et al., 2026 ]
256
100
binary / partial
Computer
OSWorld-Verified [ Xie et al., 2024 ]
361
100
Success rate
OSWorld 2.0 [ Yuan et al., 2026 ]
108
500
binary / partial
MacAgentBench [ Fu et al., 2026 ]
676
50
Success rate
Table 3: Evaluation benchmarks supported by MAI-Gym.
Figure 4: Real apps and their MAI-Gym clones. Top: real-app screens. Bottom: corresponding clones with independent data. CCB: China Construction Bank.
Figure 5: World, task, and verifier synthesis. (a) Construct a coherent world of files and app records. (b) Generate and review tasks targeting model weaknesses. (c) Independently synthesize golden and verifier code, validate by execution, and review model rollouts before acceptance.
Model
Size
Access
Mobile
Computer
Task OOD
Env OOD
Task OOD
Env OOD
MobileWorld GUI-only
Android World
Mobile Gym
OSWorld Verified
OSWorld 2.0
MacAgent Bench
MyPC Bench
Frontier models
Claude Opus 4.8
–
API
69.2
75.0
50.7
83.4
20.3/54.8
58.4
62.0
GPT-5.5
–
API
62.4
74.1
48.1
78.7
13.9/47.5
66.7
47.3
Qwen3.8-Max
2.4T-A95B
API
77.8
85.3
61.3
86.1
19.4/46.7
74.3
48.6
Table 4: Mobile and computer benchmark results (%). Task OOD : unseen tasks in training environments; Env OOD : unseen environments.
Figure 6: Gains from SFT warm-up and joint RL.
Figure 7: Efficient behaviors learned by MAI-Gym-9B. Top: adaptive zoom in MobileWorld. Middle: batched GUI actions in OSWorld. Bottom: CLI tool use in OSWorld.
Environment
Bring-up time for 1k envs (s)
Reset p50 / p95 (s)
Unscored aborts (%)
Mobile
328.4 ( ≥6× faster) †
165.0 / 184.0
1.2
Computer
88.9
37.2 / 100.1
1.9
Browser
94.2
6.0 / 27.0
0.0
Table 5: Environment efficiency and reliability. Bring-up ends when 1,000 environments are GUI-ready. Unscored aborts are attempts rerun after environment failures, without scoring.
Figure 13
Figure 11: Relative-date reasoning after clone-only RL. Top: incorrect dates before RL. Bottom: the correct Monday is selected and the reminder is set in both the clone and real app after RL.
Figure 12: RL enables efficient task completion in a novel app. Before RL, repeated ineffective gestures exhaust the 60 -step budget; after RL, the agent moves the folder and reports unchanged free space, passing all four checks in five steps.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 13: MAI-Gym dashboard. (a) Fleet capacity (1), usage history (2), and sessions (3). (b) Runs (1), evaluation rollouts (2), and training batches (3). (c) Benchmarks (1), scores (2), and runs (3). (d) Task and verifier result (1), action replay (2), and model output (3).
Concern
Environment adapter
MAI-Gym
Capacity
Reports health and available instances
Leases sessions, reclaims expired capacity, and assigns attempts
Isolation
Initializes task state and isolates concurrent instances
Keeps one attempt bound to one session for its lifetime
Observation
Returns screenshots, command output, and metadata
Selects the transport and records observations in trajectories
Action
Executes the declared action vocabulary
Parses model output, dispatches actions, and records results
Task
Installs task state and invokes its verifier
Samples tasks, forms rollout groups, and delivers rewards to training
Appendix
Table 8: Responsibilities across the environment contract.
Action
Definition
GUI Actions
click
Clicks at coordinates (x,y) .
double_click
Double-clicks at coordinates (x,y) ; on touch screens, a double tap.
long_press
Long-presses at coordinates (x,y) .
type
Types the specified text content.
hotkey
Presses a key combination, such as ctrl+c .
Appendix
Table 9: Action space of MAI-Gym.
Figure 14: Synthesized desktop task examples. Screenshots show the initial slides; task instructions and verifier checks are summarized.
Figure 15: A mobile task with a generated protocol. Left: abridged street-tree inventory instruction. Right: the protocol specifying counting and measurement rules.