Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
# docs: test="docs" prelude="spacesd,spacesd-vars"
import asyncio
from cua_sandbox import Sandbox
async def main():
async with Sandbox.connect(url=URL, token=TOKEN) as sb:
width, height = await sb.screen.size()
await sb.mouse.click(width // 2, height // 2)
await sb.keyboard.type("hello")
await sb.keyboard.keypress(["ctrl", "a"])
png = await sb.screenshot()
print(png[:4])
# b'\x89PNG'
asyncio.run(main())