|
1 | 1 | # Using Agents |
2 | 2 |
|
3 | | -AskUI Vision Agent provides three predefined agent types for different automation targets. All agents share the same core API (`act()`, `get()`, `locate()`) but are optimized for their respective platforms. Each agent comes with its own system prompt tailored to its platform-specific tools and capabilities. |
| 3 | +AskUI Vision Agent provides four predefined agent types for different automation targets. All agents share the same core API (`act()`, `get()`, `locate()`) but are optimized for their respective platforms. Each agent comes with its own system prompt tailored to its platform-specific tools and capabilities. |
4 | 4 |
|
5 | 5 | ## ComputerAgent |
6 | 6 |
|
@@ -47,10 +47,30 @@ with WebVisionAgent() as agent: |
47 | 47 |
|
48 | 48 | **Default tools:** All `ComputerAgent` tools plus `goto`, `back`, `forward`, `get_page_title`, `get_page_url` |
49 | 49 |
|
| 50 | +## MultiDeviceAgent |
| 51 | + |
| 52 | +Use this agent when you need to control a desktop computer and an Android device within the same task. The agent has access to both the full set of computer tools (via AskUI Agent OS) and Android tools (via ADB), and can switch between devices seamlessly during execution. |
| 53 | + |
| 54 | +This is useful for cross-device workflows, such as triggering an action on the desktop and verifying the result on a mobile device, or transferring data between devices. |
| 55 | + |
| 56 | +```python |
| 57 | +from askui import MultiDeviceAgent |
| 58 | + |
| 59 | +with MultiDeviceAgent(android_device_sn="emulator-5554") as agent: |
| 60 | + agent.act("Open the web app on the computer and send a push notification, then verify it appears on the Android device") |
| 61 | +``` |
| 62 | + |
| 63 | +If you have multiple Android devices connected, pass the serial number of the target device via `android_device_sn`. You can find serial numbers by running `adb devices`. If omitted, no device is preselected and the agent will select one at runtime. |
| 64 | + |
| 65 | +Requires the `android` dependency installed (`pip install askui[android]`) and a connected device (physical or emulator). |
| 66 | + |
| 67 | +**Default tools:** All `ComputerAgent` tools plus all `AndroidAgent` tools. Additional tools can be provided via the `act_tools` parameter. |
| 68 | + |
50 | 69 | ## Choosing an Agent |
51 | 70 |
|
52 | 71 | | Target | Agent | Backend | |
53 | 72 | |--------|-------|---------| |
54 | 73 | | Desktop (Windows/macOS/Linux) | `ComputerAgent` | AskUI Agent OS (gRPC) | |
55 | 74 | | Android devices | `AndroidAgent` | ADB | |
| 75 | +| Desktop + Android | `MultiDeviceAgent` | AskUI Agent OS (gRPC) + ADB | |
56 | 76 | | Web browsers | `WebVisionAgent` | Playwright | |
0 commit comments