{"id":35030603,"url":"https://github.com/nilp0inter/computeruse","last_synced_at":"2026-05-20T17:38:59.614Z","repository":{"id":305589293,"uuid":"1023276234","full_name":"nilp0inter/computeruse","owner":"nilp0inter","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-23T09:04:18.000Z","size":47,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-27T21:41:43.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilp0inter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-20T22:33:59.000Z","updated_at":"2025-07-21T08:51:41.000Z","dependencies_parsed_at":"2025-07-21T01:22:58.228Z","dependency_job_id":null,"html_url":"https://github.com/nilp0inter/computeruse","commit_stats":null,"previous_names":["nilp0inter/computeruse"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nilp0inter/computeruse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilp0inter%2Fcomputeruse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilp0inter%2Fcomputeruse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilp0inter%2Fcomputeruse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilp0inter%2Fcomputeruse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilp0inter","download_url":"https://codeload.github.com/nilp0inter/computeruse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilp0inter%2Fcomputeruse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33269230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T15:12:43.734Z","status":"ssl_error","status_checked_at":"2026-05-20T15:12:42.300Z","response_time":356,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-27T06:58:37.075Z","updated_at":"2026-05-20T17:38:59.606Z","avatar_url":"https://github.com/nilp0inter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anthropic Computer Use Demo\n\n\u003e [!NOTE]\n\u003e Now featuring support for the new Claude 4 models! The latest Claude 4 Sonnet (claude-sonnet-4-20250514) is now the default model, with Claude 4 Opus (claude-opus-4-20250514) also available. These models bring next-generation capabilities with the updated str_replace_based_edit_tool that replaces the previous str_replace_editor tool. The undo_edit command has been removed in this latest version for a more streamlined experience.\n\n\u003e [!CAUTION]\n\u003e Computer use is a beta feature. Please be aware that computer use poses unique risks that are distinct from standard API features or chat interfaces. These risks are heightened when using computer use to interact with the internet. To minimize risks, consider taking precautions such as:\n\u003e\n\u003e 1. Use a dedicated virtual machine or container with minimal privileges to prevent direct system attacks or accidents.\n\u003e 2. Avoid giving the model access to sensitive data, such as account login information, to prevent information theft.\n\u003e 3. Limit internet access to an allowlist of domains to reduce exposure to malicious content.\n\u003e 4. Ask a human to confirm decisions that may result in meaningful real-world consequences as well as any tasks requiring affirmative consent, such as accepting cookies, executing financial transactions, or agreeing to terms of service.\n\u003e\n\u003e In some circumstances, Claude will follow commands found in content even if it conflicts with the user's instructions. For example, instructions on webpages or contained in images may override user instructions or cause Claude to make mistakes. We suggest taking precautions to isolate Claude from sensitive data and actions to avoid risks related to prompt injection.\n\u003e\n\u003e Finally, please inform end users of relevant risks and obtain their consent prior to enabling computer use in your own products.\n\nThis repository helps you get started with computer use on Claude, with reference implementations of:\n\n- Build files to create a Docker container with all necessary dependencies\n- A computer use agent loop using the Anthropic API, Bedrock, or Vertex to access Claude 3.5 Sonnet, Claude 3.7 Sonnet, Claude 4 Sonnet, and Claude 4 Opus models\n- Anthropic-defined computer use tools\n- A streamlit app for interacting with the agent loop\n\nPlease use [this form](https://forms.gle/BT1hpBrqDPDUrCqo7) to provide feedback on the quality of the model responses, the API itself, or the quality of the documentation - we cannot wait to hear from you!\n\n\u003e [!IMPORTANT]\n\u003e The Beta API used in this reference implementation is subject to change. Please refer to the [API release notes](https://docs.anthropic.com/en/release-notes/api) for the most up-to-date information.\n\n\u003e [!IMPORTANT]\n\u003e The components are weakly separated: the agent loop runs in the container being controlled by Claude, can only be used by one session at a time, and must be restarted or reset between sessions if necessary.\n\n## Quickstart: running the Docker container\n\n### Anthropic API\n\n\u003e [!TIP]\n\u003e You can find your API key in the [Anthropic Console](https://console.anthropic.com/).\n\n```bash\nexport ANTHROPIC_API_KEY=%your_api_key%\ndocker run \\\n    -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \\\n    -v $HOME/.anthropic:/home/computeruse/.anthropic \\\n    -p 5900:5900 \\\n    -p 7860:7860 \\\n    -p 6001:6001 \\\n    -it ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest\n```\n\nOnce the container is running, see the [Accessing the demo app](#accessing-the-demo-app) section below for instructions on how to connect to the interface.\n\n### Bedrock\n\n\u003e [!TIP]\n\u003e To use the new Claude 3.7 Sonnet on Bedrock, you first need to [request model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html).\n\nYou'll need to pass in AWS credentials with appropriate permissions to use Claude on Bedrock.\nYou have a few options for authenticating with Bedrock. See the [boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#environment-variables) for more details and options.\n\n#### Option 1: (suggested) Use the host's AWS credentials file and AWS profile\n\n```bash\nexport AWS_PROFILE=\u003cyour_aws_profile\u003e\ndocker run \\\n    -e API_PROVIDER=bedrock \\\n    -e AWS_PROFILE=$AWS_PROFILE \\\n    -e AWS_REGION=us-west-2 \\\n    -v $HOME/.aws:/home/computeruse/.aws \\\n    -v $HOME/.anthropic:/home/computeruse/.anthropic \\\n    -p 5900:5900 \\\n    -p 7860:7860 \\\n    -p 6001:6001 \\\n    -it ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest\n```\n\nOnce the container is running, see the [Accessing the demo app](#accessing-the-demo-app) section below for instructions on how to connect to the interface.\n\n#### Option 2: Use an access key and secret\n\n```bash\nexport AWS_ACCESS_KEY_ID=%your_aws_access_key%\nexport AWS_SECRET_ACCESS_KEY=%your_aws_secret_access_key%\nexport AWS_SESSION_TOKEN=%your_aws_session_token%\ndocker run \\\n    -e API_PROVIDER=bedrock \\\n    -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \\\n    -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \\\n    -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \\\n    -e AWS_REGION=us-west-2 \\\n    -v $HOME/.anthropic:/home/computeruse/.anthropic \\\n    -p 5900:5900 \\\n    -p 7860:7860 \\\n    -p 6001:6001 \\\n    -it ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest\n```\n\nOnce the container is running, see the [Accessing the demo app](#accessing-the-demo-app) section below for instructions on how to connect to the interface.\n\n### Vertex\n\nYou'll need to pass in Google Cloud credentials with appropriate permissions to use Claude on Vertex.\n\n```bash\ndocker build . -t computer-use-demo\ngcloud auth application-default login\nexport VERTEX_REGION=%your_vertex_region%\nexport VERTEX_PROJECT_ID=%your_vertex_project_id%\ndocker run \\\n    -e API_PROVIDER=vertex \\\n    -e CLOUD_ML_REGION=$VERTEX_REGION \\\n    -e ANTHROPIC_VERTEX_PROJECT_ID=$VERTEX_PROJECT_ID \\\n    -v $HOME/.config/gcloud/application_default_credentials.json:/home/computeruse/.config/gcloud/application_default_credentials.json \\\n    -p 5900:5900 \\\n    -p 7860:7860 \\\n    -p 6001:6001 \\\n    -it computer-use-demo\n```\n\nOnce the container is running, see the [Accessing the demo app](#accessing-the-demo-app) section below for instructions on how to connect to the interface.\n\nThis example shows how to use the Google Cloud Application Default Credentials to authenticate with Vertex.\nYou can also set `GOOGLE_APPLICATION_CREDENTIALS` to use an arbitrary credential file, see the [Google Cloud Authentication documentation](https://cloud.google.com/docs/authentication/application-default-credentials#GAC) for more details.\n\n### Accessing the demo app\n\nOnce the container is running, open your browser to [http://localhost:7860](http://localhost:7860) to access the combined interface that includes both the agent chat and desktop view.\n\nThe container stores settings like the API key and custom system prompt in `~/.anthropic/`. Mount this directory to persist these settings between container runs.\n\nAlternative access points:\n\n- Direct VNC connection: `vnc://localhost:5900` (for VNC clients)\n\n## Screen size\n\nEnvironment variables `WIDTH` and `HEIGHT` can be used to set the screen size. For example:\n\n```bash\ndocker run \\\n    -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \\\n    -v $HOME/.anthropic:/home/computeruse/.anthropic \\\n    -p 5900:5900 \\\n    -p 7860:7860 \\\n    -p 6001:6001 \\\n    -e WIDTH=1920 \\\n    -e HEIGHT=1080 \\\n    -it ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest\n```\n\nWe do not recommend sending screenshots in resolutions above [XGA/WXGA](https://en.wikipedia.org/wiki/Display_resolution_standards#XGA) to avoid issues related to [image resizing](https://docs.anthropic.com/en/docs/build-with-claude/vision#evaluate-image-size).\nRelying on the image resizing behavior in the API will result in lower model accuracy and slower performance than implementing scaling in your tools directly. The `computer` tool implementation in this project demonstrates how to scale both images and coordinates from higher resolutions to the suggested resolutions.\n\nWhen implementing computer use yourself, we recommend using XGA resolution (1024x768):\n\n- For higher resolutions: Scale the image down to XGA and let the model interact with this scaled version, then map the coordinates back to the original resolution proportionally.\n- For lower resolutions or smaller devices (e.g. mobile devices): Add black padding around the display area until it reaches 1024x768.\n\n## Development\n\n```bash\n./setup.sh  # configure venv, install development dependencies, and install pre-commit hooks\ndocker build . -t computer-use-demo:local  # manually build the docker image (optional)\nexport ANTHROPIC_API_KEY=%your_api_key%\ndocker run \\\n    -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \\\n    -v $(pwd)/computer_use_demo:/home/computeruse/computer_use_demo/ `# mount local python module for development` \\\n    -v $HOME/.anthropic:/home/computeruse/.anthropic \\\n    -p 5900:5900 \\\n    -p 7860:7860 \\\n    -p 6001:6001 \\\n    -it computer-use-demo:local  # can also use ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest\n```\n\nThe docker run command above mounts the repo inside the docker image, such that you can edit files from the host. Streamlit is already configured with auto reloading.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilp0inter%2Fcomputeruse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilp0inter%2Fcomputeruse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilp0inter%2Fcomputeruse/lists"}