Skip to main content

CUA Agent SDK

A reusable, pip-installable Python SDK for controlling a computer-using agent in a virtual desktop (e.g., Docker, VNC, or any custom environment) using OpenAI CUA models. The SDK is fully configurable, class-based, and easy to integrate into any Python project.


🚀 Installation

Install from source:

pip install .

or (when published):

pip install cua-sdk

🛠️ Usage

from cua_sdk import ComputerAgent

agent = ComputerAgent(
    openai_api_key="sk-...",
    llm_model="computer-use-preview",
    docker_container_name="cua-image",
    docker_display=":99",
    sleep_time=0.2,
    screen_width=800,
    screen_height=600,
    screenshot_format="jpeg",
    screenshot_detail="low",
    prompt_path="prompt.txt",
    # ...any other config
)

agent.start()
agent.send_prompt("Apply to this job: https://company.com/apply/123")
agent.change_config(llm_model="gpt-4.1-mini", sleep_time=0.1)
screenshot = agent.get_screenshot()
agent.reset_history()
agent.stop()
  • All parameters can be set via constructor, environment variables, or config defaults.
  • The agent is fully modular and can be used in any Python project.

⚙️ Configuration

Parameters (constructor, env, or config):

  • openai_api_key
  • llm_model
  • docker_container_name
  • docker_display
  • sleep_time
  • screen_width, screen_height
  • screenshot_format (jpeg/png)
  • screenshot_detail (low/high)
  • prompt_path
  • ...and more

Precedence:
Constructor argument > Environment variable > SDK default


📦 Project Structure

cua-sdk/
│
├── cua_sdk/
│   ├── __init__.py
│   ├── agent.py           # Main class-based SDK
│   └── ... (other helpers)
├── setup.py
├── pyproject.toml
├── README.md
├── requirements.txt
├── examples/              # (optional) usage scripts
├── docker/                # (optional) Dockerfiles, utilities

📝 Notes

  • The SDK does not require Docker or any specific environment—just pass the right config for your use case.
  • Example Dockerfiles and scripts are provided in /docker for convenience, but are not required for SDK use.
  • You can use your own prompt templates, models, and agent configuration.

🧑‍💻 Author


Build universal, automated desktop agents with the CUA Agent SDK!

Release files for cua-sdk 0.1.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 cua-sdk 0.1.0
File Size Uploaded
cua_sdk-0.1.0.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cua-sdk 0.1.0
File Interpreter ABI Platform
cua_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.4 kB

Release files / cua_sdk-0.1.0.tar.gz

Download URL cua_sdk-0.1.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a17baf16536179271d1199de6e27c91bf1341ae38f8af53e6f0acda2812cb5a1
BLAKE2b-256 checksum
How to use checksums
88391e897172ce23b8df9f2438d2c41fd2a15d2eaf0b4e2013ea83d6b3429433
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / cua_sdk-0.1.0-py3-none-any.whl

Download URL cua_sdk-0.1.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
280edfddf565eb031775eee36449754bd12596d2a2f2ce689c2ce0b45a811c39
BLAKE2b-256 checksum
How to use checksums
f93826014443c34b47d498f30010c0b86f2f798a47ce409bcd915759435b9864
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

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