clousd
Python client for CLOUSD: Android phones in the cloud on the Android version you pick, for scripts and AI agents. Give a phone a task in plain words and get the answer, or drive the screen yourself.
pip install clousd
export CLOUSD_API_KEY=cl_live_... # dashboard: Settings → Connections → API keys
Give a phone a task
from clousd import Clousd
c = Clousd() # key from CLOUSD_API_KEY
run = c.run("Open Settings and tell me the Android version", device="dev_04f2", wait=True)
print(run.status, run.answer) # completed Android 15
# the same task on several phones at once (up to 32): one run per phone under one parent
run = c.run("Open the Example Shop app and tell me what the first screen shows", devices=["dev_01", "dev_02"], wait=True)
for r in run.children:
print(r.device, r.status, r.answer)
# a saved login is typed on the phone without you or the model seeing it (add logins in the dashboard or below)
login = c.credentials("com.example.shop")[0]
run = c.run("Sign in and tell me how many orders are on the Orders page", device="dev_01", credentials=[login],
output_schema={"type": "object", "properties": {"orders": {"type": "integer"}}}, wait=True)
print(run.structured_output) # {"orders": 3}
Follow a run live and answer it when it asks:
run = c.run("Book the earliest table for two tonight", device="dev_01", mode="ask")
for ev in run.events(): # status | step | plan | card | answer | message | end
if ev["event"] == "step":
print(ev["data"]["n"], ev["data"]["tool"], ev["data"]["result"])
if ev["event"] == "card": # a question, or permission for a risky step
run.reply(allow=True) # or run.reply("7 pm")
print(run.refresh().answer)
for s in run.trajectory(): # every step: what it did and what happened
print(s["n"], s["tool"], s["result"])
Repeat a task on a schedule, and get a webhook when it ends:
c.add_schedule("Open the Orders page and report new orders", devices=["dev_01"], at="09:00", days=[1, 2, 3, 4, 5],
tz="Europe/Berlin")
hook = c.add_webhook("https://example.com/clousd", events=["run.completed", "run.failed"])
print(hook["secret"]) # shown once: verify X-Clousd-Signature with it
| Tasks | Logins | Schedules and webhooks |
|---|---|---|
c.run(task, device=… / devices=[…], credentials, output_schema, mode, max_steps, timeout, wait) |
c.credentials(package) |
c.schedules(), c.add_schedule(...) |
run.wait(), run.events(), run.trajectory(), run.step_image(n) |
c.add_credential(package, name, fields) |
c.toggle_schedule(id), c.delete_schedule(id) |
run.reply(answer / allow=), run.message(text), run.cancel() |
c.set_credential_field(id, type, value) |
c.webhooks(), c.add_webhook(url, events) |
c.runs(status=, device=), c.get_run(id), device.run(task) |
c.delete_credential(id) |
c.test_webhook(id), c.webhook_deliveries(id) |
Drive the screen yourself
phone = c.device("dev_04f2")
phone.reset() # fresh phone: apps and data wiped
phone.open_app("com.android.chrome")
phone.tap_text("Search")
phone.type("weather in Berlin")
phone.key("enter")
phone.wait_text("Berlin", timeout=30)
obs = phone.observe(width=540) # screenshot + UI tree + seq
phone.act("tap", seq=obs["seq"], x=540, y=1200, settle=True)
| Look | Act | State |
|---|---|---|
screenshot(width=None), observe(width, ui) |
tap(x, y), swipe(...), scroll("down"), long_press(...) |
start(), stop(), restart() |
screen_text(), find_text(text), size() |
type(text), key("back"), tap_text(text), wait_text(text) |
reset() (any state) |
delete() → Trash 14 days, delete(forever=True) |
||
c.trash(), c.restore(device) |
||
installed(), notifications(), clipboard_get() |
open_app(pkg), close_app(pkg), open_url(url), intent(...), settings("wifi") |
c.job(id).wait() |
app_info(pkg), crashes(pkg), health(), screenrecord(seconds) |
act(op, settle, seq, ...), clipboard_set(text) |
|
c.devices(), c.find("Phone #3"), c.balance() |
device.rename(...), c.create_device(...) |
device.network(), c.proxies(), c.bind_proxy(id, phones) |
Coordinates are device pixels (size() gives the screen). Long device 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.
Your own model, step by step
clousd.agent runs the loop "look at the screen, decide, act, check" on your machine with any OpenAI-compatible chat
model (llama.cpp, vLLM, Ollama, a hosted API): each step the model gets the screenshot with a number on every element
and calls one tool.
from clousd import Clousd
from clousd.agent import Agent, Model
phone = Clousd().device("dev_04f2")
res = Agent(phone, Model("http://127.0.0.1:8080/v1"), trace_path="run.jsonl").run("Open Settings and tell me the Android version")
print(res.status, res.answer)
Command line
clousd devices
clousd run "Open Settings and tell me the Android version" --device dev_04f2 # Clousd's agent, steps live
clousd run "Open the app and report the first screen" --device dev_01 --device dev_02
clousd runs --status failed
clousd agent "Turn on Dark theme" --device dev_04f2 --model-url http://127.0.0.1:8080/v1 # your own model
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
Upgrading from 0.3
c.run(task, ...) now starts a task (a Run). Removed: recipes(), run_recipe(), the group form of run(devices, steps), accounts() / add_accounts() / link_account() / add_via_instagram(), texts() / add_texts(),
device.recipe() and record_*(). Logins are credentials(), passed to a run.
clousd-mcp exposes the same as MCP tools for any MCP-capable agent. MIT license.
Metadata
Release files for clousd 1.6.1
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 |
|---|---|---|---|---|
| clousd-1.6.1.tar.gz | 41.7 kB | With provenance | Details for clousd-1.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clousd-1.6.1-py3-none-any.whl | Python 3 | none | any | Details for clousd-1.6.1-py3-none-any.whl |
Total release size: 78.3 kB
Release files / clousd-1.6.1.tar.gz
| Download URL | clousd-1.6.1.tar.gz |
|---|---|
| Size | 41.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a1d4d067c9bc62b9b44b2c87882a0413c9b1076ad028342a4f37d00d8781b65
|
|
BLAKE2b-256 checksum How to use checksums |
95f535a5344672a3ae27e91c43835484b156795d995e30db293969fe67c9b46d
|
| 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 11, 2026.
Transparency logRelease files / clousd-1.6.1-py3-none-any.whl
| Download URL | clousd-1.6.1-py3-none-any.whl |
|---|---|
| Size | 36.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22c70713c4d0ba425dbd3b162210c499002f6b52f46fb46a32da76edd65e17da
|
|
BLAKE2b-256 checksum How to use checksums |
7e16166a1671b75d0b7470ce25488f7598a5b5557b4b9c9a44c9c08b033c3b1e
|
| 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 11, 2026.
Transparency logSecurity for clousd 1.6.1
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 clousd-1.6.1.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 11, 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.