Hanzo Operative (hanzo-operative) is an autonomous computer use agent that enables AI to control desktop environments via screenshots, mouse, keyboard, and bash commands.
Category: Hanzo Ecosystem Related Skills: hanzo/hanzo-agent.md, hanzo/hanzo-mcp.md
Hanzo Operative (hanzo-operative) is an autonomous computer use agent that enables AI to control desktop environments via screenshots, mouse, keyboard, and bash commands. It uses Anthropic's Claude API with computer use tool definitions to analyze screenshots and execute actions. The entry point is a Streamlit web UI. Fork of Anthropic's computer-use demo.
hanzo-operative v0.1.1operative/operative.py) as the primary entry pointoperative/tools/:computer.py -- Screenshot, mouse, keyboard via xdotool/scrotbash.py -- Shell command executionedit.py -- File editingbase.py -- Base tool classcollection.py -- Tool collection registrygroups.py -- Tool groupingrun.py -- Tool execution runneroperative/loop.py) -- orchestrates Claude API calls with tool resultsoperative/prompt.py)docker/:Dockerfile -- Main image (builds on xvfb image)Dockerfile.desktop -- Desktop environment imageDockerfile.xvfb -- Xvfb virtual display imageghcr.io/hanzoai/operative:latest, ghcr.io/hanzoai/xvfb:latest, ghcr.io/hanzoai/desktop:latestfrom operative import Operative with op.click(), op.type() etc.op.execute_task() high-level task runner| Item | Value | |------|-------| | Repo | github.com/hanzoai/operative | | Package | hanzo-operative (PyPI) | | Version | 0.1.1 | | Upstream | Anthropic computer-use demo | | Python | >= 3.14 | | UI | Streamlit (port 8501) | | VNC | Port 5900 (native), 6080 (noVNC web) | | Docker images | ghcr.io/hanzoai/operative, ghcr.io/hanzoai/xvfb, ghcr.io/hanzoai/desktop | | Dev (native) | make run (runs uv run -- python3 -m streamlit run operative/operative.py) | | Dev (Docker) | make dev | | Setup | make setup (creates venv with uv, Python 3.14) | | Test | make test (pytest) | | Test + coverage | make test-cov | | Lint | make lint (ruff) | | Format | make format (ruff) | | License | MIT |
hanzoai/operative/
pyproject.toml # Package config (hanzo-operative 0.1.1, python >= 3.14)
requirements.txt # Pinned deps
Makefile # Build, run, test, Docker targets
operative/
__init__.py
operative.py # Streamlit UI entry point
loop.py # Agent loop (Claude API + tool orchestration)
prompt.py # System prompt
requirements.txt # Operative-specific deps
tools/
__init__.py # Tool exports
base.py # Base tool class
computer.py # Computer use (screenshot, mouse, keyboard)
bash.py # Bash command execution
edit.py # File editing tool
collection.py # Tool collection registry
groups.py # Tool grouping definitions
run.py # Tool execution runner
docker/
Dockerfile # Main operative image
Dockerfile.desktop # Desktop environment image
Dockerfile.xvfb # Xvfb virtual display base image
image/ # Docker image assets
tests/ # Test suite
docs/ # Documentation
From pyproject.toml:
anthropic >= 0.84.0 -- Claude API clientstreamlit >= 1.43.0 -- Web UI frameworkhttpx >= 0.28.0 -- HTTP clientpillow >= 12.1.1 -- Image processingcertifi >= 2025.1.31 -- TLS certificatesDev/test extras: pytest, pytest-cov, pytest-mock, pytest-asyncio, ruff, black
git clone https://github.com/hanzoai/operative.git
cd operative
# Run with Docker (includes Xvfb, xdotool, VNC, Streamlit)
make dev
# Requires: ANTHROPIC_API_KEY env var
# Access Streamlit UI
open http://localhost:8501
# Access VNC (view desktop)
open http://localhost:6080 # noVNC web client
# or connect VNC client to localhost:5900
git clone https://github.com/hanzoai/operative.git
cd operative
# Setup with uv (creates .venv with Python 3.14)
make setup
# Install system deps (Ubuntu/Debian)
sudo apt install xdotool xvfb scrot
# Start Xvfb if headless
Xvfb :99 -screen 0 1920x1080x24 &
export DISPLAY=:99
# Run
make run
# Equivalent to: uv run -- python3 -m streamlit run operative/operative.py
The make dev and make run-docker commands expose:
| Port | Service | |------|---------| | 5900 | VNC (native) | | 6080 | noVNC (web) | | 8080 | HTTP | | 8501 | Streamlit UI |
loop.py) sends the task to Claude with computer use tool definitionsThe tools are structured as Anthropic API tool definitions -- they are NOT a user-facing Python SDK. Claude decides when and how to use them based on visual analysis of screenshots.
| Target | Purpose | |--------|---------| | make setup | Create venv with uv + Python 3.14, install deps | | make run | Run Streamlit locally | | make dev | Run Docker container with all ports | | make build | Build operative Docker image | | make build-desktop | Build desktop Docker image | | make build-xvfb | Build xvfb Docker image | | make test | Run pytest | | make test-cov | Run pytest with coverage | | make lint | Run ruff check | | make format | Run ruff format | | make install-dev | Install with dev extras | | make install-test | Install with test extras |
hanzo/hanzo-agent.md -- Agent framework (can use operative for computer use)hanzo/hanzo-mcp.md -- MCP integrationLast Updated: 2026-03-13 Category: Hanzo Ecosystem Related: computer-use, automation, desktop, x11, xdotool, vision, streamlit Prerequisites: Python >= 3.14, Docker (recommended), Anthropic API key