Cua explained: computers, drivers and benchmarks for agents
Cua source code: trace a Python Driver call to the fleet boundary
Use the wrapper and fleet modules as reading anchors, without claiming a whole-monorepo audit.
What you will learn
- Locate the Python surface
- Identify the Fleet handoff
- Write a bounded trace
Before you start
- A disposable target and permitted task
- Basic understanding of host versus guest state
Capture observation, action, policy and final state for one bounded desktop task.
Key takeaways
- Python wrappers do not prove native behavior.
- Fleet selection must be tied to a specific guest.
- Uninspected branches should remain explicit.
Locate the Python surface
The fixed source includes cua_driver/wrapper.py and fleet.py. Start with a public call in the wrapper, identify its arguments and follow the returned object or error to the runtime interface.
Do not infer platform behavior from a Python method name. Native implementations and transport adapters can have different permissions or support matrices; the Driver README gives context for those layers.
Identify the Fleet handoff
The fleet module is an anchor for hosted target selection. Record how a claim or connection is represented before assuming a Driver action targets a particular guest.
The sandbox docs explicitly say creating a Fleet pool does not by itself install Driver into the guest. Trace the integration path and guest service contract in the actual environment you use.
Write a bounded trace
Record commit, call signature, target identifier, policy mode and observed result. If a branch crosses into Rust or a hosted service, mark it as uninspected instead of guessing its internal behavior.
This article inspected source files and documentation; it did not instrument a running desktop or measure IPC latency. Those require a separate controlled test.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Open wrapper.py and locate one public method.
- 2
Follow target selection in fleet.py.
- 3
Mark transport and native branches that need a runtime trace.
Copy-ready example
call: Driver method
inspect: arguments -> target -> policy -> transport
observe: screenshot or application state after actionFrequently asked questions
Was every Cua package audited?
No. The reading is limited to selected Driver and sandbox files.
Can the wrapper prove an action succeeded?
Only a target-state observation can establish the requested effect.
Sources
- Cua / libs/cua-driver/README.mdSource checked 2026-09-29
- Cua / libs/cua-driver/python/src/cua_driver/wrapper.pySource checked 2026-09-29
- Cua / libs/cua-driver/python/src/cua_driver/fleet.pySource checked 2026-09-29
- Cua / docs/content/docs/concepts/how-permission-policies-work.mdxSource checked 2026-09-29