rpa-sandbox
by wayfarer6
README.md
# RPA-SANDBOX for AI Agent
## View four desktops at once

Open **Desktop → 5 View Sandbox → Open 2x2 Multi-View**, or **VS Code → RPA Sandbox → Setup → Open 2x2 Multi-View**. Choose **Focus & control** to operate one desktop, then **Back to 2×2** to return. With five or more desktops, use **Previous / Next**. Prepare a separate VNC target for each workspace first.
[Step-by-step screenshots: menus, setup, control, and page navigation](docs/guide.en.md#multi-view) · [한국어 안내](docs/guide.ko.md#여러-가상-데스크톱을-22로-보기)
[Quick Start: Windows / macOS / Linux](docs/quickstart.en.md)
[Multiple agents and workspaces](docs/multi-workspace.en.md)
[한국어](README.ko.md)
**Desktop app** · [Download the Windows x64 MSI, Linux x86-64 AppImage, or macOS DMG](https://github.com/wayfarer6/RPA-SANDBOX-for-AI-Agent/releases/tag/desktop-v0.1.11). Install Python 3.11 with Tkinter and venv first. On macOS, install Xcode Command Line Tools for Vision. On Linux, make the AppImage executable. Open Welcome to choose your workspace and recordings folder, install OCR, exchange collection ZIPs, and start the local MCP server. [Full window and noVNC sidebar guide](docs/desktop-app.en.md)
For a first run with the current source build:
1. Start Docker Desktop or Podman Desktop. In Welcome, choose **Start with Ubuntu Sandbox**, select your engine, and use **CPU**. This prepares Python/OCR and opens a 1920 × 1080 test desktop. The first download can take several minutes.
2. In **Collections**, use **Import Bundled Example** or import a collection ZIP. Shared Python helpers travel with new collection exports. If **Install Collection Packages** is enabled, install the collection's declared packages before running it.
3. In **Recordings**, open the **Web UI**, choose a workflow, read its starting conditions, and fill its inputs. Juice Shop needs a running test site and its base URL as reachable from the guest; the example ZIP does not host the website. Prefer a full-screen browser with a stable toolbar and the same layout as the recording.
4. Select **Run Workflow** and review the result. If a screen check fails, inspect the page before retrying a submission. **Open Latest Log** in Welcome helps diagnose setup failures. **MCP Server** is optional when replaying from the Web UI; start it after connecting the desktop to let an AI agent run workflows.
[](https://cdn.jsdelivr.net/gh/wayfarer6/RPA-SANDBOX-for-AI-Agent@7130f3976220e2e5b844069d430dfb38776e0102/docs/media/passkey-preview.mp4)
**17-second demo** · The recorder signs in with a passkey from an unlocked KeePassXC vault, clicks the on-screen controls, and verifies the signed-in message with OCR. [▶ Play](https://cdn.jsdelivr.net/gh/wayfarer6/RPA-SANDBOX-for-AI-Agent@7130f3976220e2e5b844069d430dfb38776e0102/docs/media/passkey-preview.mp4) · [Full noVNC recordings](docs/guide.en.md#full-novnc-recordings)
RPA Sandbox records desktop workflows over VNC and replays them through Python and Robot Framework. The MCP server lets an AI agent find recordings, inspect inputs, run ordered stages, and review OCR failures. Agents can reuse verified steps and inspect the live screen when a checkpoint fails.
## Start a container sandbox from VSIX Welcome
Open **RPA Sandbox → How to Use → Start a workspace sandbox container**, then select a workspace and Docker or Podman. Once Ubuntu XFCE with Firefox is ready, the VNC endpoint is connected automatically. Start, stop, and inspect the container from the sidebar; its guest home is preserved in the workspace. The desktop app and MCP use the same workspace settings.
On Windows, use Docker Desktop's Linux containers environment. VS Code and the app do not need Administrator access when the current user can use the engine. Prepare the engine, Compose, and WSL first; the app then runs the Compose commands. [Setup steps and MCP tools](docs/sandbox/workspace.en.md)

## Use a VNC virtual machine as a sandbox
When a hypervisor provides a reachable VNC display, RPA Sandbox can connect to its Windows, Linux, or macOS guest as a working sandbox. The desktop app and MCP server run on the host; recording and replay use the guest's screen and input through VNC. The bundled Ubuntu container connects the same way. Match the guest's resolution and scaling to the recording when replaying saved coordinates.
```mermaid
flowchart LR
Agent[AI agent / MCP client] --> App[RPA Sandbox desktop app and MCP server]
User[User / noVNC sidebar] --> App
App -->|Screen reads · pointer/keyboard input| VNC[VNC endpoint]
VNC --> VM[Hypervisor or container]
VM --> Guest[Windows · Linux · macOS guest]
Guest --> Target[Browser or target app]
```
**A person or a frontier LLM can author a workflow once and hand it to a smaller model to run.** For example, a person can write a Python login script by hand, record the steps over noVNC, or ask a larger model to write a replay with coordinate clicks and a signed-in checkpoint. The author tests it in a fresh session and saves it. A lightweight agent then finds the workflow through MCP, supplies the inputs for this run, and reads the result. The recorder handles the clicks. If a changed screen fails an OCR check, the author can use the failed stage and current screen to repair the workflow.
[Use the noVNC RPA Toolbar](docs/toolbar.en.md) · [Use the Tkinter Recorder GUI](docs/recorder-gui.en.md)
On Linux and Windows, PaddleOCR uses PP-OCRv5 models with **80+ recognition languages**, letting you verify desktop workflows across many locales. Choose the target’s language codes for OCR, such as `en`, `ko`, `ja`, `zh`, `es`, `ar`, `hi` or `ru`. Recognition quality depends on the selected model and screen layout. [PP-OCRv5 recognition models](https://paddlepaddle.github.io/PaddleX/latest/en/module_usage/tutorials/ocr_modules/text_recognition.html)
## Tested with Beam Free, with less model work after setup
The Juice Shop workflow ran through MCP with **Beam Free**. Once a workflow is recorded,
the model selects it and reads the result. Recorded VNC replay handles clicks and keystrokes,
and local OCR checks the result. That reduces the need for per-step screen analysis, image
inputs, and model decisions on repeat runs, making saved workflows practical for lightweight
agents.

The OpenCode screenshot reports **US$0.00** across three RPA test agents. It shows about
**964,800 tokens excluding cache reads** and **4.68 million including them**. The totals include
multiple sessions and do not measure per-run token savings against direct computer use.
## Quickstart prompt for Codex or Claude
Paste this into Codex or Claude to connect the local MCP server:
```text
Install RPA Sandbox MCP for this project using the latest published release:
https://github.com/wayfarer6/RPA-SANDBOX-for-AI-Agent/releases/latest
Use the MCPB if your host supports it. Otherwise extract the bundle and register
server/server.py as a local stdio MCP server using a Python virtual environment with
the project’s OCR dependencies and Robot Framework. Follow the repository setup guide
for the platform. Reuse my existing recordings folder and VNC target if configured.
Otherwise use examples/juice-shop for discovery and ask me which VNC target and Juice Shop base URL to use.
Keep the VNC password in the host's protected settings.
After connecting, call rpa_list_pipelines to verify MCP access and tell me what
workflows are available. Wait for my request before replaying anything.
```
## Set up VS Code
1. Install the VSIX from [GitHub Releases](https://github.com/wayfarer6/RPA-SANDBOX-for-AI-Agent/releases/latest), or [build it locally](#build-the-packages). Open a trusted workspace in VS Code 1.102 or later.
2. In **RPA Sandbox → Setup**, use **Create Python Environment** to create a workspace `.venv` with OCR, or select an existing Python 3.10+ interpreter. Use **Install Required Python Packages** to install the viewer and Robot Framework. Use **Install OCR Packages** to select or repair the CPU/CUDA backend.
3. Use **Choose Recordings Folder** and **Configure VNC Target**. Leave the VNC password blank if the server does not require one.
4. Set the VNC guest to **1920 × 1080**, **100% display scaling**, and recorder **Display Scale 1.0**. Start the VNC server separately. The recorder's local x11vnc auto-start is off by default.
5. Use **Check Environment and VNC** and open **How to Use** for the walkthrough.
## Record and run
- **Create Recording** opens a recording editor and lets you choose a collection. Starting the recording opens the noVNC viewer. Use **Recorder GUI** for the desktop interface.
- **Collections** shows recording titles from the Robot files. Open a title to inspect the suite, or use the collection's edit action to add or remove membership.
- **AI Agent** shows recent results, Robot pipelines and failures. An OCR failure includes the stage and checkpoint so the agent can inspect the live state before retrying.
- **Set Workflow Input** stores per-folder runtime values in VS Code SecretStorage. Restart the MCP connection after changing a runtime input.
## Use MCP
Use the VS Code extension's MCP provider or install the MCPB in a compatible client. Configure the Python interpreter, recordings folder, and VNC target. Local clients using the same build and Python environment share a worker. Each connection keeps its own settings and input values.
The [Juice Shop example](examples/juice-shop/README.md) includes a staged login pipeline and other recordings for a local lab. Choose `examples/juice-shop` as the recordings folder to use that collection. See the [integration guide](integrations/rpa-mcp/README.md) and [bundled agent skill](integrations/rpa-mcp/skills/rpa-sandbox/SKILL.md) for tool details.
The [RPA Bank / Gildong Bank example](examples/gildong-bank/README.md) provides bilingual banking apps and a financial rate comparison page. Run both banks with Python 3 and access them from your VNC desktop over the network.
[Watch the English banking demo](docs/media/gildong-bank/demo.en.mp4) · [한국어 영상](docs/media/gildong-bank/demo.ko.mp4) · [Screenshot walkthrough](docs/banking-agents.en.md) · [Windows / VirtualBox setup](docs/windows-virtualbox-vnc.en.md)
Compare net interest, redeem and reinvest: [smart deposit strategy](docs/deposit-strategy.en.md).

On **macOS 13+**, install Xcode Command Line Tools. The MCP server builds a native Swift helper and selects **Apple Vision OCR** at startup. On Apple Silicon, the helper runs as ARM64 even when Python runs under Rosetta. Vision manages device selection. Use `--ocr-host-info` to see the languages supported by the current version of macOS. Linux and Windows use PaddleOCR.
## Run from a terminal
Create a Python 3.10+ virtual environment and install the platform-specific dependencies. The desktop GUI also requires Tk.
```sh
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python sample-rpa/gui_recorder-v7.py --ocr-host-info
```
Run recordings through `gui_recorder-v7.py --exec-replay path/to/workflow.py`. A recording directory contains the Python replay, Robot suite, event log, and metadata. Supply protected runtime values through the launch environment.
## Build the packages
Run `bash integrations/rpa-mcp/build.sh` with Node.js and npm available. The script writes the VSIX and MCPB to `dist/`. Use `--vsix-only` to rebuild only the VS Code extension.
## License
The original RPA Sandbox code is [MIT licensed](LICENSE). OCR engines and model weights,
x11vnc, and noVNC retain their upstream licenses. See [Third-party notices](THIRD_PARTY_NOTICES.md).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues