rdp-cli
How to Use Multiple Monitors in an AI Agent RDP Workflow
When Do AI Agents Need Multiple Monitors?
Running an AI agent on one remote screen is straightforward. The workflow becomes harder when a Windows application uses two or more monitors. A window may open on the second display, a confirmation dialog may appear on the first, and a report may need to move between screens. Old screenshots and hard-coded coordinates can make the agent click the wrong control. With rdp-cli, an AI agent can connect to a multi-monitor RDP session, inspect individual displays, perform GUI actions and verify results with fresh screenshots.
- Run an ERP application on one monitor and documentation on another
- Test a desktop application with a separate approval dialog
- Monitor logs while operating a legacy Windows application
- Compare two reports side by side The remote Windows environment and RDP server must support the requested monitor layout.
How Multi-Monitor RDP Works with rdp-cli
Use this sequence: inspect the layout → capture the target display → perform one action → capture again → verify the result. Connect with the required layout:
rdp-cli connect \
--host WINDOWS_HOST \
--user WINDOWS_USER \
--password-stdin \
--layout @layout.json
Inspect the negotiated topology:
rdp-cli monitors --session SESSION
Capture the Full Desktop or One Monitor
Capture the complete workspace:
rdp-cli screenshot \
--session SESSION \
--monitor all \
--out overview.png
Capture one display for a focused view:
rdp-cli screenshot \
--session SESSION \
--monitor MONITOR_ID \
--out monitor-1.png
Per-monitor screenshots reduce visual noise and make it easier to locate the target window.
Perform Actions on a Specific Monitor
After inspecting a fresh screenshot, click a control on the selected display:
rdp-cli click \
--session SESSION \
--monitor MONITOR_ID \
--x X \
--y Y \
--observation OBSERVATION
Coordinates are relative to the selected monitor by default. Use desktop coordinates when an action must target the complete remote layout. After reconnection, a layout change or human takeover, capture a new screenshot before sending input.
Drag Windows Between Monitors
rdp-cli supports monitor-aware dragging:
rdp-cli drag \
--session SESSION \
--from-monitor MONITOR_1 \
--from-x X1 \
--from-y Y1 \
--to-monitor MONITOR_2 \
--to-x X2 \
--to-y Y2 \
--observation OBSERVATION
This can move a report window to a review screen or place a dialog where the agent can inspect it.
Human Review and Takeover
When a security prompt, destructive action, unexpected dialog or one-time approval appears, a person can open the same session in a native window or authorized browser, pause the agent and take control. Control can be returned after the correction.
RDP vs VNC for Multiple Monitors
VNC can display and control a remote desktop, but it does not support requested multi-monitor layout changes in the same way as RDP. Use RDP for monitor-specific screenshots, negotiated layouts and cross-monitor dragging.
Final Takeaway
An AI agent can automate a multi-monitor Windows desktop when it understands the remote display layout. The reliable pattern is: inspect the monitor topology → capture the target display → perform one action → capture a fresh screenshot → verify the result. See the quick-start guide and command reference.
FAQ
Can an AI agent capture only one monitor?
Yes. Use --monitor MONITOR_ID with the screenshot command.
How are coordinates handled when switching monitors? They are relative to the selected monitor by default. Use desktop coordinates for the complete remote layout.
Can rdp-cli drag a window between monitors? Yes. The drag command accepts separate source and target monitor IDs.
Does VNC support this multi-monitor workflow? VNC can control a desktop, but requested multi-monitor layout changes are not supported in the same way as RDP.