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.
Installation
pip install cua-agent==0.4.53Usage
import asyncio
from agent import ComputerAgent
from computer import Computer
async def main():
# Initialize cloud computer
computer = Computer(
os_type="linux",
provider_type="cloud",
name="your-container-name",
api_key="your-cua-api-key"
)
# Initialize agent with ByteDance UI-TARS-2
agent = ComputerAgent(
tools=[computer],
model="cua/bytedance/ui-tars-2",
api_key="your-cua-api-key",
instructions="You are a helpful assistant that can control computers",
only_n_most_recent_images=3
)
# Run a task
async for result in agent.run("Open a browser and search for Python tutorials"):
print(result)
if __name__ == "__main__":
asyncio.run(main())What's Changed
- Jagjeevan's Fix + Merged Main for 4o Model Fix by @sarinali in #522
- fix: Added GPT-4o compatibility for screenshot actions with text parameter by @JagjeevanAK in #422
- Add test infrastructure with CI/CD #478 by @AceAtDev in #491
- Fix/omniparser predict refactor by @sarinali in #529
- Make VS Code Python interpreter path cross-platform by @skools-here in #520
- Fix: sanitize shell in subprocess calls by @AdityaBavadekar in #519
- [Agent] Add support for overriding api_base and api_url kwargs by @ddupont808 in #504
- Update model list and schedule daily test for agent testing by @YeIIcw in #540
- Add Claude Desktop Extension by @YeIIcw in #521
- [AGENT] - New Model Gelato-30B-A3B added by @tamoghnokandar in #558
- [AGENT] - New model UI-Ins added by @tamoghnokandar in #549
- Add "cua/" LLM provider by @ddupont808 in #506
- Add Local Desktop Mode for MCP Server with updated docs by @YeIIcw in #493
- Fix: Enable custom function tools with Anthropic models by @LucaStngn in #548
- Fix cua adapter, add UI-TARS-2 model by @ddupont808 in #592
- Fix cua adapter for anthropic models by @ddupont808 in #601
- Remove hud-python from cua-agent[all] extra by @f-trycua in #603
- Add automatic CUA_API_KEY environment variable support by @f-trycua in #604
New Contributors
- @AceAtDev made their first contribution in #491
- @skools-here made their first contribution in #520
- @tamoghnokandar made their first contribution in #545
- @dinmukhamedm made their first contribution in #404
- @LucaStngn made their first contribution in #548
Full Changelog: agent-v0.4.35...agent-v0.4.53