English | 简体中文
ComputerUseAgent records and analyses interaction traces of computer-use agents and of people doing the same task, so that the two can be compared. It is a measurement toolkit, not an agent: nothing in it operates a computer on anyone's behalf. It ships a consent-first Chrome recorder, a Python library and CLI that validate traces, extract behavioral features and run a leakage-controlled human-versus-agent analysis, a loopback-only viewer, and the archived research that produced them.
Important
No validated human-versus-agent detector exists yet. The package's
detector pipeline has run only on synthetic data, and every result it writes carries
formal_claim_permitted=false. The formal studies produced no data: MiniWoB
0/27 attempts and ScienceBoard
0/27 sessions completed,
Codex Desktop 9/9 attempts blocked.
Human traces collected by this project:
0. See Research results.
| Component | Where | What it does |
|---|---|---|
| Trace recorder (Chrome Manifest V3 extension, "ComputerUseAgent Trace Recorder") | extension/app |
After explicit consent, records privacy-reduced traces from one tab: 59 DOM event types plus a recorder-generated navigation record. Traces stay in local extension storage until you delete them; you can inspect them and export copies (JSON, JSONL, CSV, legacy V1) from the dashboard. Exporting does not remove them. It makes no network requests. |
Python library and CLI computer-use-agent |
src/computer_use_agent |
Schema and contract validation; extraction of 23 behavioral features from browser or X11 traces; a deterministic detector pipeline with strict leave-one-task-out (LOTO) evaluation, nested Platt calibration and negative controls; a self-verifying six-file result bundle. Standard library plus jsonschema. |
| Viewer | computer-use-agent view |
Loopback-only, read-only, privacy-projected viewer for traces and analysis results. |
| X11 capture | src/computer_use_agent/capture/x11 |
Guest-side recorder for desktop sessions, deployed as one deterministic zipapp. Built for the archived ScienceBoard study, which never ran on a VM. |
| Research archive | research/ |
Agent harnesses, pilots, FP-Agent analyses, the literature corpus and hash-verified evidence. Provenance, not product; not part of the wheel. |
flowchart LR
EXT["Chrome extension<br/>extension/app"] -- "consented capture" --> STORE[("chrome.storage.local")]
STORE -- "export" --> TRACE["cui-trace-v2<br/>JSON / JSONL"]
X11["X11 guest recorder"] --> X11T["x11-trace-v2<br/>JSONL"]
TRACE --> VALIDATE["validate"]
TRACE --> EXTRACT["extract<br/>manifest of traces + labels"]
X11T --> EXTRACT
EXTRACT --> DATASET["cui-detector-dataset-v2<br/>23 features per session"]
DATASET --> ANALYZE["analyze<br/>LOTO, nested calibration,<br/>controls, ablations"]
ANALYZE --> BUNDLE["result bundle<br/>verify-bundle"]
TRACE --> VIEW["view<br/>loopback only"]
BUNDLE --> VIEW
Wire formats keep their historical cui- namespace (cui-trace-v2,
cui-detector-dataset-v2, the chrome.storage keys), so traces recorded by
earlier versions stay readable. See docs/architecture.md.
- Python 3.12 or newer (CI tests 3.12 and 3.13).
uv is recommended; plain
pipworks too. - Chrome or Chromium 151 or newer to load the extension. That is the
manifest's
minimum_chrome_version, and the E2E suite runs Chrome for Testing 151.0.7922.47; older versions were never tested. - Node.js 22.12 or newer with npm, only for extension development, unit tests and the E2E suite. ESLint 10 needs Node 22.13 or newer.
git clone https://github.com/appleweiping/ComputerUseAgent.git
cd ComputerUseAgent
uv sync # .venv with the package (editable) and the dev tools from uv.lockWithout uv, create and activate a virtual environment, then run
python -m pip install -e ..
Open chrome://extensions, turn on Developer mode, choose Load
unpacked and select extension/app. In the popup, choose the actor type and
the task ID, read the linked disclosure and tick the consent box; recording
cannot start without it. Inspect, export or delete sessions in Sessions &
exports. Details: docs/extension/index.md.
Run these from the repository root. With uv, prefix each command with uv run
or activate .venv first.
computer-use-agent doctor
computer-use-agent schema list
computer-use-agent validate --schema cui-trace-v2 --input examples/traces/minimal-session-v2.json
computer-use-agent analyze --dataset examples/detector/synthetic-dataset.json --output-dir out/run1 --profile smoke
computer-use-agent verify-bundle out/run1
computer-use-agent view --trace demo=examples/traces/minimal-session-v2.json --port 0doctorchecks Python,jsonschemaand the packaged data (required) and Node and Chrome (optional); it exits non-zero only if a required check fails.analyze --profile smokeis a fast code-path check that takes seconds; thedefaultprofile (the documented protocol) takes about two minutes on this 18-record synthetic dataset. Both are labelled "Synthetic pipeline check only".analyzerefuses an existing output directory, so deleteout/before running it again.viewprints itshttp://127.0.0.1:<port>/URL; stop it with Ctrl+C.- To analyze your own traces, write an extraction manifest and run
computer-use-agent extract --manifest my-manifest.json --output dataset.json; see docs/detector.md. Datasets that carry provenance need a registered validator (--provenance-module NAME) or they are rejected.
The playground runs the recorder's normalization core in a plain page, without the extension. Serve it on loopback only:
python -m http.server 8765 --bind 127.0.0.1 --directory extensionThen open http://127.0.0.1:8765/playground/. Its downloads are synthetic QA
traces (source_class=synthetic_coverage), not study data.
The recorder collects behavioral data about people, so it stores as little as it can and says plainly what remains. Full field list: docs/extension/privacy.md.
Stored per event: the event type, wall-clock and page-relative timestamps,
session ordering fields, the page URL without query or fragment, the viewport
size, pointer coordinates and buttons (moves are sampled), wheel and scroll
offsets, modifier flags, focus and form lifecycle events, minimal target
metadata (tag, role, input type and a short selector hint), document visibility
and is_trusted as a diagnostic. The session keeps the labels typed into the
popup.
Never stored: typed characters, except in the opt-in raw-key mode below (by
default key events keep a key class such as letter or digit, and the key
only for control keys such as Enter),
KeyboardEvent.code, input values (only the input type and the number of
inserted characters), clipboard and drag contents (only MIME categories and
counts), URL queries and fragments, page text, form values, file names,
cookies, screenshots, audio and video.
Private fields. On password inputs, autocomplete current-password or
new-password fields and anything inside [data-recorder-private], version
0.5.0 also drops the key class, the modifier flags and the keystroke detail
(hold time, repeat, location); the key is the constant <redacted>. The
service worker re-applies these rules to every stored event.
- Fixed in 0.5.0: version 0.4.0 kept the key class, modifier flags and keystroke timing on private fields although its documentation called them "always redacted". Treat 0.4.0 traces of such fields as sensitive; see the Security section of CHANGELOG.md.
- Still recorded: the existence, type and timestamps of key, input and focus events on private fields. Their count and timing reveal the approximate length and rhythm of what was typed, so never type real credentials while recording; use test accounts.
Scope and storage. Permissions are activeTab, scripting, storage and
unlimitedStorage, plus an optional per-origin host permission requested only
when the user asks for it; there is no downloads permission. Storage is
restricted to trusted extension contexts and bounded (250 sessions, 100,000
events and about 64 MiB per session, 512 MiB in total). A restricted raw-key
mode stores the typed key value on non-private fields; it needs a second
confirmation, and its traces fail the public schema and must never be
published.
Known capture gaps. After a same-origin navigation nothing is captured
until the content script is injected again at status=complete; navigating the
tab to another origin ends the session as interrupted.
- No raw human traces are in this repository, and none may be added, nor attached to issues or pull requests. Tests and examples use synthetic data.
- Recording anyone other than yourself requires that person's informed consent and whatever approval your own human-research process requires, obtained before recording. The extension's disclosure page is a neutral operator template: replace its bracketed fields with your approved wording.
- Formal human data are denied by default.
analyzeadmits them only when the dataset'sprovenance.source_stagehas a registered validator (loaded with--provenance-module) that accepts the dataset and ahuman_data_policyhook that authorizes them; the hook re-authorizes them in every evaluation fold. Accepting provenance alone never authorizes formal human data: a stage without the hook gets them denied. The archived ScienceBoard stage (research.scienceboard.detector_bridge) accepts them only through a formal-study configuration whose human-research determination record (named byCUA_HUMAN_RESEARCH_DETERMINATION_RECORD) matches its recorded SHA-256. A stage you write must enforce this itself, for example by returningConfigHumanDataPolicy(computer_use_agent.study.policy) from itshuman_data_policyhook. See docs/detector.md. - Private data live under
CUA_PRIVATE_ROOT, which must resolve outside the repository and outsideresearch/evidence; tools refuse to write private data anywhere else.
| Variable | Purpose |
|---|---|
CUA_PRIVATE_ROOT |
Root for private, non-redistributable data |
CUA_FORMAL_STUDY_CONFIG |
Formal-study configuration, when not passed explicitly |
CUA_HUMAN_RESEARCH_DETERMINATION_RECORD |
The operator's private human-research determination record, kept under CUA_PRIVATE_ROOT |
CUA_E2E_* |
Extension E2E harness settings, see docs/extension/e2e.md |
Nothing loads .env.example automatically; it documents these variables.
uv sync # dev tools at the versions in uv.lock
uv run nox # lint, typecheck, tests (3.12 and 3.13), node
uv run nox -l # list every session
uv run nox -s research build evidence docs # research tests, packaging, evidence, docs
uv run pre-commit install # optional: run the hooks on every commit
npm --prefix extension ci
npm --prefix extension run lint
npm --prefix extension test
npm --prefix extension run test:coverage
npm --prefix extension run e2e # opens a browser window- E2E. The recorder suite drives the real extension in a disposable Chrome
profile through 15 cases (T00 to T14) and writes a result bundle that
python tools/ci/validate_e2e_bundle.py <bundle directory>checks. On Linux without a display, run it underxvfb-run -a. CI also setsCUA_E2E_CI_NO_SANDBOX=1because the runner's kernel blocks Chrome's sandbox; never set it on a workstation.CUA_E2E_HEADLESS=1uses Chrome's new headless mode instead of a window. See docs/extension/e2e.md. - Research code needs the research extra:
uv sync --extra research, thenuv run nox -s researchoruv run pytest research.python -B -m research.reproduce --dry-runlists the reproducible stages, andpython -m research.literature.fetch_largedownloads the two large literature files. See research/README.md. - Contribution rules: CONTRIBUTING.md.
The lint, type-check, test, build, evidence and docs checks can be run locally
through nox, on Windows or Linux; the extension ZIP's byte-for-byte
reproducibility is covered locally by tests/tools/test_package_extension.py.
actionlint, the build job's wheel and sdist content assertions, CodeQL and the
dependency audits (pip-audit, npm audit) run only in GitHub Actions. In
GitHub Actions the test jobs run on both Ubuntu and Windows. Test counts are
reported by CI, not listed here.
| Workflow | What it runs |
|---|---|
ci.yml |
ruff, actionlint, ESLint, secret scan and pinned-Action check; strict mypy; product tests with a branch-coverage gate; research tests on public data; extension unit tests with a coverage gate; the evidence manifest; this README's links, commands and numbers (tools/ci/check_readme.py); wheel, sdist and extension ZIP builds |
e2e.yml |
The headful recorder E2E suite under Xvfb, validated by tools/ci/validate_e2e_bundle.py |
codeql.yml |
CodeQL for Python, JavaScript and the workflows |
audit.yml |
pip-audit over uv.lock and npm audit |
release.yml |
Tag-driven release: wheel, sdist, extension ZIP, CycloneDX SBOM, checksums and build-provenance attestations |
Details: docs/ci.md and docs/releasing.md.
.
├── extension/ Chrome MV3 recorder
│ ├── app/ the unpacked extension: manifest.json, src/, popup/, dashboard/, privacy/, icons/
│ ├── playground/ standalone page that runs the recorder core
│ ├── test/ unit tests (node --test) and the Puppeteer E2E harness
│ └── scripts/ version check and icon generator
├── src/computer_use_agent/ installable Python package
│ ├── cli.py console script
│ ├── schemas/ packaged JSON Schemas
│ ├── contracts/ contract and schema validation
│ ├── trace/ shared trace reader, validation and privacy rules
│ ├── features/ behavioral feature extraction and statistics
│ ├── detector/ dataset contract, model, LOTO evaluation, reporting, result bundle
│ ├── viewer/ loopback-only viewer and its static assets
│ ├── capture/x11/ X11 guest recorder and its zipapp builder
│ └── study/ fail-closed formal-study policy and run ledger
├── tests/ product tests (pytest)
├── examples/ synthetic example traces and detector dataset
├── docs/ documentation; start at docs/index.md
├── tools/ CI checks and the extension packager
├── research/ archived harnesses, analyses, literature and evidence
├── noxfile.py task runner sessions
├── pyproject.toml, uv.lock project metadata and the locked dependency graph
└── .github/ workflows, issue templates, Dependabot
This repository grew out of a research project on whether privacy-reduced
interaction timing and movement can tell people from computer-use agents. The
table summarizes the archived evidence. Every number is bound to a claim in
research/evidence/INDEX.json, which
tools/ci/verify_evidence.py checks against the archived files and
tools/ci/check_readme.py checks against this table. They are historical
measurements, not results of the current version. The method and the full
narrative are in docs/research/summary.md.
| Study | Result | Caveat |
|---|---|---|
| Recorder E2E, archived run of recorder 0.4.0 (2026-08-09) | 14/14 cases, 0 browser errors. 527 records: 516 natural, 10 synthetic, 1 navigation. 42 of 59 supported event types observed, 17 never observed | One automated QA run on deterministic loopback fixtures with Chrome 151.0.7922.108, Puppeteer 25.4.0, Node 22.21.1 on win32-x64; not human, agent or detector data. The cited commit 621ad8ac exists only in the private source repository; the source-tree SHA-256 prefix fa5cfc61 identifies the tested code. CI reruns the current suite on every extension change. |
| FP-Agent released models, inference only | Accuracy / macro-F1 on 1,544 test examples, 8 classes: browser 0.8212 / 0.8223, behavioral 0.9994 / 0.9994, combined 1.0000 / 1.0000 | The authors' random within-corpus split: it does not measure unseen agents or deployment. Upstream commit e614e2f, run under Python 3.13.14 outside the hash-locked research environment. |
| Leave-one-agent-family-out on the FP-Agent feature vectors | 21 folds. Browser features: mean balanced accuracy (BA) 0.9286, worst fold 0.5000; with Manus held out, recall 0.0 at AUROC 0.9174. Behavioral and combined features: BA ≥0.9968 in every fold | The ranking transfers but the threshold does not. The same 109 human test rows are reused in every fold, so the folds are not independent. Run under Python 3.14.5 outside the hash-locked environment. |
| 23-feature retrospective on the public FP-Agent raw corpus | 7,728 sessions (546 human, 7,182 agent), 3 tasks, seed 20260811. Primary purged leave-one-task-out logistic model: pooled BA 0.6001, AUROC 0.6358, macro-F1 0.5746. Held-out task BA / AUROC: Flight-booking 0.500 / 0.998, Forums 0.497 / 0.829, Shopping 0.853 / 0.967 | Read it as a cross-task threshold and calibration transfer failure, not as chance-level ranking. Only n=3 tasks: the reported BA interval 0.497 to 0.853 is the min/max over the 3 folds, not a population confidence interval. The pooled AUROC mixes three separately calibrated fold models; AUPRC 0.958 is inflated by the 92.9% agent prevalence; the purge leaves 79/212/37 training rows; focus is never observed (missing_focus=1 everywhere); the permutation p-value 0.000999 is the minimum possible with 1,000 draws. The same features predict the task (BA 0.866) and the agent family (BA 0.974), a strong confound, and dropping the keyboard features raises BA by +0.181. |
| Agent pilots on three public read-only micro-tasks (example.com, IANA, Hacker News) | Browser-Use 0.11.5: 9/9, US$0.436519. Skyvern 1.0.47: 9/9, US$0.432419. Stagehand 3.7.1: 3/3, cost not reported | Integration evidence, not benchmark scores; costs are application-reported and not reconciled to provider invoices. Stagehand was a single-pass smoke run and was later retired over 13 blocking security advisories. |
| Formal studies | MiniWoB 0/27; ScienceBoard 0/27; Codex Desktop 9/9 blocked; human traces collected: 0 | The 2 Browser-Use launches of the MiniWoB matrix ended with model_provider_error and 0 actions; a later preflight got HTTP 502 (no evidence file records an HTTP 403). The ScienceBoard harness never ran on a VM. The NetLogo/PhET runs (9/9 passed, 908 events, recorder 0.2.1) are scripted Puppeteer/CDP controls, not agents. |
| Auxiliary public datasets | MolmoWeb action n-gram source classifier BA 0.8167; domain-only baseline BA 0.5 | Likely label leakage: only synthetic rows carry action_timestamp (108,254 synthetic rows, 0 human rows). The domain-only baseline is 0.5 by construction. CaptchaSolve30k and Aalto are sampling-fidelity checks only. |
| Literature corpus | 68 items: 64 papers and 4 repositories; 60 full texts reviewed, 4 access-blocked, 4 repository reviews. Citation graph: 12,932 nodes, 22,117 assertions | Counts come from the persisted snapshot; a public clone can check their consistency but cannot re-fetch the private full texts. Citation retrieval is partial (1 partial and 15 blocked seed directions). The two large graph files are not committed; python -m research.literature.fetch_large downloads them and verifies their SHA-256. |
The current recorder E2E suite has 15 cases (T00 to T14); its bundles are CI artifacts and are not committed.
Cite the software with CITATION.cff (GitHub's "Cite this repository" button reads it). If you use the archived evidence, also cite the exact release and the third-party datasets and papers your analysis relies on.
MIT, see LICENSE and NOTICE. Third-party notices are in THIRD_PARTY_NOTICES.md. Contributions follow CONTRIBUTING.md and the Code of Conduct; report vulnerabilities privately as described in SECURITY.md.
ComputerUseAgent starts a fresh Git history. Its content was restructured from
the research repository
appleweiping/cu-detector-research-artifact
at commit 437070f, which remains the archive of record (including the four
PDF deliverables). research/PROVENANCE.md maps every
original path to its new location or records why it was not imported.