Trajecta is regression testing for browser agents. Define a task suite, run your agent against it, and diff the trajectories across runs and model versions. You will know the moment a model upgrade silently breaks your agent.
Three steps. No database, no hosted service to babysit. Runs locally today. Bring your own agent through a small adapter; a built in Stagehand runner is coming next.
A plain YAML file: starting URL, goal in words, and assertions like URL reached, text present, or extracted data matching a schema.
One CLI command runs every task and records the full trajectory: every step with its URL, plus tokens, latency, errors, and the data the agent extracted.
Compare any two runs. New failures, fixed tasks, changed action sequences, cost and latency deltas. Exits non-zero on regressions, so it drops straight into CI.
Baseline: 3/3 passing. Candidate: 2/3. This is the real output of the demo that ships in the repo.
# tasks.yaml
version: 1
tasks:
- name: wikipedia-gdp-top5
startUrl: https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)
goal: Extract the top 5 countries by nominal GDP
assertions:
- type: schema
value: { type: object, required: [countries] }
- type: no_error
- name: github-pricing-plans
startUrl: https://github.com/pricing
goal: Extract the available plan names
assertions:
- type: url_contains
value: pricing
- type: text_present
value: Enterprise
$ trajecta diff --base baseline --candidate candidate New failures (passed before, failing now): ✗ github-pricing-plans Changed action sequences: wikipedia-gdp-top5: base: goto → observe → extract candidate: goto → scroll → observe → extract Cost / latency deltas per task: wikipedia-gdp-top5: tokens +150 (1740 → 1890), latency +750ms github-pricing-plans: tokens -30 (830 → 800), latency +850ms Result: REGRESSION, 1 new failure. exit 1
The candidate took an extra step on one task and stopped finding the Enterprise plan on another. Without the diff, you would have shipped it.
No API keys, no account, no network calls. It replays two recorded runs and catches the planted regression.
git clone https://github.com/PreethamReddy16/trajecta
cd trajecta
npm install
npm run build
npm run demo
# then open runs/candidate/report.html
Next, the quickstart walks you through writing your first task and getting it passing in about five minutes. Or just look at a sample report.
If any of these sound familiar, Trajecta is for you.
Every diff also saves a machine-readable artifact at runs/diffs/<base>--vs--<candidate>.json, so CI or your own tooling can act on it.
{ "base": "baseline", "candidate": "candidate", "newFailures": ["github-pricing-plans"], "fixed": [], "changedSequences": [ { "task": "wikipedia-gdp-top5", "base": ["goto", "observe", "extract"], "candidate": ["goto", "scroll", "observe", "extract"] } ], "costDeltas": [ { "task": "wikipedia-gdp-top5", "tokensDelta": 150, "latencyDeltaMs": 750 } ], "totalsDelta": { "tokens": 120, "latencyMs": 1700 } }
Short answers to the questions everyone asks first.
It runs your browser agent on a task suite through a small adapter, records each trajectory your adapter returns, then diffs those across runs and model versions. When a new model takes a worse path or fails a task that used to pass, you see it as a clear diff instead of finding out in production.
Spot checks don't scale and don't catch slow drift. Trajecta replays the whole suite on every change and exits non-zero on regressions, so it plugs into CI and answers "did the agent get worse this week?" without anyone watching runs by hand.
Trajecta is in early access and free to try right now. The local CLI runs on your machine with no hosted service. Longer term pricing is still being figured out, early users will have a say in it.
Teams shipping browser agents who change models, prompts, or tools and want to know what broke before users do. If you have ever upgraded a model and quietly shipped worse behavior, that is the pain this fixes.
Trajecta is in early access. Tell us what your agents do and we will get you running.
Get early accessBuilt by a software engineer who kept watching model upgrades quietly change agent behavior.