Computer-use automation for applications with no API.
An LLM works out how to complete a task inside a legacy UI. The successful run is recorded as a typed, reusable capability. That capability then replays deterministically, with no model in the decision loop.
The model discovers. The artifact becomes the capability. Replay is how an agent calls it in production.
A portolan chart was compiled from voyages that had actually been sailed. One ship worked the route out the hard way. Every ship after sailed it from the chart. Discovery is the voyage, the capability artifact is the chart, and replay is every voyage after.
The model runs once. Everything after it is plain code. The mock-app runs are
committed in evidence/. The live-site runs are summarised here, and
their raw logs stay local because the registry page shows a named person's contact
details.
| Task | Model | Steps | Model calls | Tokens in | Time |
|---|---|---|---|---|---|
| Open sub-account (mock app) | Claude opus-5 | 10 | 11 | 22.5k | 48.7 s |
| Open sub-account (mock app) | gpt-oss-120b (open weights, free tier) | 13 | 14 | 34.8k | 163 s* |
| Read record status (live federal site) | Claude opus-5 | 4 | 5 | 11.4k | 10.8 s |
| Read record status (live federal site) | gpt-oss-120b | 4 | 5 | 13.0k | 27.9 s |
| Replay of any of them | none | same | 0 | 0 | 2 to 5 s |
*includes a human approving the irreversible step in the operator console.
Both an open-weights model and a paid one complete the same tasks and record the same kind of artifact. The paid model took fewer steps and tokens and finished faster. The open model needed more retries along the way, and two of its early failures exposed gaps in Portolan itself, now fixed (below).
The second target is the public NPPES NPI Registry,
a modern Angular app run by the US government: no login, read-only, a few queries.
One discovery run recorded npi.record.status. It then replayed on three other
NPI numbers with zero model calls in about 1.8 s each, and all three returned the
values the registry's own API reports.
- Bare element refs. A model answered
e7where the observation said0:e7, and three tries were wasted. Portolan now accepts a bare ref only when exactly one element matches, and still refuses when two frames share it. - Not knowing it was done. A model re-read the same table cell 21 times, never calling finish. The prompt now says which outputs are already collected.
- Per-target policy.
--policylets a run enforce its own allowlist, so pointing at a real site never loosens the default one.
- Steps record meaning, not selectors. A step stores an element's accessible name and role, never a CSS selector or coordinates. Those are what break when a UI shifts.
- Ambiguity is a failure, not a guess. Replay resolves each element through a seven-rung ladder and stops at the first rung with exactly one match. Two matches means the step fails.
- The policy gate sits between the executor and the surface, not in the prompt. An unsafe action is refused by the system whatever the model decided. Irreversible steps escalate to a human.
Replaying a recording against a second tenant where one button was renamed:
failure (element_ambiguous) at step s4: 2 controls match button 'Search'
at rung 5; refusing to guess
observed: button 'Find Member' ...; button 'Clear' ...
In a back-office where the wrong button moves money, refusing costs one interruption. Guessing costs a transaction.
Requires Python 3.11+. No API key needed for the scripted provider.
pip install -r requirements.txt && python -m playwright install chromium
python -m mockapp & # the target app, on :8080
python -m cua discover --provider scripted --script read_savings_balance \
--goal "read member 10042's savings balance" --inputs '{"member_id":"10042"}' \
--outputs savings_balance --capability-id cu.member.read_savings_balance \
--name "Read member savings balance" --description "Return a member's savings balance."
python -m cua replay --capability capabilities/cu.member.read_savings_balance.json \
--inputs '{"member_id":"10077"}' # success: {'savings_balance': '$22,981.73'}A different member works from the same recording. That is parameterisation.
The scripted provider exercises the loop, policy gate and recorder, but only a
real model-driven run (committed under evidence/) shows an agent working the
application out. Seven walkthroughs, including failures, recovery and human
escalation, are in docs/DEMO.md.
cua/ schema, policy, surfaces, perception, targeting, discovery, replay,
session, escalation, llm providers, catalog
mockapp/ legacy-cu: a deliberately hostile target (frames, regenerated ids)
evidence/ committed discovery and replay runs
tests/ 146 tests on the load-bearing contracts
Built solo over about a week as a personal project. It has no users and was never deployed. Of the 19 committed replays, 5 are designed failures that show the error taxonomy, so there is no success-rate claim here. The target is a mock application.
- REPORT.md: the design write-up.
- docs/DECISIONS.md: decisions and their trade-offs.
- evidence/README.md: every committed run and what it shows.
MIT licensed.