How suitedaces/computer-agent works
Project type and purpose
• This is a self-hosted desktop application written in Python (3.10+), using PyQt for the GUI.
• Purpose: let an AI agent (Anthropic Claude with “computer use” capability) drive your mouse/keyboard to perform arbitrary tasks on your machine.
File structure
Top level
• run.py ← application entrypoint
• requirements.txt ← Python dependencies (PyQt, anthropic SDK, automation libs)
• README.md, LICENSE, .gitignore
src/
• main.py ← orchestrator: initializes UI, ties modules together
• anthropic.py ← wrapper around Anthropic API calls (compute-use endpoint)
• prompt_manager.py ← assembles user instructions + context into prompts
• computer.py ← low-level OS automation (mouse moves, keyboard events)
• window.py ← GUI code (PyQt window, screenshot capture, UI element detection)
• voice_control.py ← optional speech-to-text input and event handler
• store.py ← persistence/logging of sessions, prompts, actions
README for additional insights
• External dependency: Anthropic API key, remote service in the cloud
• UI interactions via keyboard shortcuts (Ctrl+Enter, Ctrl+C, etc.)
• Emphasis on safety disclaimers, capturing screenshots, and logging actions
• Multi-platform support: MacOS, Windows, Linux