earakely-scale's picture
REA computer-use environment, v0.1.0
4a88c89 verified
|
Raw History Blame Contribute Delete
7.06 kB
---
license: apache-2.0
pretty_name: Freeplane computer-use environment from a one-line request (REA)
tags:
- computer-use
- cua
- gui-agent
- rl-environment
- agentenv
- desktop
- linux
- rea
- mind-map
- planning
- from-request
---
# Freeplane: a computer-use environment built from a one-line request
![An agent solving the task in Freeplane](media/hero.gif)
**The real Freeplane 1.7 mind-mapping app 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 27 minutes, with only REA's build skill and MCP tools; [How it was made](#how-it-was-made) has the request and the steps. Freeplane opens a small mind map, `Documents/weekend-trip.mm`, at launch: Weekend Trip in the middle, with three branches, Packing (Tent, Sleeping bags), Food (Pasta, Trail mix) and Route (Trailhead parking). The agent has to add a child topic, Water filter, under Packing and save the map. 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
> In my Weekend Trip mind map (Documents/weekend-trip.mm) in Freeplane, add a child topic called Water filter under Packing, and save the map.
`bundle/artifacts/add-water-filter-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 |
| --- | --- | --- |
| `water-filter-topic` | `line_count` | `Documents/weekend-trip.mm` |
| `no-leaf-became-parent` | `line_count` | `Documents/weekend-trip.mm` |
| `sleeping-bags-kept` | `lines_present` | `Documents/weekend-trip.mm` |
A Freeplane `.mm` file is XML with no XML declaration, so REA reads it as text lines. Each topic is a `node` element, written on one line when it has no children. The checks count lines: exactly one must contain `<node TEXT="Water filter" ID="`, exactly four must be `</node>`, as in the seed, so no topic that had no children gained one, and the Sleeping bags line must be unchanged. REA's draft suggested a check on the whole added line, including the id and the creation and modification times Freeplane gives a topic, which no other solve would reproduce; Claude Code discarded it and wrote these.
## Results
3 of 3 runs passed, about $0.57 per run.
| Run | Outcome | Turns | Cost | Video |
| --- | --- | --- | --- | --- |
| 1 | passed | 16 | $1.02 | [video](media/solve-1.mp4) |
| 2 | passed | 14 | $0.27 | [video](media/solve-2.mp4) |
| 3 | passed | 9 | $0.42 | [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 (`freeplane` 1.7.10, with `openjdk-17-jre`).
```bash
pip install agentenv-framework==0.9.1431
hf download earakely-scale/FreeplaneFromRequestComputerEnv-REA --repo-type dataset --local-dir freeplane-request
agent-env run freeplane-request/bundle --task add-water-filter --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 a Freeplane environment where the agent adds a child topic to a small mind map and saves it.
It asked only the skill's upfront questions, wrote no app-specific scripts, and finished in about 27 minutes.
It took a second capture. Freeplane writes its settings file, `~/.config/freeplane/1.7.x/auto.properties`, late, after the first capture's seed was saved, so the first bundle opened Freeplane's documentation map at every boot. Claude Code captured again, opening and closing Freeplane's preferences before saving the seed so the file was written. The steps were REA's usual ones:
1. **Capture.** REA launched Freeplane 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 topic was added through computer actions alone, and the checks were read at four stages. They held on the first try:
| Stage | Checks |
| --- | --- |
| `seed` | fail, as expected: there is no Water filter topic; the other checks pass |
| `after_edit` | pass |
| `near_miss` | fail, as expected: the topic was renamed "Water filtre" |
| `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
- The checks read the map as text lines, not as a tree, so they cannot tell which branch the new topic hangs from: Water filter added under Food, under Route or on the central topic passes too, as long as no topic that had no children gains one.
- Freeplane 1.7.10 does not start on Java 21, Ubuntu 24.04's default, so the bundle installs `openjdk-17-jre` beside it as an extra package.
- The Sleeping bags check compares that topic's whole line, including the modification time Freeplane writes, so editing Sleeping bags fails.
- The seed holds Freeplane's settings folder as the capture left it, including its log and two lock files. Freeplane started cleanly from it in the witness and in every run.
- The computer installs whatever `freeplane` and `openjdk-17-jre` Ubuntu 24.04's archive holds at build time (1.7.10 and 17.0.20 for these runs); they are not pinned.
- 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. Freeplane itself is not included: the computer installs it from Ubuntu's archive (`freeplane` 1.7.10, with `openjdk-17-jre`) at build time, under its own licence (GPL-2.0-or-later).