earakely-scale's picture
REA computer-use environment, v0.1.0
5460ca3 verified
|
Raw History Blame Contribute Delete
6.6 kB
---
license: apache-2.0
pretty_name: AbiWord computer-use environment from a one-line request (REA)
tags:
- computer-use
- cua
- gui-agent
- rl-environment
- agentenv
- desktop
- linux
- rea
- word-processor
- office
- from-request
---
# AbiWord: a computer-use environment built from a one-line request
![An agent solving the task in AbiWord](media/hero.gif)
**The real AbiWord 3.0 word processor running on an Ubuntu 24.04 desktop, as an [agentenv](https://pypi.org/project/agentenv-framework/) computer environment. An agent completes the task only through screenshots, mouse and keyboard, and a verifier grades the saved files with no model.**
Claude Code built this environment from a one-line request in about 13 minutes, with only REA's build skill and MCP tools; [How it was made](#how-it-was-made) has the request and the steps. AbiWord starts with a blank document. The agent has to open the memo in `Documents/book-sale-memo.abw`, move the planning meeting from 10:00 AM to 2:30 PM, and save, leaving the memo's other 10:00 AM, an agenda deadline, alone. It sees only the screen and acts only with the mouse and keyboard.
## Watch
- Agent runs (Claude Code with Claude Sonnet 5.5): [run 1](media/solve-1.mp4), [run 2](media/solve-2.mp4), [run 3](media/solve-3.mp4)
- Witness, which proves the task can be done through the computer: [witness.mp4](media/witness.mp4)
Each video is the computer's own screen recording at 10 frames per second.
## The task
> The book sale planning meeting has moved. Change the meeting time in the memo Documents/book-sale-memo.abw to 2:30 PM and save it.
`bundle/artifacts/change-meeting-time-check/verify.py` reads the app's files through the computer's `data/get` view and passes only if every check holds:
| Check | Kind | File |
| --- | --- | --- |
| `meeting-time` | `text_equals` | `Documents/book-sale-memo.abw` |
| `agenda-deadline-kept` | `text_contains` | `Documents/book-sale-memo.abw` |
An `.abw` file is XML that declares a DOCTYPE; REA reads it without fetching the DTD and finds each paragraph by its `xid`, never by position. The checks compare a paragraph's whole text, with whitespace collapsed, however AbiWord splits it into `<c>` runs. The meeting paragraph must read "...at 2:30 PM in the Community Room on the second floor." in full, and the next paragraph must still contain "by 10:00 AM on Wednesday". That second 10:00 AM is there on purpose, so replacing every 10:00 AM fails.
## Results
3 of 3 runs passed, about $1.09 per run.
| Run | Outcome | Turns | Cost | Video |
| --- | --- | --- | --- | --- |
| 1 | passed | 19 | $1.20 | [video](media/solve-1.mp4) |
| 2 | passed | 18 | $1.62 | [video](media/solve-2.mp4) |
| 3 | passed | 20 | $0.46 | [video](media/solve-3.mp4) |
## Run it
You need Docker. `agentenv-framework` builds the computer: Ubuntu 24.04 with the app installed from Ubuntu's archive (`abiword` 3.0.5).
```bash
pip install agentenv-framework==0.9.1431
hf download earakely-scale/AbiWordFromRequestComputerEnv-REA --repo-type dataset --local-dir abiword-request
agent-env run abiword-request/bundle --task change-meeting-time --agent claude-code --model <model>
```
The agent needs a model provider configured for agentenv. `--task smoke` only boots the computer, with no agent. `bundle/README.md` describes the bundle in detail.
## How it was made
Claude Code built this environment from a one-line request, given only [REA](https://github.com/morluto/rea)'s build skill and REA's MCP tools:
> Build me an AbiWord environment where the agent changes the meeting time in a memo and saves it.
It asked only the skill's upfront questions, wrote no app-specific scripts, and finished in about 13 minutes.
This is the second build of the request. The first, earlier the same evening, exposed a gap in REA: AbiWord's `.abw` declares a DOCTYPE, which REA refused, so the file could only be checked as raw text lines. AbiWord also splits an edited paragraph into `<c>` runs, so those line checks failed one correct solve, and that build passed 2 of 3. REA then gained two things: reading XML with a plain DOCTYPE, never fetching the DTD, and checking an element's whole text (`text_equals`, `text_contains`) however an app splits it into runs. This rebuild uses them. The steps were REA's usual ones:
1. **Capture.** REA launched AbiWord on a Linux desktop and recorded its package, windows and opened files while the edit was made. It also recorded the app's state folders before and after.
2. **Export.** REA turned the capture into an agentenv `computer_app`. It installs the app, seeds the starting files, starts the app, and waits for its main window. It also serves typed views of the app's files for verifiers.
3. **Task.** The task's checks were validated against the capture: they fail on the starting state and pass on the captured end state.
4. **Witness.** In a fresh computer, the edit was made through computer actions alone, and the checks were read at four stages. They held on the first try:
| Stage | Checks |
| --- | --- |
| `seed` | fail, as expected |
| `after_edit` | pass: the saved memo split the edited paragraph across several `<c>` runs, and the check still read its whole text |
| `near_miss` | fail, as expected: the time was changed to "2:30 AM" |
| `after_reset` | fail, as expected: `data/reset` restored the seed |
The agent runs came after the build: Claude Code with Claude Sonnet 5.5 (`--model anthropic/claude-sonnet-5-5 --no-emulate`, on an amd64 host) solved the task 3 times, each run recorded.
## What's inside
```
bundle/ the agentenv bundle: envs/ (app module, seed files), tasks/, artifacts/ (verifier), evals/
media/ witness and agent-run recordings (MP4) with short GIF previews
results.json the runs above, with each check's result
```
## Limits
- AbiWord starts with a blank document, not the memo, so the agent must open `Documents/book-sale-memo.abw` itself.
- The prompt fixes the spelling "2:30 PM", and the check compares the whole sentence, so "2:30 p.m." or "14:30" fails.
- The computer installs whatever `abiword` Ubuntu 24.04's archive holds at build time (3.0.5 for these runs); it is not pinned.
- AbiWord stamps the author `user`, the computer's generic account, into the memo's metadata.
- Three runs is a small sample: the solve rate shows the task is solvable, not how hard it is.
## Licences
The bundle code, the task and the synthetic seed files are Apache-2.0. AbiWord itself is not included: the computer installs it from Ubuntu's archive (`abiword` 3.0.5) at build time, under its own licence (GPL-2.0-or-later).