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_keyllm_modeldocker_container_namedocker_displaysleep_timescreen_width,screen_heightscreenshot_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
/dockerfor 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!
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cua_sdk-0.1.0.tar.gz | 11.0 kB | Without provenance | Details for cua_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cua_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cua_sdk-0.1.0-py3-none-any.whl |
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
|
Security for cua-sdk 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.