langchain-mobilebox
LangChain tools for Mobilebox: cloud Android phones your agent creates, reads, taps and types on. Works with any LangChain or LangGraph agent and any tool-calling model. Built on the mobilebox client.
pip install langchain-mobilebox
export MOBILESANDBOX_API_KEY=... # from https://mobilebox.dev/dashboard; never in a prompt or a commit
from langchain.agents import create_agent
from langchain_mobilebox import MobileboxToolkit
agent = create_agent(
"openai:gpt-5.4-mini", # any tool-calling chat model
tools=MobileboxToolkit().get_tools(),
system_prompt="Use the Mobilebox phone tools. Delete every phone you create when you are done, also on failure.",
)
state = agent.invoke({"messages": [("user", "Create a phone, open Settings and tell me which Android version it runs.")]})
print(state["messages"][-1].content)
Tools
| Tool | Class | Does |
|---|---|---|
mobilebox_create_phone |
MobileboxCreatePhone |
Create a phone, wait until ready, return its id and first screen |
mobilebox_observe |
MobileboxObserve |
The screen as numbered elements: [ref] Type "text" — secondary [state] (x,y) |
mobilebox_act |
MobileboxAct |
Run 1–20 actions (tap, type, swipe, scroll_to, open_app, wait_for…), return results and the new screen |
mobilebox_screenshot |
MobileboxScreenshot |
A PNG image block, for what the element list cannot show |
mobilebox_install_app |
MobileboxInstallApp |
Install an APK, .apks or .xapk from a public URL |
mobilebox_park_phone |
MobileboxParkPhone |
Shut down and stop billing, keeping apps and logins |
mobilebox_delete_phone |
MobileboxDeletePhone |
Delete the phone and everything on it |
API errors don't crash the run: the tool returns an error message with the code and next step, and the model recovers from it. A failed action inside mobilebox_act is reported with its reason next to the current screen.
Let your code own the phone
For a bounded bill and independent runs, create the phone yourself, give the agent only the tools that drive it, and delete the phone in finally:
from mobilebox import Mobilebox
from langchain_mobilebox import MobileboxAct, MobileboxObserve, MobileboxScreenshot
mb = Mobilebox()
phone = mb.create_phone(idle_timeout=120, max_duration=600)
try:
tools = [cls(client=mb) for cls in (MobileboxObserve, MobileboxAct, MobileboxScreenshot)]
agent = create_agent("openai:gpt-5.4-mini", tools=tools,
system_prompt=f"You operate the Android phone {phone.id}. Observe, act, and check each result.")
agent.invoke({"messages": [("user", "Open Settings > Display and tell me the brightness level.")]})
finally:
mb.delete_phone(phone.id)
A cloud phone costs $0.01 per minute while ready, billed per second; parked phones are free. New accounts start with $2 of credit. Prefer MCP? Any LangChain agent can load the same tools from https://mobilebox.dev/mcp with langchain-mcp-adapters (example).
Development
pip install -e ../mobilebox -e . pytest pytest-asyncio langchain-tests==1.1.9
pytest # offline: LangChain standard tests + each tool
MOBILEBOX_LIVE=1 MOBILESANDBOX_API_KEY=... pytest tests/integration_tests # one real phone, deleted at the end
MIT © fifteenA, Inc.
Metadata
Release files for langchain-mobilebox 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_mobilebox-0.1.0.tar.gz | 8.5 kB | With provenance | Details for langchain_mobilebox-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_mobilebox-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_mobilebox-0.1.0-py3-none-any.whl |
Total release size: 15.8 kB
Release files / langchain_mobilebox-0.1.0.tar.gz
| Download URL | langchain_mobilebox-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0356f82ab211e709ad88dd04ade8362fb7485f50a438072f1282121b2e33228f
|
|
BLAKE2b-256 checksum How to use checksums |
b048a52fb631323c239517288da37cf18e5e521f5794200af9c58ea100f9ed5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / langchain_mobilebox-0.1.0-py3-none-any.whl
| Download URL | langchain_mobilebox-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1eed2ed0e18cf8ea80979516437894bc36277138f780c1b33c42a7524af790c
|
|
BLAKE2b-256 checksum How to use checksums |
b5669f4f2267671785291c8549403cc4a7f0e8b9f5ea71e590fa0f244db83da0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for langchain-mobilebox 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for langchain_mobilebox-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.