Metadata-Version: 2.4
Name: genworker-ai
Version: 0.1.0
Summary: Desktop AI Agent powered by Claude Computer Use
Project-URL: Homepage, https://github.com/fabiokatsumi/GENWORKER
Project-URL: Repository, https://github.com/fabiokatsumi/GENWORKER
Project-URL: Issues, https://github.com/fabiokatsumi/GENWORKER/issues
Author-email: Fabio Katsumi <fabio.katsumi@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agent,ai,automation,claude,desktop
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.13
Requires-Dist: anthropic>=0.83.0
Requires-Dist: openai>=2.23.0
Requires-Dist: pillow>=12.1.1
Requires-Dist: pyautogui>=0.9.54
Requires-Dist: pyperclip>=1.11.0
Requires-Dist: python-dotenv>=1.2.1
Requires-Dist: screeninfo>=0.8.1
Description-Content-Type: text/markdown

# 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

```bash
pip install genworker-ai
```

## Requirements

- Python 3.13+
- An [Anthropic API key](https://console.anthropic.com/)

## Quick start

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

   ```
   ANTHROPIC_API_KEY=sk-ant-...
   ```

2. Run a task:

   ```bash
   genworker "Open Notepad and write Hello World"
   ```

   Or start interactively:

   ```bash
   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:

```bash
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](LICENSE)
