TL;DR
Most mobile phone agents work by taking screenshots and tapping pixels with massive vision-language models—a slow, expensive approach that struggles to fit on a phone. FireAnt flips this around: it co-designs the environment and the agent together around structured APIs, training compact language models (0.6B–4B parameters) against lightweight mock servers and deploying them unchanged to real Android apps. The result is an on-device agent that outperforms much larger GUI-based models while using a fraction of the tokens and turns.
What Problem Does This Paper Address?
If you ask an AI agent to "find my dentist's address in my email and check if it matches my contacts," today's dominant approach treats your phone like a pixel grid. The agent takes a screenshot, feeds it to a large vision-language model (LVM), guesses where to tap or type, waits for the screen to update, and repeats.
While this GUI-first approach works on any app, it is wildly inefficient: it forces the agent to visually re-derive structure that the app already knows, burning through context length, battery, and latency. Most researchers try to fix this by shrinking the agent while leaving the GUI environment untouched. FireAnt's authors argue that efficiency is an end-to-end property of the agent and the environment together.
Methods
FireAnt (Frugal Inference with Resource-Efficient Agent, data geNeration and Training) replaces pixels with structured APIs from start to finish:
- Agentic World Modeling: Instead of slow, hard-to-reset Android emulators, each target app (Contacts, Calendar, Email, YouTube, Maps, Notes, Settings) is specified once via a functionality doc and a data schema, then spun up as a lightweight, parallelizable FastAPI mock server.
- Task-First Data Generation: Rather than sampling a random app state and inventing a task, FireAnt generates tasks first—spanning 1 to 3 apps across four complexity types (chained, conditional, iterative, and merge)—and then populates the mock databases with task-critical rows and realistic distractors. Expert trajectories are rolled out and filtered by an LLM-as-judge (GPT-5.4).
- Portable Action Layer: The agent interacts exclusively through a uniform JSON contract (
action_type+ arguments). During training, calls hit the mock FastAPI servers; on a real phone, the exact same calls are translated into Android intents and official Google web APIs—no retraining required. - Training & Schema Internalization: Compact Qwen3 models (0.6B, 1.7B, 4B) are trained via Supervised Fine-Tuning (SFT) or On-Policy Distillation (OPD, using Qwen3.8-27B as a teacher, including a cross-tokenizer alignment trick). To save context, schema internalization teaches the model to call familiar APIs directly from memory rather than fetching verbose tool definitions at runtime.
- On-Device Deployment & Extensions: The 4B model is quantized (8-bit weights, 16-bit activations via AIMET) and compiled for the Snapdragon 8 Elite Gen 5 Hexagon NPU (8,192-token context). Three runtime-toggleable extensions sit alongside the agent: Hybrid AI (escalating tricky tasks to the cloud), Safety screening (a single learned soft-prompt embedding that reuses the prompt's KV cache), and Context management (pruning or summarizing older history).
Datasets
- Existing Benchmarks: Evaluated on MobileWorld (101 API-doable tasks), MobileGym (251 tasks), and MobileGym++ (180 tasks), comparing GUI vs. API execution on identical tasks.
- AppVerse (New): A custom dataset of 4,553 tasks (filtered to 1,808 train, 250 validation, and 455 test) across 7 apps. Crucially, the test split holds out both user personas (unseen phrasing) and topics (finance and travel) to test real generalization.
Key Insights and Ideas
- APIs beat pixels on both accuracy and cost: Simply switching an existing model from GUI screenshots to structured API calls boosts task success for nearly every model tested (16/18 on MobileWorld and MobileGym; 17/18 on MobileGym++) while cutting generated tokens by 2.2x–4.1x.
- Fewer turns doesn't always mean smaller context: API agents take far fewer turns than GUI agents, but because they keep structured observations in history, their peak context can still grow large. That's why schema internalization and context compaction are essential for on-device deployment.
- Off-policy before on-policy for cross-tokenizer distillation: When distilling from a teacher with a different vocabulary (248k vs. 151k tokens), starting on-policy fails because the student's merged tokens get no learning signal. Running a short off-policy stage first teaches the student the teacher's token segmentation, unlocking stable on-policy distillation.
Key Results
- MobileWorld:
Qwen3+FireAnt 4B(API) reaches 47.5% success, beating the 27B GUI specialistOpenMobile2-27B(42.1%) while generating roughly one-third the tokens (748 vs. 2,393) and fewer turns (10.4 vs. 28.9). - AppVerse: Training
Qwen3-4Blifts success from 29.7% (baseline) to 73.8% (SFT) and 78.0% (OPD). Adding schema internalization (OPD+I) hits 80.2% while halving p80 peak context from 9,248 to 4,554 tokens. - Extensions:
- Hybrid AI: Escalating 31.4% of trajectories to GPT-5.4 boosts AppVerse success from 78.7% (local) to 84.6% (vs. 91.2% cloud-only).
- Safety screening: A single learned embedding achieves 99.05% AUROC with just 1.17% over-refusal on subtle, held-out unsafe requests.
- Context management: Compaction raises
Success@8kfrom 30.8% to 68.9% (+38.1 pp) onQwen3+FireAnt, andSuccess@4kfrom 45.1% to 59.7% (+14.6 pp) onQwen3+FireAnt+I.
Limitations and Future Work
- Single-turn user interaction: The agent executes a single initial instruction end-to-end and cannot yet ask clarifying questions or handle mid-task user corrections.
- Blind to unexposed screen content: Because the action space is purely structured, tasks requiring the agent to read something off-screen that isn't exposed via an API have no path to completion. The authors suggest treating screen understanding as a callable tool rather than a separate GUI mode.
- Hardest compositional tasks: A performance gap still remains on the longest, most complex multi-app tasks compared to shorter ones.
Summary updated