This release is a pre-release and may not be stable for production use.
aiocua
A Simple Python CUA (Computer Use Agent) Solution
Status
This project is in Technical Preview.
- APIs are subject to change.
- Not ready for production use.
Supported Platforms
- Windows
- macOS
Installation
pip install aiocua
Quick Start
import asyncio
from aiocua import CuaOperator
async def main():
operator = CuaOperator()
# Get screen dimensions
width, height = await operator.dimensions()
# Take a screenshot (returns base64-encoded string)
screenshot_base64 = await operator.screenshot()
# Get monitor info
monitors = await operator.monitors()
for m in monitors:
print(f"Monitor {m.id}: {m.width}x{m.height} (scale={m.scale}, primary={m.primary})")
if __name__ == "__main__":
asyncio.run(main())
API Reference
All methods on CuaOperator are async.
Mouse
| Method | Description |
|---|---|
move(x, y) |
Move the cursor to the given coordinates. |
click(button="left", x=None, y=None) |
Click a mouse button. Supported buttons: left, right, wheel, back, forward. If x/y are provided, moves first. |
double_click(x=None, y=None) |
Double-click at the current or given position. |
drag(path) |
Drag along a list of (x, y) coordinates. |
scroll(scroll_x, scroll_y, x=None, y=None) |
Scroll by the given amounts. Optionally move to x/y first. |
Keyboard
| Method | Description |
|---|---|
key_press(keys) |
Press one or more keys simultaneously (e.g. ["CTRL", "C"]). Keys are automatically remapped per platform. |
type_text(text) |
Type a string of text, including Unicode characters. |
Screen
| Method | Description |
|---|---|
screenshot() |
Capture the screen and return it as a base64-encoded PNG string. |
dimensions() |
Return the primary monitor resolution as (width, height). |
monitors() |
Return a list of MonitorMetadata for each connected display. |
Other
| Method | Description |
|---|---|
wait() |
Wait for any pending operations to complete. |
Testing
pip install aiocua[test]
pytest
Metadata
Release files for aiocua 0.0.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiocua-0.0.0a1.tar.gz | 17.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiocua-0.0.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.2 kB
Release files / aiocua-0.0.0a1.tar.gz
| Download URL | aiocua-0.0.0a1.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54cf501eef62d69ee175c1c4f25f1a10db020d20bac84d8af1e556599125cae5
|
|
BLAKE2b-256 checksum How to use checksums |
a510a8ba44648a7f5838a471793c6e1e41e5c736e484d8a791f37b2c5110406f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 6, 2026.
Transparency logRelease files / aiocua-0.0.0a1-py3-none-any.whl
| Download URL | aiocua-0.0.0a1-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c598e98ac5821caefe878d04a454ab3d4205e7f27e5c53ec9efe5cfb6f05981
|
|
BLAKE2b-256 checksum How to use checksums |
e01245bae21822ec98c345aeecf5a970b2a29f35ed69ebc69e5ca2e840d91b95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 6, 2026.
Transparency log