File size: 4,983 Bytes
fe75e07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
license: apache-2.0
pretty_name: LibreOffice Writer computer-use environment (REA)
tags:
- computer-use
- cua
- gui-agent
- rl-environment
- agentenv
- desktop
- linux
- rea
- word-processor
- office
- odf
---

# LibreOffice Writer: a computer-use environment

![An agent solving the task in LibreOffice Writer](media/hero.gif)

**The real LibreOffice Writer 24.2 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.**

Writer opens a delivery notice from a corner shop. The agent has to move the delivery to a new date by editing the line under the title, keep the time, and save the document. 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)
- Scripted 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 the delivery notice open in LibreOffice Writer, move the delivery to Monday 24 November (same time, 8am to 10am) by changing the date under the title, then save the notice.

`bundle/artifacts/move-delivery-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 |
| --- | --- | --- |
| `new-date` | `value_equals` | `Documents/notice.odt` |
| `title-kept` | `value_equals` | `Documents/notice.odt` |
| `signature-kept` | `value_equals` | `Documents/notice.odt` |

The `.odt` is a zip. The checks read `content.xml` inside it and find paragraphs by their paragraph style, never by position. The subtitle must read the new date exactly, and the title and signature must be unchanged.

## Results

3 of 3 runs passed, about $0.58 per run.

| Run | Outcome | Turns | Cost | Video |
| --- | --- | --- | --- | --- |
| 1 | passed | 11 | $0.72 | [video](media/solve-1.mp4) |
| 2 | passed | 14 | $0.57 | [video](media/solve-2.mp4) |
| 3 | passed | 10 | $0.44 | [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 (`libreoffice-writer` 24.2.7).

```bash
pip install agentenv-framework==0.9.1431
hf download earakely-scale/LibreOfficeWriterComputerEnv-REA --repo-type dataset --local-dir writer
agent-env run writer/bundle --task move-delivery --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

[REA](https://github.com/morluto/rea) built this environment from a real session with the app:

1. **Capture.** REA launched LibreOffice Writer on a Linux desktop and recorded its package, windows and opened files while a scripted user made the edit. 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 and runs.** Scripted computer actions solved the task in a fresh computer, and the verifier failed before, passed after and failed again after `data/reset`. Then an agent solved it 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 seeded Writer profile turns off Writer's revision IDs (Tools > Options > Writer > Comparison, `StoreRSID`). With them on, which is Writer's default, retyping text splits the paragraph into styled runs, and the checks, which read the paragraph's first run, would fail a correct edit. A check on a paragraph's whole text would remove this need.
- The subtitle paragraph is found by its `Subtitle` style. An edit that changes the paragraph's style fails even if the text is right.
- The computer uses the `libreoffice-writer` version in Ubuntu 24.04's archive at build time; it is 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. LibreOffice Writer itself is not included: the computer installs it from Ubuntu's archive (`libreoffice-writer` 24.2.7) at build time, under its own licence (MPL-2.0).