Skip to main content

Operative

Computer use agent powered by Claude. Provides a Docker container environment where Claude interacts with a virtual desktop via screenshot, mouse, and keyboard tools, with a Streamlit UI for human interaction.

Image: ghcr.io/hanzoai/operative:latest Repo: github.com/hanzoai/operative

Note: Computer use is a beta feature. It poses unique risks distinct from standard API features. To minimize risks:

  1. Use a dedicated virtual machine or container with minimal privileges.
  2. Avoid giving the model access to sensitive data such as account login information.
  3. Limit internet access to an allowlist of domains.
  4. Require human confirmation for decisions with real-world consequences.

Instructions found in web content or images may override user instructions. Isolate the agent from sensitive data and actions.

What It Does

  • Runs a full Linux desktop (X11/Xvfb + VNC) inside Docker
  • Claude controls the desktop via screenshot/mouse/keyboard tool calls
  • Supports Anthropic API (direct), AWS Bedrock, and Google Vertex
  • Streamlit UI for sending instructions and watching the agent work
  • Built-in bash and file editing tools alongside computer control

Quick Start

Anthropic API

export ANTHROPIC_API_KEY=%your_api_key%
docker run \
    -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
    -v $HOME/.anthropic:/home/operative/.anthropic \
    -p 5900:5900 \
    -p 8501:8501 \
    -p 6080:6080 \
    -p 8080:8080 \
    -it ghcr.io/hanzoai/operative:latest

Bedrock

export AWS_PROFILE=<your_aws_profile>
docker run \
    -e API_PROVIDER=bedrock \
    -e AWS_PROFILE=$AWS_PROFILE \
    -e AWS_REGION=us-west-2 \
    -v $HOME/.aws:/home/operative/.aws \
    -v $HOME/.anthropic:/home/operative/.anthropic \
    -p 5900:5900 -p 8501:8501 -p 6080:6080 -p 8080:8080 \
    -it ghcr.io/hanzoai/operative:latest

Vertex

gcloud auth application-default login
export VERTEX_REGION=%your_vertex_region%
export VERTEX_PROJECT_ID=%your_vertex_project_id%
docker run \
    -e API_PROVIDER=vertex \
    -e CLOUD_ML_REGION=$VERTEX_REGION \
    -e ANTHROPIC_VERTEX_PROJECT_ID=$VERTEX_PROJECT_ID \
    -v $HOME/.config/gcloud/application_default_credentials.json:/home/operative/.config/gcloud/application_default_credentials.json \
    -p 5900:5900 -p 8501:8501 -p 6080:6080 -p 8080:8080 \
    -it ghcr.io/hanzoai/operative:latest

Accessing the Interface

Once the container is running, open http://localhost:8080 for the combined agent chat + desktop view.

The container stores settings (API key, custom system prompt) in ~/.anthropic/. Mount this directory to persist settings between runs.

Port Service
8080 Combined interface
8501 Streamlit UI only
6080 noVNC desktop only
5900 VNC (for VNC clients)

Screen Size

Set resolution with WIDTH and HEIGHT environment variables:

docker run \
    -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
    -e WIDTH=1920 -e HEIGHT=1080 \
    -v $HOME/.anthropic:/home/operative/.anthropic \
    -p 5900:5900 -p 8501:8501 -p 6080:6080 -p 8080:8080 \
    -it ghcr.io/hanzoai/operative:latest

XGA resolution (1024x768) is recommended. For higher resolutions, scale screenshots down to XGA and map coordinates back proportionally. For smaller displays, add black padding to reach 1024x768.

Development

./setup.sh  # configure venv, install dev dependencies, pre-commit hooks
docker build . -t operative:local
export ANTHROPIC_API_KEY=%your_api_key%
docker run \
    -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
    -v $(pwd)/operative:/home/operative/ \
    -v $HOME/.anthropic:/home/operative/.anthropic \
    -p 5900:5900 -p 8501:8501 -p 6080:6080 -p 8080:8080 \
    -it operative:local

The docker run command mounts the repo inside the container with auto-reloading enabled.

Credits

Based on Anthropic's computer use demo. See upstream repository for original implementation.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hanzo_operative-0.1.1.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hanzo_operative-0.1.1-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file hanzo_operative-0.1.1.tar.gz.

File metadata

  • Download URL: hanzo_operative-0.1.1.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for hanzo_operative-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8f4e919713197f8d8247c292e156d694718dce8e983c8b85bbedc217edb42728
MD5 f6bcf7a553fff6a40cb3df5816b83c8b
BLAKE2b-256 894cae4468f6d909a66bd05f92a7ee8921e2d1f1311127dba2ff54e1cedba04b

See more details on using hashes here.

File details

Details for the file hanzo_operative-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hanzo_operative-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1fb32505e847f5fa518cc6b42c2d8c4ffb1a0e33334574041d142101469ffec0
MD5 718835e1c0aacd0ca473055c7dbc33da
BLAKE2b-256 dbf1360f8a360b41a123876e3b8d28731533c26f717d82c452ffe768f3d12833

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page