Skip to main content

Shows my svg

Python macOS Discord PyPI

cua-agent is a general Computer-Use framework with liteLLM integration for running agentic workflows on macOS, Windows, and Linux sandboxes. It provides a unified interface for computer-use agents across multiple LLM providers with advanced callback system for extensibility.

Features

  • Safe Computer-Use/Tool-Use: Using Computer SDK for sandboxed desktops
  • Multi-Agent Support: Anthropic Claude, OpenAI computer-use-preview, UI-TARS, Omniparser + any LLM
  • Multi-API Support: Take advantage of liteLLM supporting 100+ LLMs / model APIs, including local models (huggingface-local/, ollama_chat/, mlx/)
  • Cross-Platform: Works on Windows, macOS, and Linux with cloud and local computer instances
  • Extensible Callbacks: Built-in support for image retention, cache control, PII anonymization, budget limits, and trajectory tracking

Install

pip install "cua-agent[all]"

Quick Start

import asyncio
import os
from agent import ComputerAgent
from computer import Computer

async def main():
    # Set up computer instance
    async with Computer(
        os_type="linux",
        provider_type="cloud",
        name=os.getenv("CUA_CONTAINER_NAME"),
        api_key=os.getenv("CUA_API_KEY")
    ) as computer:
        
        # Create agent
        agent = ComputerAgent(
            model="anthropic/claude-3-5-sonnet-20241022",
            tools=[computer],
            only_n_most_recent_images=3,
            trajectory_dir="trajectories",
            max_trajectory_budget=5.0  # $5 budget limit
        )
        
        # Run agent
        messages = [{"role": "user", "content": "Take a screenshot and tell me what you see"}]
        
        async for result in agent.run(messages):
            for item in result["output"]:
                if item["type"] == "message":
                    print(item["content"][0]["text"])

if __name__ == "__main__":
    asyncio.run(main())

Docs

License

MIT License - see LICENSE file for details.

Metadata

Release files for cua-agent 0.4.25

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-agent 0.4.25
File Size Uploaded Provenance Actions
cua_agent-0.4.25.tar.gz 98.5 kB Without provenance Details for cua_agent-0.4.25.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cua-agent 0.4.25
File Interpreter ABI Platform Actions
cua_agent-0.4.25-py3-none-any.whl Python 3 none any Details for cua_agent-0.4.25-py3-none-any.whl

Total release size: 220.1 kB

Release files / cua_agent-0.4.25.tar.gz

Download URL cua_agent-0.4.25.tar.gz
Size 98.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e3fd6e5f8a8769efee7d57f42b4795c83e919ff9d7b16fb09b1d197423ca3002
BLAKE2b-256 checksum
How to use checksums
70ed60bf9f98695b41ad6301de36858e9981ffc5f97306aa3366a151fd6370cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / cua_agent-0.4.25-py3-none-any.whl

Download URL cua_agent-0.4.25-py3-none-any.whl
Size 121.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9837b99156b3534f07e2385f48cf50f29d97fb3568d6c6679c68c81af0e88e96
BLAKE2b-256 checksum
How to use checksums
1ca291c15dce50fce2a366f68be011c1cfda287885a07e73e975aa06feae1fc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for cua-agent 0.4.25

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.

Release history Release notifications | RSS feed

This release

0.4.25 This release

2 release files No provenance

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