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()

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.

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.2.0

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.2.0
File Size Uploaded
clousd-0.2.0.tar.gz 32.8 kB Details

Built distribution (wheel)

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

Total release size: 62.1 kB

Release files / clousd-0.2.0.tar.gz

Download URL clousd-0.2.0.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d01ea2832a25e73159f63eaed19cc84b088a3d06601de29403547ce01c4e7c99
BLAKE2b-256 checksum
How to use checksums
dd93c6a958145c6848ea6533ea861f313f83fb541835ddf85936bd22b8110afa
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 10, 2026.

Transparency log

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

Download URL clousd-0.2.0-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd56ee1ac30e904aebbd8dc690ce3b65e8585ff343bf08b39e691a4bb51d85a4
BLAKE2b-256 checksum
How to use checksums
12459e5b8d396ac9d02d45433635338c4e352853d69400cf9c2a1e14077d7f85
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 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

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