Create Open Source Computer‑Use Agents Quickly with Cua
The next frontier in AI isn't just about answering questions—it's about taking action. Imagine an AI that can operate a computer just like a person: seeing the screen, clicking buttons, and typing to complete complex tasks. These are computer-use agents (CUAs), and they are set to revolutionize automation. We created Cua: Containers for Computer-Use AI Agents, a powerful, open-source framework designed to make building these agents fast, simple, and safe. With Cua, you can empower your AI to move beyond conversation and actively perform tasks, automating entire workflows directly on a computer's graphical interface.
What is a Computer-Use Agent?
A computer-use agent is an AI system specifically designed to interact with graphical user interfaces (GUIs) to perform tasks. This marks a significant leap from traditional automation. While scripts and macros can automate repetitive actions, they are often rigid and fragile; a minor UI change can break them completely.
CUAs, on the other hand, use vision-language models to perceive and understand the screen, allowing them to adapt to changes and handle dynamic environments with human-like flexibility. This capability is transforming how we think about automating workflows on desktop and web applications [1]. However, giving an AI control over a computer introduces significant risks. This is the primary problem Cua solves: we provide a safe, reliable, and developer-friendly environment for these powerful agents to operate in, mitigating risks while accelerating development.
Introducing Cua: The Open-Source Framework for CUAs
Cua is a comprehensive framework for developing, containerizing, and deploying computer-use agents across Windows, macOS, and Linux. As an open-source project, Cua provides the essential infrastructure, SDKs, and benchmarks needed to build and evaluate your own agents. You can find the entire project on our GitHub repository.
One of the most critical challenges in CUA development is security and stability. Running a developing agent directly on your local machine is risky. As one developer noted, "VM for Agents. Just today, my agent setup broke my computer, preventing disk writing (which also means most programs won't start)." An untrained or buggy agent could accidentally delete critical files, change system settings, or break your development environment.
Cua addresses this head-on by using secure, isolated containers (VMs and Docker) that act as sandboxes for your agents. This containment ensures that no matter what the agent does, your host system remains completely untouched. This makes agent development safe and reliable. You can find more details in our Home | Cua Docs.
How to Get Started with Cua in Minutes
We designed Cua to be incredibly easy to use. You can build and run your first open source computer use agent in just a few steps.
Step 1: Install the Cua Agent SDK
First, install our Python package with a single command. This gives you all the tools you need to start building.
bashpip install cua-agent
Step 2: Write Your First Agent
With the SDK installed, you can write and run your first agent with just a few lines of Python. The code below demonstrates how to set up a sandboxed computer instance, initialize an agent with a specific AI model, and assign it a simple task.
pythonfrom agent import ComputerAgent from computer import Computer # Initialize local Docker computer computer = Computer( os_type="linux", provider_type="docker", name="trycua/cua-ubuntu:latest" ) # Initialize agent with model and tools agent = ComputerAgent( model="anthropic/claude-sonnet-4-5-20250929", tools=[computer] ) # Run agent with task messages = [{"role": "user", "content": "Take a screenshot"}] async for result in agent.run(messages): print(result)
Step 3: Choose Your AI Model
Cua is model-agnostic, giving you the freedom to choose the best AI for your task. Through our integration with LiteLLM, you can use a wide variety of large language models (LLMs), including:
- Anthropic's Claude family
- Google's Gemini models
- OpenAI's GPT series
- Open-source models like Qwen3 and InternVL
For a comprehensive list of compatible models, please see our documentation on supported CUA models.
Cua's Key Features for Building Robust Agents
Cua is more than just a sandbox; it's a full-featured platform with tools designed for building sophisticated agents.
App-Use: Control Specific Applications for Focused Tasks
We are currently developing an experimental "App-Use" feature, which allows an agent's control to be restricted to a single application window. This is a game-changer for creating lightweight, focused agents that are more precise and efficient. By limiting the agent's context, you can run multiple agents in parallel without them interfering with each other—for example, one agent could be researching in a browser while another drafts a report in a text editor. Learn more about this powerful capability in our App-Use blog post.
A Growing Open-Source Ecosystem
The field of computer-use agents is evolving rapidly, and Cua is proud to be part of a vibrant open-source community. Several exciting frameworks are pushing the boundaries of what's possible. We encourage developers to explore the landscape, which includes excellent projects like Open Computer Use [2] and Agent-S [4]. Understanding the ecosystem and the different open-source alternatives helps in making informed decisions for your projects [3].
Model Context Protocol (MCP) Integration
For developers looking to integrate with existing clients, Cua supports the Model Context Protocol (MCP). This allows you to run Cua agents through clients like the Claude Desktop app, streamlining your workflow. You can find instructions on how to set this up in our MCP server documentation.
Conclusion: Build the Future of Automation with Cua
Cua offers a powerful, secure, and easy-to-use open-source framework for creating the next generation of computer-use agents. By providing secure sandboxing, rapid development tools, and the flexibility to use any AI model, we empower you to build robust automation solutions safely and efficiently.
The momentum behind this technology is undeniable—our project has even been #1 trending on GitHub, reflecting the excitement in the developer community. We invite you to join us and start building the future of automation. Explore Cua: Containers for Computer-Use AI Agents today and create your first open source computer use agent.
Citations
[1] https://akira.ai/blog/gui-agents-automate-repetitive-tasks
[2] https://github.com/e2b-dev/open-computer-use
[3] https://simular.ai/post/open-source-alternatives-to-claude-computer-use