Skip to main content

clousd

Python client for CLOUSD: cloud Android phones modelled on real devices, for scripts and AI agents. Look at the screen, act on it, reset the phone to a saved state between runs, clone as many copies as the job needs.

Early access: ask for a key at clousd.com/agents.

pip install clousd
export CLOUSD_API_KEY=cl_live_...

One run

from clousd import Clousd

c = Clousd()                                   # key from CLOUSD_API_KEY
phone = c.device("dev_04f2")

snap = next(s for s in phone.snapshots() if s["restorable"])
phone.restore(snap["id"])                      # reset: every run starts from the same state

png = phone.screenshot(width=540)              # look (JPEG when width is given, PNG otherwise)
print(phone.screen_text())                     # every text on the screen

phone.open_app("com.android.chrome")           # act
phone.tap_text("Search")
phone.type("weather in Berlin")
phone.key("enter")

phone.wait_text("Berlin", timeout=30)          # check

What a device can do

Look Act State
screenshot(width=None) tap(x, y), swipe(x, y, x2, y2, ms), scroll("down") snapshots()
screen_text() type(text), key("back") save_snapshot()
find_text(text) open_app(pkg), close_app(pkg), open_url(url) restore(id)
size() tap_text(text), wait_text(text, timeout) clone(id, name)
installed(), logs() start(), stop(), restart() c.job(id).wait()
observe(width, ui), screenrecord(seconds) act(op, settle, seq, ...), long_press(x, y, ms) recipe(...)
notifications(), clipboard_get() intent(action, data, ...), settings("wifi") record_start() / record_stop()
app_info(pkg), crashes(pkg), health() clipboard_set(text), notifications_open() / _clear()
c.proxies(), c.accounts(), c.texts(), c.media() c.add_proxy(...), c.bind_proxy(id, phones), c.rotate_proxy(id), c.add_accounts([...]), c.link_account(id, phone), c.upload_media(path), c.send_media(ids, phones) device.network(), device.set_network(...), device.rotate_ip()
c.balance()
c.find("Anna IG"), device.label device.rename("Anna IG"), c.add_via_instagram(ig_id, "com.instagram.barcelona")
c.recipes(app) c.run(devices, steps), c.run_recipe(devices, pkg, action, vars) job.results, job.failed

Coordinates are device pixels (size() gives the screen). Long operations return a Job; they wait by default, pass wait=False to poll yourself. Errors raise ClousdError with the HTTP status, a short code and a message. The API allows 60 requests a minute per key; the client waits and retries on 429.

For checks from inside the phone (app databases, files, dumpsys) open an ADB session to the device from the dashboard or POST /v1/devices/{name}/adb.

Many phones at once

A recipe runs an app flow (sign in, warm up, publish, delete the last post) without a model; run_recipe and run start it on up to 32 phones in parallel, wherever they live, and return one Job with a result per phone.

from clousd import Clousd

c = Clousd()
phones = [d for d in c.devices() if d.state == "running"]       # 10 phones, any servers

for r in c.recipes("instagram"):                               # what can run without a model
    print(r["action"], "-", r["about"], [i["name"] for i in r["inputs"]])

# sign every phone into its own account: one call, the phones work in parallel
accounts = {"dev_01": {"login": "anna.k", "password": "..."}, "dev_02": {"login": "mark_t", "password": "..."}}
job = c.run_recipe(list(accounts), "com.instagram.android", "login", vars_by_device=accounts)
print(job.failed)                                             # [] - or the devices to look at

# warm all ten up for 15 minutes, starts spread over 20-90 s so they do not move in lockstep
job = c.run_recipe(phones, "com.instagram.android", "warm",
                   {"seconds": 900, "comment_chance": 0.1, "comments": "Love this|So good|Wow"}, stagger=[20, 90])
for name, r in job.results.items():
    print(name, r["state"], r["steps"][-1]["output"])

c.run(phones, steps) takes your own chain of steps instead of a recipe (open_app, url, tap_text, wait_text, wait, browse, scroll, install_app, rotate, recipe, ...). With wait=False it returns at once; poll c.job(job.id).refresh() yourself.

Give a phone a task

clousd.agent runs the loop "look at the screen, decide, act, check" with any OpenAI-compatible chat model (a local llama.cpp or vLLM server, Ollama, a hosted API): each step the model gets the screenshot with a number on every element and the elements as text, and calls one tool (tap element 12, type, scroll, open_app, done).

from clousd import Clousd
from clousd.agent import Agent, Model

phone = Clousd().device("dev_04f2")
agent = Agent(phone, Model("http://127.0.0.1:8080/v1"), trace_path="run.jsonl")
res = agent.run("Open Settings and tell me which Android version this phone runs")
print(res.status, res.answer)          # done Android 14

Or from the command line (pip install "clousd[image]" adds Pillow for the numbered screenshots):

clousd run "Set an alarm for 7:30 AM" --device dev_04f2 --model-url http://127.0.0.1:8080/v1
clousd run "Turn on Dark theme" --device dev_04f2 --model-url ... --save-recipe dark.json   # the run becomes a recipe
clousd bench --device dev_04f2 --model-url http://127.0.0.1:8080/v1      # 12 everyday tasks with automatic checks
clousd explore com.android.settings --device dev_04f2                   # map of the app's screens + draft app pack
clousd record start --device dev_04f2   # ... do the flow on the phone ...   clousd record stop --device dev_04f2 --out flow.json
clousd recipe flow.json --device dev_04f2

Every step of a run is kept: what the model saw, what it called, what happened and how long each part took. A screen that changed between the look and the action is never acted on (the API answers 409 and the loop looks again).

Plug a phone into an AI agent

clousd-mcp exposes the same operations as MCP tools for any MCP-capable agent.

MIT license.

Metadata

Release files for clousd 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clousd 0.3.2
File Size Uploaded
clousd-0.3.2.tar.gz 38.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clousd 0.3.2
File Interpreter ABI Platform
clousd-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 72.5 kB

Release files / clousd-0.3.2.tar.gz

Download URL clousd-0.3.2.tar.gz
Size 38.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d06e22ee5c22bc3d89a82a9daf815a3e93c5d58ae082289c7215aef30cabce44
BLAKE2b-256 checksum
How to use checksums
fdd60f7acfc97f6f4e90ee83578f0e702f05ecb430171030576271d5351285d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 13, 2026.

Transparency log

Release files / clousd-0.3.2-py3-none-any.whl

Download URL clousd-0.3.2-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a202e40681e1a7b4243a7a6d2d511e0224266ed07da5d9a257a1eb4964d6351
BLAKE2b-256 checksum
How to use checksums
8c452a3be27a4200ff9ff19955837abc0a6c6d5dad2fe24c7ad0bf403ed6fe3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page