Black Friday deposit bonus·Top up $50+ and get $10 · Top up $100+ and get $25·Ends November 30Top up →
Use case

An AI agent that plays mobile games on a cloud Android phone

Install a game's APK on a cloud phone and let a fast AI agent play it, with a coach that writes the strategy, dead-move detection and a live screen.

Last updated 2026-11-05

Prepaid, no subscriptionREST or MCPOne key for models, data and agents
phone agent ⏺ mode: fast · coach: on> Play 2048 and reach the 512 tile. swipe left · swipe down · swipe left coach: keep the big tile in the corner ✓ 512 reached · 214 moves
Black Friday

Black Friday deposit bonus

Every qualifying top-up earns free credit, on top of any other offer.

Ends November 30

Deposit $50
+$10
20% bonus
Deposit $100
+$25
25% bonus
Sign up and claim

Games are hard for AI agents in a way that forms and menus are not. The screen changes every second, most of what you tap isn't a button, and an agent that stops to think for ten seconds per move has already lost. Lovely Router's phone agent has a mode built for this. In fast mode, a decision model picks nearly every move in well under a second from the screen's elements and the screenshot, a coach model writes and keeps rewriting a strategy beside it, and moves that do nothing are noticed and not repeated. It runs on cloud phones: real Android 14 phones in the cloud that install any APK, at $1.20 per awake hour, billed per minute.

Hand it to your AI agent

Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.

Install a game on a Lovely Router cloud phone and start a fast-mode phone run that plays it, then report the result and the coach's strategy.

- Docs (read first): https://lovelyrouter.com/docs/phone.md and https://lovelyrouter.com/docs/api/phones.md
- Create a phone, install the APK, start an agent run with `mode: "fast"` and a goal (what counts as doing well); poll it and read `strategy` and the steps. Delete the phone when done.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.

My task: <the game and what to play>
01

What people use it for

Testing a game you make

Let the agent play the first levels of every build and report where it got stuck, which screen stopped responding, or how far it got in a fixed number of moves.

Checking the onboarding

Tutorials, reward pop-ups and store offers: does a new player get through them without help?

Research and demos

Watch an agent learn a game's rules from the screen, compare strategies the coach writes, or show a live game played by an AI on your own page.

02

How it works

010203
  1. Install the game

    Games often come as split bundles. Upload yours once with PUT /v1/phones/apks/{name} (up to 100 MB in one request, up to 500 MB in parts), or list an https:// link in apps. An .xapk's game data (its OBB files) is copied to the phone too.

  2. Start a fast run

    Send the goal with "mode": "fast". Say what to play and what counts as doing well: "Play the level, prefer matches near the bottom of the board, stop after 150 moves and report the score."

  3. Watch, then read the result

    Open the live screen to see the game being played. When the run ends, read the agent's answer, the coach's latest strategy and every move with trace=1.

03

Start a game run

010203
curl https://lovelyrouter.com/v1/phones/runs \
  -H "Authorization: Bearer $LOVELY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "goal": "Open the puzzle game and play level 1. Make the best move you can on each turn. When the level ends, report whether you won and the score shown.",
    "apps": ["puzzle-game.xapk"],
    "mode": "fast",
    "max_steps": 200
  }'

The run is queued while its new phone starts and installs the game, then running. A run that reaches max_steps ends stopped, not failed, because open-ended goals like "keep playing" have no other end.

04

The decision model and the coach

Fast mode splits the work between two models, both included in the phone's price:

  • The decision model plays. Each step it gets a menu built from what is on screen (tap, type, hold or scroll each element, plus back, home, enter, wait and open an app) and the screenshot, so it can also tap a spot that isn't in the list, such as a game piece or a tile in a picture, and swipe in four directions. It always acts on its best guess, even when unsure: in a game, any move beats waiting.
  • The coach thinks. It reads the goal, the recent moves and the screen, then writes a short strategy (for a game, which moves to prefer) and a note on the situation now. It runs at the first step, every few steps, when the game or app changes, and when the run looks stuck, and the decision model never waits for it: every step uses its latest version. The run shows it in strategy, situation and sidecar_updates; "plan": false turns it off.

The chat model you choose in model (default gemini-3.8-flash) only writes the final answer and any question for you. Text the agent types comes from your goal and your replies, never made up. Because the chat model stays out of the moves, a fast run uses far fewer tokens than a smart one.

05

Moves that do nothing, and the restart button

010203

Games punish two mistakes that a plain agent makes over and over.

Dead moves. Swiping a packed board, or tapping a tile that can't move, leaves the screen exactly as it was. The agent compares each screenshot with the one before: a move that changed nothing is marked unchanged in the trace and isn't tried again on that screen, and the coach is told at once that the run looks stuck, so it can suggest something else.

Giving up early. A game's "New game", "Restart" or "Try again" button is always one tap away, and an agent that hits a hard position will happily press it. In fast mode those buttons are left out of the moves it can pick, unless the game is over (the coach says so, or the screen does) or your goal asks for a restart.

06

Landscape games and the live screen

Many games lock to landscape. Screenshots then come back 1200×540 instead of 540×1200, coordinates follow, and the live screen turns with the game. POST /v1/phones/{id}/screen returns the link: it opens in any browser, needs no plugin and can be embedded in an iframe, so you can show a game being played on your own page. Whoever has the link can also tap and type, so share it carefully, or keep it in your own dashboard.

07

Read the moves afterwards

GET /v1/phones/runs/{id}?trace=1 lists every step: what the agent noted, the action and its arguments, the app in front, whether it worked, how long it took in ms, and unchanged: true for moves that did nothing. Count dead moves, find the point where a level stalled, or compare two strategies by running the same goal with different instructions in the goal.

For a scripted bot of your own, skip the agent and drive the phone directly: GET /v1/phones/{id}/screenshot, then POST /v1/phones/{id}/actions with tap or swipe at screenshot coordinates (direct control).

08

What you pay

Price
Phone while awake$1.20 per hour, billed per minute
Decision model and coach in fast modeIncluded in the phone's price
Chat model (answer and questions)Its tokens at the normal API price
Uploaded APKsThe first 1 GB free, then $0.30 per GB a month

A phone sleeps after 5 minutes without use, free, and wakes in about 2 seconds with the game as it was. After 1 hour without use it is deleted with its apps and data. Starting one needs 15 minutes of phone time on your balance; each account can have 3 phones at once. One prepaid balance covers phones, models and cloud agents.

09

Frequently asked questions

?
Can an AI agent really play a mobile game?+

Yes, within limits. In fast mode it picks moves in well under a second from the screen's elements and the screenshot, follows a strategy the coach writes, and avoids moves that did nothing. It plays as well as a quick, rule-following player; fast reaction games that need many precise inputs a second are beyond it.

Which games can it play?+

Any game that runs on Android 14 and installs from an APK, .apks or .xapk file. Turn-based and puzzle games suit it best, because each move can be judged from one screenshot.

Does the agent restart the game when it is losing?+

No. Restart, new game and try again buttons are kept out of its moves unless the game is over or your goal asks for a restart.

Does the coach cost extra?+

No. The decision model and the coach are included in the phone's hourly price. Only the chat model that writes the final answer and any questions is billed per token.

Can I watch the game while the agent plays?+

Yes. A live screen link shows the phone in any browser or in an iframe on your own page, in portrait or landscape.

To test the rest of your app with the same phones, see AI mobile app testing. Every field of a run is in the phone API reference.

One prepaid key for models, data and agents

No subscription. Top up, use what you need, see every charge in your logs.