From the source
Published on June 23, 2025 by Dillon DuPont Cua's computer-use capabilities that we touched on in Building your own Operator on macOS - Part 2 – your AI agents can click, scroll, type, and interact with any desktop application.
But what if your agent needs to do more than just UI automation?
What if it needs to process data, make API calls, analyze images, or run complex logic alongside those UI interactions, within the same virtual environment?
That's where Cua's @sandboxed decorator comes in.
While Cua handles the clicking and typing, sandboxed execution lets you run full Python code inside the same virtual environment.
It's like giving your AI agents a programming brain to complement their clicking fingers.
Think of it as the perfect marriage: Cua handles the "what you see" (UI interactions), while sandboxed Python handles the "what you compute" (data processing, logic, API calls) – all happening in the same isolated environment.
Cua excels at automating user interfaces – clicking buttons, filling forms, navigating applications.
But modern AI agents need to do more than just UI automation.
…





