earakely-scale's picture
REA computer-use environment, v0.1.0
db620a0 verified
|
Raw History Blame Contribute Delete
6.57 kB
metadata
license: apache-2.0
pretty_name: LyX computer-use environment from a one-line request (REA)
tags:
  - computer-use
  - cua
  - gui-agent
  - rl-environment
  - agentenv
  - desktop
  - linux
  - rea
  - document-processor
  - latex
  - writing
  - from-request

LyX: a computer-use environment built from a one-line request

An agent solving the task in LyX

The real LyX 2.4 document processor running on an Ubuntu 24.04 desktop, as an agentenv 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 26 minutes, with only REA's build skill and MCP tools; How it was made has the request and the steps. LyX opens a short report, Documents/garden-report.lyx, at launch: a title and three sections, Introduction, Soil Preperation and Harvest Results, each with one paragraph. The agent has to correct the misspelled heading to Soil Preparation and save. 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, run 2, run 3
  • Witness, which proves the task can be done through the computer: witness.mp4

Each video is the computer's own screen recording at 10 frames per second.

The task

In LyX, the heading of section 2 in Documents/garden-report.lyx says "Soil Preperation". Correct the misspelled word so the heading reads "Soil Preparation", and save the document.

bundle/artifacts/fix-section-heading-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
heading-fixed lines_present Documents/garden-report.lyx
typo-gone lines_absent Documents/garden-report.lyx
three-sections line_count Documents/garden-report.lyx
other-headings-kept lines_present Documents/garden-report.lyx

A .lyx file is LyX's own plain-text format, with one command or paragraph per line, so REA reads it as text lines. The checks need the line "Soil Preparation" and no line "Soil Preperation", still exactly three \begin_layout Section lines, and the other two headings, Introduction and Harvest Results, as lines of their own. REA's draft suggested the first two checks, both kept exactly as written; it also suggested a guard on markup lines every section shares, which Claude Code discarded, and Claude Code added the section count and the kept headings.

Results

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

Run Outcome Turns Cost Video
1 passed 7 $0.68 video
2 passed 11 $0.77 video
3 passed 7 $0.18 video

Run it

You need Docker. agentenv-framework builds the computer: Ubuntu 24.04 with the app installed from Ubuntu's archive (lyx 2.4.0~RC3).

pip install agentenv-framework==0.9.1431
hf download earakely-scale/LyXFromRequestComputerEnv-REA --repo-type dataset --local-dir lyx-request
agent-env run lyx-request/bundle --task fix-section-heading --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's build skill and REA's MCP tools:

Build me a LyX environment where the agent fixes a word in a section heading of a short document and saves it.

It asked only the skill's upfront questions, wrote no app-specific scripts, and finished in about 26 minutes. The steps were REA's usual ones:

  1. Capture. REA launched LyX 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: the heading reads Soil Preperation; the kept checks pass
after_edit pass
near_miss fail, as expected: the heading was retyped as "Soil Preparaton"
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 file as lines and don't tie the fixed heading to section 2: a line reading "Soil Preparation" anywhere passes, as long as the typo is gone and there are still three sections. The paragraphs under the headings aren't checked.
  • The computer has no TeX installation, so LyX can edit and save the document but not typeset or export it. The seed hides LyX's warning that the article class is unavailable.
  • The seed also holds the configuration LyX wrote on its first start (~/.lyx, including configure.log), which the capture picked up. LyX started cleanly from it in the witness and in every run.
  • The computer installs whatever lyx Ubuntu 24.04's archive holds at build time (2.4.0~RC3, a release candidate, for these runs); 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. LyX itself is not included: the computer installs it from Ubuntu's archive (lyx 2.4.0~RC3) at build time, under its own licence (GPL-2.0-or-later).