awlevin/typesafe-computer-use
Computer use for about $0.0002 a step: OCR the screen, classify the next action with TypeSafe, click. macOS.
What it solves
It reduces the cost and latency of AI-driven computer control. Traditional frontier models are expensive and slow because they process full screenshots and generate complex plans for every single step. This project replaces that expensive loop with a high-speed, low-cost classifier that handles most routine decisions, calling a larger "writer" model only when free-text input or final reasoning is required.
How it works
The system operates in a deterministic loop:
- Perception: It reads the screen using Vision OCR and the accessibility tree to identify controls and icons.
- State Augmentation: Code adds factual data (like dates, focused fields, and URLs) to the state so the model doesn't have to "reason" about them from pixels.
- Classification: A TypeSafe decision model selects the next action from a set of choices (action type, item, and site) with high speed and low cost.
- Execution: The chosen action is performed on the machine.
- Handoff: If the classifier stops, a larger writing model (like Claude) reads the screen to provide a final answer or ask a clarifying question.
Who it’s for
Developers looking to build cost-effective AI agents that can automate desktop tasks on macOS (and experimentally Windows) without the high overhead of constant frontier-model API calls.
Highlights
- Significant Cost Reduction: Claims to be 130x to 300x cheaper than using a frontier model for a 12-step task.
- Low Latency: Decision times are measured in milliseconds, making the end-to-end step significantly faster than traditional LLM-based computer use.
- Deterministic State: Offloads reasoning (like date parsing) to code to ensure reliability and reduce model dependency.
- Hybrid Architecture: Combines a fast classifier for navigation and a powerful writer for text generation.
Related
- Project
- Project
- Project
- Project