This ElizaOS plugin provides “computer-use” actions via multi-turn loop modelled after Anthropic computer use demo, allowing AI agents to execute local GUI actions, run bash commands, edit text, and more—all in a headless Docker environment with VNC/noVNC access.
- Multi-Turn “Tool Use”: The agent can use a specialized loop that streams partial responses while it runs local system commands or GUI interactions in a Docker-based headless environment.
- Local GUI Interactions: Tools for “computer” and “bash” usage (mouse, keyboard, screenshots, file editing).
- Anthropic Integration: Leverages Anthropic’s advanced model endpoints (like
claude-3-5-sonnet-20241022) with specialized “computer_use” Beta flags.
- ElizaOS:
- Anthropic: Valid API key, e.g.
ANTHROPIC_API_KEY=sk-yourKeyHere - Linux / Docker: Ubuntu-based environment recommended if running locally; or any Docker-compatible OS
- Node.js: v23.3.0 (install in Docker)
If you prefer to integrate the plugin into your local Eliza setup outside of Docker:
-
Install the Plugin:
pnpm install @elizaos/plugin-computer-use
-
Add to Your Character File:
-
Set Up a Virtual X Environment
Requiredxvfb,xdotool, etc. on your host for GUI simulation. The tools are alreadyinstalled in the Docker container. Then run the start.sh script to start the VM with GUI and Eliza. -
Start Your Agent:
pnpm start --character="characters/computer-use.character.json"Whenever the agent receives a message that triggers
ANTHROPIC_COMPUTER_USE, it will attempt local commands.
The repository includes a Dockerfile and scripts to spin up a fully self-contained environment:
/Users/ak36/Desktop/walle/eliza-acu-docker
├── .env.example # Example environment variables
├── Dockerfile # Defines the Ubuntu-based environment with Xvfb, noVNC, etc.
├── start.sh # Entry script to run Xvfb, window manager, VNC, Eliza, and client
└── .config/tint2/ # Tint2 panel config & desktop launcher files
- Add your plugin code inside the Eliza monorepo, or ensure your
Dockerfilereferences it properly. - From
eliza-acu-docker/, run:docker build -t eliza-computer-use:latest .- The Dockerfile:
- Installs dependencies (xvfb, xdotool, scrot, mutter, etc.)
- Clones the Eliza repository, checks out
develop - Installation and build steps (
RUN pnpm install && pnpm build) - Copies scripts and config
- The Dockerfile:
- Copy
.env.exampleto.envand update relevant variables:cp .env.example .env nano .env
- Ensure you set
ANTHROPIC_API_KEYand any other relevant environment variables for your Eliza agent.
docker run --name eliza-computer-use \
-p 8080:8080 -p 5173:5173 -p 3000:3000 \
-d eliza-computer-use:latest- Ports:
- 8080: noVNC Access (GUI)
- 5173: Eliza UI client
- 3000: Eliza server (REST API, etc.)
-
noVNC:
Open http://localhost:8080/vnc.html in your browser.
You’ll see a lightweight X session with a Tint2 panel and launcher icons (Firefox, xterm, gedit, etc.). -
Eliza Web Client:
Open http://localhost:5173 to chat with your agent. -
Eliza Server:
The internal agent logs appear in container logs:docker logs -f eliza-computer-use
- Stop Container:
docker stop eliza-computer-use
- Restart Container:
docker start eliza-computer-use
- Remove Container:
docker rm -f eliza-computer-use
- User: “Could you open Firefox and show me a screenshot?”
- Agent (via
ANTHROPIC_COMPUTER_USEaction):- Launches Firefox by sending a
bashorcomputertool command inside the Docker container’s X session - Streams partial responses for each step
- Takes a screenshot and returns the final base64-encoded image or partial images
- Launches Firefox by sending a
- Console Logs: Provide detail about tool calls, e.g.:
[multiTurnComputerUse] Running tool 'bash' with input: (DISPLAY=:1 firefox-esr &) [tool_result] 'Launched Firefox successfully.' [multiTurnComputerUse] Running tool 'computer' with input: { "action": "screenshot" } [tool_result] [image omitted]
Below are some commonly adjusted fields in .env.example:
ANTHROPIC_API_KEY=sk-...
WIDTH=1024
HEIGHT=768Adjust them to match your environment and desired agent configuration.
If you edit your plugin code:
- Rebuild your plugin and Eliza:
cd eliza/packages/plugin-anthropic-computer-use pnpm install pnpm build - Rebuild Docker image:
docker build -t eliza-computer-use:latest . - Run the container again with updated code.
The included start.sh:
- Launches
Xvfbat:1with resolution from$WIDTH/$HEIGHT - Starts
mutterwindow manager andtint2panel - Runs
x11vncon port5900plusnoVNCon8080 - Finally starts the Eliza server (
pnpm start) on port3000and the Eliza UI client on port5173 - Ends with a
tail -f /dev/nullto keep container alive
If you want to customize anything, just edit start.sh (for instance, change resolution or noVNC port).
Demo Video:
https://drive.google.com/file/d/1j70TUMyCNVl_7XQYw4hj-Y9wlore_cKm/view?usp=sharing
Docker Logs: https://pastebin.com/E5uczf9B
This plugin is distributed under the MIT License.
Contributions are welcome—please open a PR or file an issue!
- Maintainer: amit0365 / TinFoil Labs
- Repository: GitHub Link
- Questions: Feel free to reach out via GitHub issues
Thanks for using @elizaos/plugin-computer-use—now your waifu can tinker with your cerebrum!
{ "name": "ComputerUseAgent", "modelProvider": "anthropic", "plugins": ["@elizaos/plugin-computer-use"], "settings": { "secrets": { "ANTHROPIC_API_KEY": "sk-yourKeyHere" } } }