Skip to main content

Desktop AI Agent powered by Claude Computer Use

Project description

GenWorker

A desktop AI agent powered by Claude Computer Use. GenWorker takes natural-language tasks and executes them on your desktop by controlling the mouse, keyboard, and shell — using Claude's computer, bash, and text editor tools.

Features

  • Computer Use — mouse clicks, keyboard input, and screenshots via Claude's computer tool
  • Shell Execution — runs PowerShell/CMD/bash commands
  • File Editing — view, create, and edit files with the str_replace_editor tool
  • Multi-monitor support — select which display to control
  • Adaptive screenshots — fast for CLI, slower for GUI loads, with JPEG compression
  • Retry & error recovery — exponential backoff on API errors, automatic recovery hints
  • Context management — token tracking, smart compaction, and image pruning
  • Task timeout — configurable time limit with graceful termination

Installation

pip install genworker-ai

Requirements

Quick start

  1. Create a .env file (or export the variable):

    ANTHROPIC_API_KEY=sk-ant-...
    
  2. Run a task:

    genworker "Open Notepad and write Hello World"
    

    Or start interactively:

    genworker
    

Usage

genworker [OPTIONS] [TASK]
Option Description
TASK Natural-language task to execute (interactive prompt if omitted)
--monitor, -m Monitor index to use (default: 0)
--list-monitors, -l List available monitors and exit
--no-thinking Disable Claude's extended thinking
--timeout, -t Task timeout in seconds (default: 600)

You can also run it as a Python module:

python -m genworker "Open Chrome and search for Python docs"

Configuration

All settings can be configured via environment variables or a .env file:

Variable Default Description
ANTHROPIC_API_KEY Required. Your Anthropic API key
MODEL claude-sonnet-4-5-20250929 Claude model to use
MAX_STEPS 100 Maximum agent loop iterations
TASK_TIMEOUT 600 Task timeout in seconds
THINKING_BUDGET 4096 Token budget for extended thinking
SCREENSHOT_INTERVAL 1.0 Seconds between screenshots
SCREENSHOT_QUALITY 75 JPEG compression quality (1-100)
MAX_CONTEXT_IMAGES 15 Max screenshots kept in context
BASH_TIMEOUT 30 Shell command timeout in seconds
MONITOR_INDEX 0 Default monitor index

License

MIT

Project details


Download files

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

Source Distribution

genworker_ai-0.1.0.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

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

genworker_ai-0.1.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file genworker_ai-0.1.0.tar.gz.

File metadata

  • Download URL: genworker_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for genworker_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 33cfd39e6c2ac0aeba12a2a0ebe536f75c4791b46a3ef01a5a7abe563bad9df2
MD5 4ba771c9db5b63e193e7a168f9b9b73f
BLAKE2b-256 4264612f2bec991a5b1c94a63e4118832c6bfa5802f972c081a7e5ac33c30c63

See more details on using hashes here.

File details

Details for the file genworker_ai-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for genworker_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97b5e8b67d0874373534280f1a9887bc55e610bb8eb0e201ddae64bfd498a5de
MD5 618a18228af986418e1eb9087c8fa9aa
BLAKE2b-256 dad5d2e37f71c5879224b33ce8cd63595fd158bf04bdeaf765178fff96f024e3

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 Pingdom Monitoring Sentry Error logging StatusPage Status page