CrewAI on Android: a phone for your crew.
CrewAI agents can automate Android apps with Mobilebox. Add the Mobilebox MCP server to an agent’s mcps with MCPServerHTTP, and that agent reads a cloud phone’s screen as numbered elements, then taps, types, swipes and installs apps to finish its task.
Python, 30 lines, the hosted MCP server and its 13 tools. Android and iPhone over one API.
- 1
Get a key
Sign up with GitHub and create an API key in the dashboard. New accounts get $2 of credit.
- 2
Install CrewAI
pip install crewai "crewai-tools[mcp]" - 3
Run the example
python agent.pywithMOBILESANDBOX_API_KEYandOPENAI_API_KEYset. It creates a phone, gives the agent one task and deletes the phone, also when the run fails.
The whole example
CrewAI loads the tools when the crew starts, and only the agent with mcps gets them.
# CrewAI + Mobilebox: a crew agent drives a cloud Android phone over MCP.
# pip install crewai "crewai-tools[mcp]"
# MOBILESANDBOX_API_KEY=... OPENAI_API_KEY=... python agent.py
import json, os, urllib.request
from crewai import Agent, Crew, Task
from crewai.mcp import MCPServerHTTP
API = "https://mobilebox.dev"
AUTH = {"Authorization": f"Bearer {os.environ['MOBILESANDBOX_API_KEY']}"}
def phones(method, path=""): # your code owns the phone: create it, and always delete it
req = urllib.request.Request(f"{API}/v1/phones{path}", method=method, headers=AUTH)
with urllib.request.urlopen(req) as res:
return json.loads(res.read() or "null")
phone = phones("POST", "?wait=ready")["id"]
try:
operator = Agent(
role="Android phone operator",
goal=f"Complete tasks on the Android phone {phone} and report what the screen shows",
backstory="You use the Mobilebox tools: observe, act, and check each result on the returned screen. "
"You never create or delete phones.",
llm=os.environ.get("MODEL", "gpt-5.4-mini"),
mcps=[MCPServerHTTP(url=f"{API}/mcp", headers=AUTH)],
)
task = Task(
description="Open Settings > Display and find the brightness level.",
expected_output="The brightness level, as shown on the phone",
agent=operator,
)
print(Crew(agents=[operator], tasks=[task]).kickoff())
finally:
phones("DELETE", f"/{phone}")
Ran once against production on 5 November 2026: the agent answered “The brightness level is 83%” in 36 s, and the phone was deleted. Run log
Questions
Before you wire CrewAI to a phone.
Can several agents in a crew use the phone?
Yes. Give each agent the same MCP server and the phone id. In a sequential crew they act one task at a time, so each one sees the screen the last one left.
Which models can drive the phone?
Any model CrewAI can call that uses tools. llm takes a provider/model id; the example reads it from MODEL.
Can the agent install my app?
Yes. install_app takes a public APK or split-bundle URL, or your code uploads the file over REST; then the agent opens it with {"type":"open_app","package":…}. See installing APKs and split bundles.
Does it work on iPhone?
Yes. Create the phone with platform: "ios" and the agent uses the same tools. See iPhone and iPad.
What does a run like this cost?
A ready phone costs $0.01 a minute, billed per second with a one-minute minimum; boot time and parked phones are free, so a run like the one above costs about a cent. See pricing.
Read more
A successful tap is not a successful task
Design Android agent checks around outcomes, screen evidence, failure traces, and safe cleanup.
Batch the steps you know. Observe the ones you don’t.
Build bounded Android action batches, inspect partial failure, and verify the resulting screen.
Using another framework? OpenAI Agents SDK, LangGraph, browser-use, Mastra, Vercel AI SDK, Claude Agent SDK.
All integrations