FireAnt On-Device Agentic Phone Control: 4B Portable Action Layer & AIMET Guide

Published in arXiv:2612.06285, FireAnt replaces screenshot-heavy mobile GUI loops with a REST-backed Portable Action Layer (PAL) and synthetic app training environments. A quantized 4B Qwen3+FireAnt agent achieves 47.5% success on MobileWorld (beating 32B GUI models at 36.6%) in just 10.4 turns and 748 mean generated tokens, deployable on-device via AIMET W8A16 and Qualcomm Genie SDK.
FireAnt On-Device Agentic Phone Control: 4B Portable Action Layer & AIMET Guide: Published in arXiv:2612.06285, FireAnt replaces screenshot-heavy mobile GUI loops with a REST-backed Portable Action Layer (PAL) and synthetic app training environments. A quantized 4B Qwen3+FireAnt agent achieves 47.5% success on MobileWorld (beating 32B GUI models at 36.6%) in just 10.4 turns and 748 mean generated tokens, deployable on-device via AIMET W8A16 and Qualcomm Genie SDK. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- 4B Beats 32B GUI Baselines: Qwen3+FireAnt 4B reaches 47.5% success on MobileWorld—outperforming GUI-Owl-1.5 32B (36.6%), OpenMobile2 27B (42.1%), and Qwen3.5 27B (33.3%).
- 4x–7x Fewer Generated Tokens: Averages only 748 generated tokens across 10.4 turns per episode, compared with 5,540 tokens / 29.0 turns for Qwen3.5 27B GUI agents.
- Portable Action Layer (PAL) Parity: Synthetic REST servers generated from app functionality specs expose the exact same action contract as the on-device Android/mobile runtime.
- True NPU Hardware Deployment: Quantized to 8-bit weights and 16-bit activations (W8A16) via AIMET and compiled with Qualcomm Genie SDK for smartphone execution.
import { createAgent } from '@smoke-monkey/harness';// Edge-oriented agent mirroring FireAnt's Portable Action Layer (PAL) over MCP REST toolsconst agent = createAgent({agentId: 'fireant-pal-edge-controller',provider: 'openai-compatible',baseUrl: 'http://127.0.0.1:8100/v1',model: 'qwen3-4b-fireant-w8a16',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'ask',run_command: 'ask',},});async function main() {const result = await agent.run('Query the Portable Action Layer schema at ./pal-actions.json, compose the minimal REST call sequence to schedule a calendar reminder, and validate safety constraints.');console.log('FireAnt PAL Result:', result.summary);}main().catch(console.error);
Watch: Related Video Guides
I Built an OpenClaw-Style Autonomous AI Agent for Android | On Screen
Beginner's Guide to Integrating On-Device AI Agents In Your Mobile App (Android + iOS)
What Is FireAnt and Why Does Environment Abstraction Beat Pure GUI Clicking?
FireAnt (arXiv:2612.06285) is an on-device mobile agent framework that stops forcing tiny 0.6B–4B models to parse noisy screenshots and instead exposes deterministic application APIs through a Portable Action Layer (PAL). To train policies without brittle emulators, FireAnt synthesizes fully resettable REST servers from app schemas that share the exact same PAL contract as real phones.
This co-design cuts average turns from ~29–40 down to 10.4 turns and slashes generated reasoning tokens to 748 tokens, making 4B on-device models outperform 32B open-weight GUI specialists on MobileWorld:
| Model / Framework | Params | Interface | MobileWorld Success (%) | Mean Gen. Tokens | Mean Turns |
|---|---|---|---|---|---|
| Qwen3 + FireAnt (4B) | 4B | PAL / API | 47.5% | 748 | 10.4 |
| Qwen3 + FireAnt (1.7B) | 1.7B | PAL / API | 20.8% | 905 | 15.1 |
| OpenMobile2 27B | 27B | GUI | 42.1% | 2,393 | 28.9 |
| GUI-Owl-1.5 32B | 32B | GUI | 36.6% | 2,008 | 36.9 |
| Qwen3.5 27B | 27B | GUI | 33.3% | 5,540 | 29.0 |
| UI-TARS-1.5 7B | 7B | GUI | 1.7% | 2,882 | 23.3 |
Quantizing and Deploying 4B Action Models With AIMET W8A16 and Genie SDK
Unlike server-grade GPUs, smartphone NPUs are severely constrained by LPDDR5 memory bandwidth and thermal budgets. FireAnt quantizes Qwen3 checkpoints to W8A16 (8-bit weights, 16-bit activations) via AIMET and exports context-binary bundles through the Qualcomm Genie SDK, paired with safety screening and optional hybrid-AI cloud escalation for rare out-of-distribution tasks:
# 1. Verify AIMET and Qualcomm Genie SDK tooling in build environment
python3 -c "import aimet_torch; print('AIMET ready:', aimet_torch.__version__)"
which genie-t2t-run || echo "Add Qualcomm AI Engine Direct / Genie SDK bin to PATH"
# 2. Export W8A16 quantized Qwen3-4B FireAnt checkpoint for Snapdragon NPU
python3 scripts/quantize_w8a16.py \
--model ./checkpoints/qwen3-4b-fireant \
--scheme W8A16 --seq-len 16384 \
--output ./artifacts/fireant-4b-w8a16
# 3. Smoke-test on-device PAL JSON generation via Genie runtime
genie-t2t-run -c ./artifacts/fireant-4b-w8a16/genie_config.json \
-p '{"task":"Set Do Not Disturb until 08:00","pal_tools":["settings.set_dnd"]}'Context Management for 16K Peak Episodes
Although FireAnt averages only 748 generated tokens, its 80th-percentile peak context length reaches 16,190 tokens (p80) due to REST tool schemas and multi-turn state. Prune stale app responses between sub-tasks to keep NPU prefill fast.
Applying FireAnt’s Portable Action Layer Pattern Inside Smoke Monkey
FireAnt proves a core principle shared by Smoke Monkey Harness: replacing fragile pixel scraping with strongly typed tool abstractions delivers order-of-magnitude gains in reliability and token efficiency.
Just as FireAnt's PAL bridges synthetic REST gyms and real smartphone APIs, Smoke Monkey binds local MCP servers with deterministic JSON schemas and safety-screened permission rules so compact 4B–8B local models can execute real workflows reliably.
Frequently Asked Questions
Q:How does a 4B FireAnt model beat 32B GUI models on MobileWorld?
By changing the interface from raw GUI screenshots to a structured Portable Action Layer (PAL) and training on schema-matched synthetic REST environments, Qwen3+FireAnt 4B reaches 47.5% success while GUI-Owl-1.5 32B achieves 36.6%.
Q:How many tokens and turns does FireAnt use per mobile task?
Qwen3+FireAnt 4B averages 748 generated tokens and 10.4 turns per MobileWorld episode, compared with 2,008–5,540 tokens and 29–37 turns for open-weight GUI baselines.
Q:What quantization format does FireAnt use for on-device execution?
The authors quantize Qwen3 to 8-bit weights and 16-bit activations (W8A16) using AIMET and deploy the compiled model with the Qualcomm Genie SDK.
Q:Does FireAnt support hybrid cloud fallback and safety checks?
Yes. Section 5.3 of the paper details built-in harness modules for Hybrid AI routing, pre-execution safety screening, and context management.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.