
# Desktop GUI Agent
**Tell your computer what to do, in plain English.**
An autonomous desktop agent that observes your screen, plans, clicks, types, and
**verifies every single step**. It runs entirely on your own machine via
OpenVINO™ Model Server. No cloud. No API keys. No data ever leaves your desk.
[](https://www.python.org/downloads/)
[](#installation)
[](LICENSE)
[](https://github.com/openvinotoolkit/model_server)
[](https://www.riverbankcomputing.com/software/pyqt/)
[](#running-tests)
[How It Works](#how-it-works) •
[Architecture](#architecture) •
[Installation](#installation) •
[Safety](#safety) •
[Env Vars](#environment-variables) •
[Contributing](CONTRIBUTING.md)
---
## How It Works
The agent runs a closed-loop **See → Plan → Act → Verify** cycle at every step:
```
User Instruction
│
▼
┌─────────────┐ decompose ┌──────────────────────┐
│ Router Agent│ ──────────────▶│ Sub-tasks (ordered) │
└─────────────┘ └──────────────────────┘
│
┌───────────────┘ for each sub-task
▼
┌──────────────────┐
│ Planning Agent │ plans ONE step at a time
└──────────────────┘ from the LIVE screen state
│
┌───────────┴────────────┐
▼ ▼
┌──────────────────┐ ┌──────────────────┐
│ Grounding Agent │ │ Action Agent │
│ UIA / OCR / VLM │ │ clicks, types, │
│ → screen (x, y) │ │ presses keys │
└──────────────────┘ └──────────────────┘
│
▼
┌──────────────────────┐
│ Reflection Agent │ OCR→LLM verifies outcome
└──────────────────────┘ (VLM check for visual steps)
│
confirmed? ─▶ next step
failed? ─▶ retry / replan
```
Planning is **dynamic**: the planner sees the live screen before every step, so
it recovers from popups, focus changes, and failed actions instead of blindly
executing a stale plan.
### Grounding pipeline (fastest → most robust)
| Stage | Method | When it fires |
|-------|--------|---------------|
| 0 | Windows UIA accessibility tree | Exact coordinates in ~20-50 ms |
| 1 | OCR fuzzy-match (RapidOCR) | Target text is visible on screen |
| 2 | VLM direct (x, y) coordinates (UI-TARS) | Icon, field, or unlabelled element |
If all stages miss, the grounder asks the LLM for alternative label phrasings
and retries the pipeline.
---
## Architecture
The system is organised into five layers. Every agent depends only on the
`InferenceClient` protocol, never on a concrete backend, so the inference
engine is drop-in replaceable.
> **New to the code?** Start with [ARCHITECTURE.md](ARCHITECTURE.md): the
> current end-to-end pipeline, the table of ground-truth mechanisms, and a
> one-line map of every file. The [Code Tour](docs/CODE_TOUR.md) adds a
> guided reading order through the modules.
```mermaid
flowchart TB
USER(["User instruction: