Skip to main content

clousd

Python client for CLOUSD: real Android phones in the cloud, built as specific real models, 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()
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("Pixel 7 #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.3.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 1.3.0
File Size Uploaded Provenance Actions
clousd-1.3.0.tar.gz 40.4 kB With provenance Details for clousd-1.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 75.7 kB

Release files / clousd-1.3.0.tar.gz

Download URL clousd-1.3.0.tar.gz
Size 40.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c38521b2e30b929ae364d4b0b9c4d4ac40bd267c75ce020e91d165396c4513aa
BLAKE2b-256 checksum
How to use checksums
4a8d2fc97bf6da37352c5112b612883303698e451f4a65d32b763130e04ce5d1
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 Oct 31, 2026.

Transparency log

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

Download URL clousd-1.3.0-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55419a97a829a7579ff35c4f0eee3a6a2dc247e946f50f485ae06e1f5ee64343
BLAKE2b-256 checksum
How to use checksums
3255769f6b8668b66fb09fb4edd1be0d74bc0aa55000b5494a0c0e2dbbb7fc3b
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 Oct 31, 2026.

Transparency log

Security for clousd 1.3.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.

Select from 2 files

Attestation for clousd-1.3.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 Oct 31, 2026.

Transparency log

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

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