rdp-cli

RDP vs VNC for AI Agents

AI agents need more than a remote connection. They need to see the desktop, perform an action, verify the result, and recover when something goes wrong. That makes the choice between RDP and VNC important.

The short answer

Choose RDP when the agent needs to automate Windows, process documents, use multiple displays, or move files in and out of a session.

Choose VNC when the agent must operate an existing desktop—the same screen a human user is already viewing.

Both work well, but they fit different workflows.

When RDP is the better choice

RDP is usually the practical default for Windows automation:

  • Office and desktop applications
  • Document processing and report generation
  • Repeatable remote sessions
  • Multiple-monitor workflows
  • Tasks that produce files the agent must return

For example, an agent can connect to Windows, open a spreadsheet, generate a report, save it, and download the finished file. A predictable session also reduces errors caused by old windows or unexpected dialogs.

When VNC makes more sense

VNC is useful when the current desktop is the source of truth:

  • An application is already open
  • A user and agent need to see the same console
  • You are maintaining a Linux or legacy GUI application
  • The task depends on what is currently visible

The tradeoff is that the agent depends more on the existing VNC server and desktop state. If the screen refresh is slow or a dialog blocks the application, the agent may act on stale information.

A reliable rdp-cli workflow

Do not let an agent send a long chain of blind clicks. Use this loop:

  1. Capture the current screen.
  2. Let the agent inspect it.
  3. Perform one controlled action.
  4. Capture the screen again.
  5. Verify the result before continuing.
./rdp-cli.exe screenshot --session $session --out ./before.png
./rdp-cli.exe screenshot --session $session --out ./after.png

For file-based tasks, transfer files directly instead of automating file dialogs:

./rdp-cli.exe files upload --session $session --local ./input.xlsx --path input.xlsx
./rdp-cli.exe files download --session $session --path report.xlsx --local ./report.xlsx

If the agent reaches an unexpected screen, watch the session and pause it before taking over:

./rdp-cli.exe watch --session $session --viewer window
./rdp-cli.exe pause --session $session

Decision rule

Use RDP for Windows automation, document workflows, multiple displays, and repeatable file-producing jobs.

Use VNC for existing desktop sessions, shared human-agent work, and applications that must be controlled exactly as a person sees them.

The protocol is only the connection layer. Reliable automation comes from the control loop: fresh screenshot, one action, fresh screenshot, verified result. That is what turns a remote desktop into something an AI agent can use safely.