This project provides a computer automation demo where an AI agent remotely controls a virtual machine (VM) inside a Runloop Devbox. Inspired by Anthropic’s computer use demo, this adaptation ensures a secure, isolated execution environment while the AI agent runs locally and interacts with the remote desktop.
The AI agent uses LLMs to execute commands, manage files, and interact with applications in the remote Devbox, simulating real-world automation use cases.
- Remote Desktop Execution: The computer runs inside a Runloop Devbox, ensuring an isolated and reproducible environment.
- Local AI Agent Control: The agent runs locally and sends commands to the remote computer.
- Secure & Contained Execution: Prevents contamination of the local machine, ensuring all actions remain within the Devbox.
- Streamlit UI: Provides a web-based interface for controlling the remote machine.
- Integrated Toolkit: Supports command execution, file manipulation, and automation workflows.
browser_demo/
├── model/ # Directory for LLM-related files
├── static_content/ # Directory for static HTML content
├── .gitignore # Specifies files to be ignored by Git
├── LICENSE # MIT License
├── README.md # Project documentation
├── http_server.py # Basic HTTP server implementation
├── main.py # Main script to run the application
The AI agent supports multiple large language models (LLMs) via different APIs:
- Anthropic (Claude models via
ANTHROPIC_API_KEY) - AWS Bedrock (Bedrock models via
AWS credentials) - Google Vertex AI (Gemini models via
Google Cloud credentials)
Ensure you have the following installed:
- Python 3.10 or later
- Git
- Clone the repository:
git clone https://github.com/runloopai/examples.git cd runloop-demo-computer - Set up a Python virtual environment:
python3 -m venv venv source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
- Configure API keys: Create a .env file in the root directory and populate it with your credentials:
RUNLOOP_API_KEY=<YOUR_RUNLOOP_KEY> ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_KEY>
- Run the application:
python main.py
- Access the UI: Open your browser and navigate to http://localhost:8501 to interact with the remote-controlled browser session.
The computer environment runs remotely in the Devbox, ensuring a clean and secure execution state. The AI agent executes commands locally, forwarding them to the remote machine over a secure connection. For debugging, you can use VNC to view the remote desktop and verify actions in real time.
This project is licensed under the MIT License. See the LICENSE file for details.