hkblockchaintechnology commited on
Commit
b35fddd
Β·
verified Β·
1 Parent(s): ff1e1a5

Add README.md

Browse files
Files changed (1) hide show
  1. README.md +103 -0
README.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Tiny Computer Agent
3
+ emoji: πŸ–±οΈ
4
+ colorFrom: indigo
5
+ colorTo: green
6
+ license: mit
7
+ tags:
8
+ - computer-use
9
+ - gui-agent
10
+ - agentic-harness
11
+ - local-first
12
+ - tiny-models
13
+ - offline
14
+ - marimo
15
+ ---
16
+
17
+ # πŸ–±οΈ Tiny Computer Agent
18
+
19
+ **An agentic harness that drives a real computer with a tiny, fully local model.**
20
+ No cloud API, no API keys, no telemetry β€” the model is small enough to run on the
21
+ same machine it is controlling.
22
+
23
+ > **Status: project scaffold.** This card pins down the harness contract
24
+ > (observe β†’ think β†’ act β†’ verify), the intended layout, and the safety model.
25
+ > Implementation lands next; see the [roadmap](#-roadmap).
26
+
27
+ ## The idea, in one loop
28
+
29
+ ```
30
+ observe think act verify
31
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
32
+ β”‚ screen │──────▢│ tiny │─────▢│ mouse / │─────▢│ next β”‚
33
+ β”‚ frame β”‚ β”‚ model β”‚ β”‚ keyboardβ”‚ β”‚ frame β”‚
34
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
35
+ β”‚
36
+ β—€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
37
+ ```
38
+
39
+ 1. **Observe** β€” grab the screen, downscale it, optionally attach OCR text or the
40
+ accessibility tree so the model never has to guess where things are.
41
+ 2. **Think** β€” a tiny (≀ 3B, quantised) vision-language model emits **exactly one
42
+ action** from a closed vocabulary.
43
+ 3. **Act** β€” the harness executes it with OS-level input (mouse, keyboard, scroll).
44
+ 4. **Verify** β€” the next frame shows whether it worked. Repeat, bounded by a step
45
+ budget and a kill switch.
46
+
47
+ ## Why "tiny" is the whole point
48
+
49
+ The harness does the heavy lifting, so the model does not have to be clever:
50
+
51
+ | Job | Who does it |
52
+ |---|---|
53
+ | Finding *where* a button is | OCR / accessibility tree / element index β€” not the model |
54
+ | Choosing *what* to do | tiny VLM over a **closed action menu** (click, type, key, scroll, wait, done) |
55
+ | Knowing if it worked | the next screenshot, plus harness-side checks |
56
+ | Recovering from a bad step | retry policy in `loop.py`, not in the weights |
57
+
58
+ That keeps the agent offline, instant to start, and small enough that a laptop
59
+ GPU (or plain CPU) is enough to run it β€” on the same box it is controlling.
60
+
61
+ ## Candidate backends
62
+
63
+ Pluggable behind one interface; nothing here requires a network call at run time.
64
+
65
+ - **Moondream 2** / **SmolVLM-256M / 500M** β€” ~hundreds of MB, safe default
66
+ - **Qwen2-VL-2B-Instruct**, **Florence-2-base** β€” stronger grounding, still tiny
67
+ - **OCR + text-only planner** β€” no VLM at all; the cheapest credible baseline
68
+ - **mock brain** β€” deterministic scripted actions, used for harness tests
69
+
70
+ ## Intended layout
71
+
72
+ ```
73
+ tiny-computer-agent/
74
+ β”œβ”€ README.md
75
+ β”œβ”€ tiny_computer_agent.py # marimo notebook: drive/watch the loop
76
+ β”œβ”€ src/tiny_computer_agent/
77
+ β”‚ β”œβ”€ observe.py # screen capture + OCR / accessibility tree
78
+ β”‚ β”œβ”€ brain.py # model backends behind one interface
79
+ β”‚ β”œβ”€ act.py # action vocabulary + pyautogui / xdotool executor
80
+ β”‚ β”œβ”€ loop.py # observe β†’ think β†’ act β†’ verify
81
+ β”‚ └─ safety.py # dry-run, allow/deny lists, kill switch, step budget
82
+ └─ LICENSE
83
+ ```
84
+
85
+ ## Safety, because this thing has your mouse
86
+
87
+ - Run it in a **VM, container, or throwaway desktop account**, never your real session.
88
+ - `--dry-run` logs every action without executing it, so you can read the plan first.
89
+ - Deny-list for shells, terminals, payment flows and password managers.
90
+ - Step budget + a global hotkey kill switch before anything touches the pointer.
91
+ - **Local-first, for real:** screen pixels and keystrokes never leave the machine.
92
+
93
+ ## Roadmap
94
+
95
+ - [ ] `loop.py` + `act.py` with the mock brain β€” the harness is testable before any model download
96
+ - [ ] OCR / AT-SPI element index, and click-by-element instead of click-by-pixel
97
+ - [ ] tiny-VLM grounding backend (transformers + llama.cpp GGUF)
98
+ - [ ] marimo UI: live screen preview, action log, pause / resume / step
99
+ - [ ] append-only run traces so failed episodes can be replayed and scored
100
+
101
+ ## License
102
+
103
+ MIT β€” see [LICENSE](LICENSE).