Data as of Aug 25, 2026 · Based on 331 AI responses from ChatGPT Search and Google AI Mode · See how Parse measures this
Building an on-device AI agent for mobile requires choosing between platform-specific performance or cross-platform logic. For iOS, Core ML is the standard for accessing hardware acceleration. For Android,
LiteRT (formerly TensorFlow Lite) is the preferred choice. For teams needing to share core agent logic across both iOS and Android while maintaining native performance, Kotlin Multiplatform stands out as the most recommended approach.
Brands AI recommends here
Named in 59% of answers
The gold standard for iPhone apps. It provides the necessary performance optimization for Apple hardware and the Neural Engine, ensuring your agent runs efficiently with low battery impact.
Named in 41% of answers
Google's primary framework for on-device machine learning. It is best for Android developers needing hardware acceleration, mature API support, and reliable performance on diverse devices.
Named in 34% of answers
Named in 32% of answers
If your goal is a **mobile app with a genuinely lightweight, offline-capable AI agent**, my current default choice would be **[pytorch.org](https://pytorch.org/executorch/?utm_source=chatgpt.com)**—especially if you're targeting both iOS and Android. The important distinction is that an *agent* is usually not a…
If your goal is a mobile app with a genuinely lightweight, offline-capable AI agent, my current default choice would be pytorch.org—especially if you're targeting both iOS and Android.
The important distinction is that an agent is usually not a framework feature by itself. You typically want:
mobile app → agent runtime/orchestrator → on-device LLM → local tools/data
1. ExecuTorch — best overall for a cross-platform on-device agent
ExecuTorch is PyTorch's edge runtime and is explicitly designed for constrained devices. It supports LLMs, vision, speech, and other models, with CPU/GPU/NPU/DSP acceleration.
It has particularly good mobile coverage:
I'd build the agent layer yourself rather than trying to find a giant "agent framework":
┌─────────────────────────────┐
│ Mobile UI │
│ Swift / Kotlin │
├─────────────────────────────┤
│ Agent Controller │
│ planning / tool selection │
│ state / permissions │
├─────────────────────────────┤
│ Local Tools │
│ files • DB • calendar │
│ camera • location • etc. │
├─────────────────────────────┤
│ ExecuTorch │
│ quantized local LLM │
├─────────────────────────────┤
│ CPU / GPU / NPU / DSP │
└─────────────────────────────┘
This gives you much more control over latency, memory, battery, privacy and tool permissions than putting a heavyweight agent framework inside the app.
LiteRT is probably the main alternative I'd evaluate. Google's current LiteRT stack is explicitly positioned as a production on-device AI framework and now has advanced hardware acceleration.
I'd lean toward LiteRT when you're particularly invested in Google's Android/ML ecosystem.
llama.cpp is worth considering if your app is essentially "run a small GGUF LLM locally" rather than a broad multimodal ML application. It's extremely attractive for a small text-agent runtime, but I'd choose ExecuTorch when you expect the app to grow into vision/audio/multimodal models.
For example, if you're building an assistant that can say:
"Find my receipts from last month, summarize them, and tell me how much I spent." I'd use:
The big architectural trick is not to make the LLM the whole agent. Keep orchestration deterministic and let the small local model handle language understanding, intent and tool selection. That makes a surprisingly capable agent possible on a phone without requiring a huge model.
If you tell me iOS, Android, or both, and what the agent needs to do (e.g. personal assistant, computer-use agent, voice agent, document agent), I can recommend a specific model + runtime + agent architecture and give you a minimal implementation.
I'd lean toward LiteRT when you're particularly invested in Google's Android/ML ecosystem.
llama.cpp is worth considering if your app is essentially "run a small GGUF LLM locally" rather than a broad multimodal ML application. It's extremely attractive for a small text-agent runtime, but I'd choose ExecuTorch when you expect the app to grow into vision/audio/multimodal models.
For example, if you're building an assistant that can say:
"Find my receipts from last month, summarize them, and tell me how much I spent." I'd use:
Building a mobile app powered by an on-device AI agent requires balancing two distinct layers: **the inference engine** (to run the tiny language or vision model locally) and **the agent harness/orchestrator** (to manage tool-use, memory, and…
Building a mobile app powered by an on-device AI agent requires balancing two distinct layers: the inference engine (to run the tiny language or vision model locally) and the agent harness/orchestrator (to manage tool-use, memory, and loops).
Because heavy Python-based agent frameworks (like LangChain or AutoGen) cannot run natively and performantly inside mobile memory constraints, the ecosystem has shifted toward native, lightweight runtimes optimized for edge devices (phones with NPUs/GPUs).
The leading frameworks and runtimes for building lightweight, on-device mobile AI agents are categorized below by their strengths.
llama.rn) llama.rn (for React Native) or native iOS/Android wrappers let you load small quantized GGUF models (e.g., 1B–3B Q4 variants) achieving fast token generation speeds on flagship mobile hardware.On mobile, you generally do not use a heavy external agent framework. Instead, you write a lightweight finite-state machine or use a minimalist functional loop in your app’s native language (Swift/Kotlin) or cross-platform code (Dart/JS) to handle the ReAct (Reason + Act) pattern:
llama.rn for inference with lightweight custom TypeScript logic to parse agent tool-calling schemas.Recommendation on How to Choose
llama.rn if you want the flexibility to hot-swap different community GGUF models and need bare-metal C++ performance locally.To help narrow down the best architecture, tell me:
Building an on-device AI agent for mobile requires a split-layer approach: you need a **lightweight inference runtime** to execute the local small language model (SLM) on mobile hardware, coupled with a **lean agentic loop** (handling tool use, state, and planning) written in native or cross-platform…
Building an on-device AI agent for mobile requires a split-layer approach: you need a lightweight inference runtime to execute the local small language model (SLM) on mobile hardware, coupled with a lean agentic loop (handling tool use, state, and planning) written in native or cross-platform code.
Heavy server-side agent frameworks (like LangChain or CrewAI) are generally too bloated and memory-hungry for mobile constraints. Instead, the best ecosystem options depend on your target stack and performance needs:
Before an agent can reason or use tools, it needs to run a quantized model (like Llama-3-8B-Instruct quantized, Phi-3, or Gemma-2B) efficiently on mobile CPUs/GPUs/NPUs.
.pte execution files. Ideal if you want strict production-grade memory safety and custom hardware backend delegation.Because standard Python agent frameworks don’t fit inside a compiled iOS/Android binary, you typically build a lightweight state machine or execution loop directly in your mobile architecture (Swift/Kotlin or React Native/Flutter):
llama.cpp ). You define local device tools (like reading local calendar events, writing to SQLite, or fetching device status) as simple native functions.To help narrow down the best setup, could you share:
For a **mobile app with a lightweight, on-device AI agent**, the best framework depends on what you mean by “agent”: - A **small LLM that plans, chats, calls tools, and runs offline** - A **specialized AI feature** (vision, speech, classification)
For a mobile app with a lightweight, on-device AI agent, the best framework depends on what you mean by “agent”:
For a true on-device agent, I’d usually start with an LLM runtime + your own agent layer, rather than looking for a single “agent framework.” The runtimes handle inference; you build memory, tools, planning, and app integration on top.
Best for: iOS + Android, offline assistants, prototypes that need many model choices.
Pros:
Cons:
A typical stack:
Swift/Kotlin/React Native
|
Agent layer
(tool routing, memory, planning)
|
llama.cpp
|
Quantized LLM (GGUF)
For many startups, this is the safest starting point.
Best for: shipping a polished consumer app where inference speed matters.
Pros:
Cons:
Choose MLC if you already know the model you want to ship and care about squeezing maximum performance from phones.
Best for: production apps with custom models or multimodal pipelines.
Pros:
Cons:
Good choice if your agent uses more than text (vision, audio, custom neural networks).
iOS-only
Android-focused
These are excellent when you are targeting one ecosystem rather than building a portable agent stack.
| App | Recommended stack |
|---|---|
| Offline personal assistant | llama.cpp + 2B–4B quantized model |
| AI note-taking app | llama.cpp or MLC + embeddings + local vector store |
| Voice assistant | speech model + llama.cpp/MLC + tool layer |
| Camera/vision agent | ExecuTorch or Core ML/LiteRT |
| iOS-only premium app | Core ML + Apple hardware acceleration |
| Cross-platform consumer app | llama.cpp first, migrate to MLC/ExecuTorch if needed |
A lightweight mobile agent usually looks like:
Mobile UI
|
Agent controller
|
+-----------+-----------+
| |
Local LLM Local memory
(llama.cpp/MLC) embeddings + DB
|
Tool executor
(calendar, files, APIs,
app actions)
Keep the “agent brain” small:
A 7B model can work on high-end phones, but a well-designed 2B–4B model often gives a better UX because latency, battery, and memory matter more than raw capability.
If I were starting a new iOS + Android AI agent app today, I’d prototype with llama.cpp + a 3B–4B instruct model, build the agent layer cleanly, then evaluate MLC LLM or ExecuTorch once I had real performance data.
A lightweight mobile agent usually looks like:
Mobile UI
|
Agent controller
|
+-----------+-----------+
| |
Local LLM Local memory
(llama.cpp/MLC) embeddings + DB
|
Tool executor
(calendar, files, APIs,
app actions)
Keep the “agent brain” small:
A 7B model can work on high-end phones, but a well-designed 2B–4B model often gives a better UX because latency, battery, and memory matter more than raw capability.
Building a lightweight, on-device AI agent for mobile requires balancing **memory footprints**, **battery constraints** , and **inference latency** . Rather than relying on heavy server-side orchestration frameworks (like LangGraph or CrewAI), the mobile ecosystem splits the "agent brain" and "execution layer" across…
Building a lightweight, on-device AI agent for mobile requires balancing memory footprints, battery constraints , and inference latency . Rather than relying on heavy server-side orchestration frameworks (like LangGraph or CrewAI), the mobile ecosystem splits the "agent brain" and "execution layer" across native and cross-platform paradigms.
The top frameworks and architectural choices for building on-device mobile agents depend on your target stack:
To help narrow down the ideal choice, tell me:
Expo
expo.dev
If your goal is a **mobile app with a genuinely on-device agent**—not just an LLM chat UI—I’d separate the stack into **agent runtime/orchestration** and **local model inference**. ### My top choice: MLC LLM + your own lightweight agent loop For a cross-platform iOS/Android app, **MLC LLM** is one of the strongest…
If your goal is a mobile app with a genuinely on-device agent—not just an LLM chat UI—I’d separate the stack into agent runtime/orchestration and local model inference.
For a cross-platform iOS/Android app, MLC LLM is one of the strongest foundations right now. It compiles models for mobile hardware and provides native iOS/Android APIs, with support for Apple GPUs on iOS and mobile GPUs on Android.
I'd architect it roughly like:
┌──────────────────────────────┐
│ Mobile App UI │
│ Swift / Kotlin │
├──────────────────────────────┤
│ Agent Runtime │
│ │
│ Goal → Plan → Tool → │
│ Observe → Decide → Act │
│ │
│ • tool registry │
│ • short-term memory │
│ • state machine │
│ • permissions / guardrails │
├──────────────────────────────┤
│ Local LLM Runtime │
│ MLC LLM │
├──────────────────────────────┤
│ Apple GPU / Android GPU │
└──────────────────────────────┘
The important bit: don't use a heavyweight agent framework on the phone. The agent itself can be a few thousand lines of deterministic application code. Let the LLM handle decisions, while your code owns state, tools, permissions, retries, and execution.
| Framework | Best for | My take |
|---|---|---|
| MLC LLM | Cross-platform local LLMs | ⭐ Best overall for your use case |
| llama.cpp | Maximum control / broad model support | ⭐ Excellent, particularly if you want C++ |
| ExecuTorch | PyTorch models + hardware acceleration | Great if your models originate in PyTorch |
| Google LiteRT | Android/Google ecosystem | Attractive if you're targeting Android heavily |
| Apple Foundation Models | Apple-only apps | Very interesting if iOS-only and the OS-provided model fits your agent |
MLC is particularly attractive for a startup/product because its packaging system can compile the model and package the runtime/weights directly into an iOS or Android application. It also supports controlling things like context-window size and prefill chunk size, which matter a lot for mobile memory constraints.
For a new app in 2026, I'd start with:
Frontend
Agent
Inference
Tools
calendar
contacts
location
files
camera
notifications
app-specific APIs
Each tool should be a strongly typed native function rather than something the LLM can arbitrarily execute.
For example:
User: "Remind me to call Sarah when I get home."
Agent:
1. infer intent
2. call location tool
3. create geofence
4. schedule notification
5. persist task
The LLM shouldn't be responsible for steps 2–5. It should decide what needs to happen; deterministic application code should decide how it happens.
I'd avoid building the agent around an LLM framework like LangChain/LangGraph initially. Those frameworks are excellent on servers, but mobile has very different constraints: binary size, memory pressure, battery, intermittent connectivity, OS permissions, lifecycle management, and latency.
Instead, make the agent runtime boring:
AgentState
↓
LLM inference
↓
Structured action
↓
Tool execution
↓
Tool result
↓
LLM inference
↓
Final response
That gives you much more control over battery, latency and failure modes.
If you tell me what the agent actually needs to do (e.g. personal assistant, camera/computer vision agent, offline coding assistant, health/fitness coach, smart-home controller, etc.), I can recommend the specific model + inference runtime + agent architecture I'd use, including approximate RAM/storage requirements for modern iPhones and Android phones.
Building a lightweight, on-device AI agent for mobile requires balancing strict constraints: limited RAM, thermal throttling, battery preservation, and tight inference latency. Heavy cloud-first agent frameworks (like standard LangChain or AutoGen) are far too bloated for edge mobile…
Building a lightweight, on-device AI agent for mobile requires balancing strict constraints: limited RAM, thermal throttling, battery preservation, and tight inference latency. Heavy cloud-first agent frameworks (like standard LangChain or AutoGen) are far too bloated for edge mobile environments.
The optimal framework choice depends heavily on your target platform and whether you want to leverage native mobile OS intelligence or build a cross-platform solution.
Top Frameworks for On-Device Mobile AI Agents
Key Architecture Comparison for Mobile Agents
| Approach | Best For | Pros | Cons |
|---|---|---|---|
| Google ADK (Android/Kotlin) | Android-first or KMP shared logic | Native device integration, built-in Gemini Nano & tool-use support | Android/Kotlin ecosystem focused |
| Swift + Foundation Models | Premium, day-one iOS features | Max NPU performance, zero latency overhead, zero network dependency | Locked into Apple's hardware/OS ecosystem |
| ExecuTorch / MediaPipe | Custom offline SLMs ( <3B parameters) | Full control over quantization, execution, and memory footprint | You must write your own agentic loop and tool-calling logic from scratch |
To help narrow down the ideal stack, tell me:
If you mean **an actual agent**—an LLM that can reason, call tools, maintain state, and execute actions—not just “run an LLM on the phone,” I’d build the stack around **ExecuTorch** today. ### My recommendation **Best overall for a new cross-platform mobile agent: ExecuTorch**
If you mean an actual agent—an LLM that can reason, call tools, maintain state, and execute actions—not just “run an LLM on the phone,” I’d build the stack around ExecuTorch today.
Best overall for a new cross-platform mobile agent: ExecuTorch
ExecuTorch is unusually well suited to this because it is designed specifically for on-device deployment, has a very small base runtime, supports iOS and Android, and has hardware backends for Apple, Qualcomm, ARM, MediaTek, etc. It also has an LLM runner and multimodal support.
I'd structure it roughly like:
┌─────────────────────────────────────┐
│ Mobile App UI │
│ Swift / Kotlin / RN │
├─────────────────────────────────────┤
│ Agent Runtime │
│ state • planning • tool selection │
│ permissions • memory • execution │
├─────────────────────────────────────┤
│ ExecuTorch │
│ local model inference │
├─────────────────────────────────────┤
│ Hardware acceleration │
│ CPU / GPU / NPU / Neural Engine │
└─────────────────────────────────────┘
The important distinction is that ExecuTorch is the inference/runtime layer, not your complete agent framework. I'd keep the agent loop yourself so you control latency, memory, tool permissions, and failure behavior.
| Framework | I'd use it when | Main tradeoff |
|---|---|---|
| ExecuTorch | Cross-platform production agent | Best overall balance |
| llama.cpp | Maximum model freedom | More engineering; you own more of the runtime |
| LiteRT / LiteRT-LM | Android-first, especially Gemma | Excellent mobile acceleration, narrower ecosystem |
| Apple Foundation Models | iOS-only app | Extremely easy, but you're tied to Apple's model |
| MLX | Apple-only / Apple Silicon experimentation | Great Apple performance, poor cross-platform fit |
llama.cpp remains my choice if your biggest requirement is “I want to download basically any quantized model and run it.” Its GGUF ecosystem and portability are excellent. The downside is that you're closer to the metal and will do more integration/performance work yourself.
LiteRT is particularly interesting if Android is your primary target. Google's current stack is explicitly optimized for on-device AI and its latest runtime has hardware acceleration, including NPU paths; Google reports significant gains over llama.cpp on some Android hardware.
For iOS-only, Apple's own Foundation Models framework is arguably the simplest answer when its built-in model is sufficient. You don't have to ship your own LLM at all.
For a new app in 2026:
React Native UI + native ExecuTorch module + 1–3B quantized model + local tool runtime
For example:
React Native
│
▼
AgentController
│
├── conversation state
├── short-term memory
├── tool registry
├── permissions
└── execution loop
│
▼
ExecuTorch
│
▼
1B–3B quantized LLM
│
┌──────┼────────┐
▼ ▼ ▼
Files DB App APIs
The agent controller is actually more important than the inference framework. Keep the model small and make the tool interface extremely structured. For a mobile agent, I'd generally prefer a 1B–3B model with constrained tool/function calling over trying to cram a 7B–14B model onto the phone.
One particularly attractive feature of ExecuTorch is that the same general stack can cover LLM + vision + speech, rather than requiring you to assemble three completely different inference systems.
Bottom line:
If you tell me iOS, Android, or both and what you want the agent to actually do (e.g. manipulate app UI, search local files, act as a personal assistant, control IoT, etc.), I can recommend the exact model + runtime + agent architecture.
Gemma
For a **lightweight on-device AI agent in a mobile app**, I’d separate the problem into two layers: 1. **Agent runtime/orchestration** — planning, memory, tool calls, workflows 2. **On-device model runtime** — actually running the LLM locally
For a lightweight on-device AI agent in a mobile app, I’d separate the problem into two layers:
There isn’t one universal “agent framework” for phones yet. The best stack depends on how much control you need.
For most production mobile apps today, I would start with:
Why:
llama.cpp is widely used as the foundation for mobile local LLM deployments because it is portable and supports many quantized models.
A mobile agent usually does not need a huge autonomous framework. A simple loop is often enough:
User input
↓
Small local LLM
↓
Intent + tool selection
↓
Execute tool
↓
Update memory/state
↓
Generate response
For example:
Good choice if:
MLC compiles models into optimized native execution paths rather than relying only on a generic runtime. That can improve performance on supported hardware, but deployment is more involved.
Use it for:
Good choice if:
ExecuTorch is more of a general edge inference framework than an “agent framework.”
If you are building only for Apple devices:
The tradeoff is model conversion/support complexity.
Cloud-oriented agent frameworks like large graph/workflow systems are usually too heavy to embed directly in a phone app.
Instead, implement:
conversation
user preferences
task status
cached results
calendar()
contacts()
files()
camera()
local_database()
search_index()
A small model decides:
{
"action": "calendar.create_event",
"arguments": {
"title": "Dentist",
"time": "Friday 3pm"
}
}
Structured tool calling is generally more reliable than asking a tiny model to freely reason.
Typical sweet spot:
| Model size | Good for |
|---|---|
| 0.5B–2B | classification, extraction, commands |
| 3B–4B | useful personal assistants |
| 7B | higher-quality assistant, but memory heavy |
For agents, a small model with good tool constraints often beats a larger model doing everything.
Examples worth testing:
Swift/Kotlin
+
llama.cpp
+
3B–4B quantized model
+
SQLite/vector store
+
native device tools
Flutter UI
+
native llama.cpp bridge
+
GGUF model
+
Dart agent controller
React Native
+
native C++ inference module
+
llama.cpp wrapper
+
JS agent orchestration
Swift
+
Core ML / Metal
+
Apple-optimized model
If I were starting a new lightweight mobile agent project today, I’d pick:
Cross-platform: llama.cpp + GGUF + custom agent loop
iOS-only: Core ML where supported, llama.cpp fallback
Performance-focused: MLC LLM
Enterprise edge ML: ExecuTorch
The biggest engineering challenge is usually not the LLM—it is designing the agent’s tool interface, memory model, and failure handling so a small local model can behave reliably.
Building a mobile app with an on-device AI agent requires splitting your architecture into two components: the **Inference Engine** (which runs the lightweight weights locally on the phone's NPU/GPU/CPU) and the **Agent Orchestrator** (which handles the tool-calling, state, and reasoning…
Building a mobile app with an on-device AI agent requires splitting your architecture into two components: the Inference Engine (which runs the lightweight weights locally on the phone's NPU/GPU/CPU) and the Agent Orchestrator (which handles the tool-calling, state, and reasoning loops).
Because mobile devices have strict RAM, thermal, and battery limits, the "best" framework depends heavily on your target ecosystem and whether you are deploying cross-platform or native.
Phase 1: The On-Device Inference Runtimes (Where the Model Lives)
Phase 2: The Agent Orchestration Layer (The Brain & Loop)
Traditional server-side agent frameworks (like LangGraph or CrewAI) are too heavy for mobile runtime environments. For lightweight, on-device loops, you want a deterministic state-machine approach:
Recommendation Summary
To help narrow down the ideal stack, tell me: