How we test PitCrew in production with browser agents.

PitCrew is used by firms who are managing serious money from $100M to $10B in customers money and rely on our agents to automate their reconciliation, onboarding and much of their operations workflows. This puts us as an engineering team in a pickle where each and every change we ship has to leave the core flows working exactly how they were before the change. An agent run should still complete, a collection should still answer questions about its documents, and all the integrated systems should still give the data seamlessly. Our team checked all of that by hand, but they have to do it again after every single change.

We wanted two things. First, how can we run checks without a person at each step. Second, the result of these checks had to be the ones we could trust.

The first has become easy now with AI agents that can drive a browser. The second is where it gets interesting, because an AI can't consistently tell you if a task worked and when it did not.

The AI clicks. Code decides.

That is how we designed the system the whole design in four words. Everything below is how we made it hold up.

AI Doesn't Get a Vote

Models are now good at using software they have never seen. We can show one a screenshot and a goal, and it will find the relevant button to click.

Asking the same model whether the task worked is a different job. Did the run actually complete? Did the data land in the correct system? The model only knows what the page looked like when it stopped. In a test, a wrong "yes" is the worst error there is and we wanted our testing suite to be free of these false positives.

In AI on Rails we argued that every agent action must be observable, reviewable, and defensible after the fact. A test suite that takes an AI's word for its own results fails that standard. So the AI does the work, and something it cannot influence checks the result.

Why a Browser Agent, Not a Test Script

There are two ways to make a browser click through your app: a test script that you write step by step in code, or a browser agent that you give a goal in plain English.

Test scriptsBrowser agents
ExamplesPlaywright, Selenium, Puppeteer, Cypressbrowser-use, Stagehand, Skyvern
How you write a testIn code: click #start-run, then type into input[name=search]In plain English: open the agent named X and press Start run
Who picks each clickThe script, step by stepA model that reads the page and picks the next action
When the UI changesBreaks when a selector or label changesUsually copes, because it finds the button by what it means
Same input, same result?Yes, every timeNot guaranteed

The last row is the catch. A browser agent keeps working when a button moves, but it can take a different path on each run, and it can say it succeeded when it didn't. So we use the agent for the one thing it is good at, finding its way through a changing UI, and keep everything else in plain code: signing in, blocking unsafe changes and deciding pass or fail. If you build this for your own product, that split is the part to copy.

Our Suite Follows the Same Rules as Our Product

Our test suite works on the same principles we codified for our agents which run on client firms. Namely:

In client firmsIn our tests
The firm's rules decide what an agent may touch.Each test lists the changes it may make. Code blocks everything else before it reaches PitCrew.
Someone other than the agent signs off.Code, not the AI, decides pass or fail, by reading PitCrew directly.
Every Agent run is on record.Every step is kept: what the AI saw, whether its last step worked, and its next goal. A failure reads step by step.

These rules are what let us test on the live app, with a dedicated test account. They are also why a small model is enough. Our tester runs on Gemini 3.8 Flash, as it only has to operate the page.

The Building Blocks for the Test Suite

The examples use four parts of PitCrew. Any product will have its own equivalents:

The test suite adds only three words of its own:

If you remember one thing: people write tests, and code handles everything around them.

Anatomy of a Test Run

A test run has seven steps in three phases. The AI does exactly one of them.

Set up, once per run (code). Open a fresh Chrome browser in the cloud, with nothing left over from earlier runs. Sign in to the test account. Then run a pre-flight check: is PitCrew up, and does every agent we're about to test exist? This step only looks. It changes nothing.

Run each test (code, then AI, then code). Open a new tab and switch on the guard. Let the AI follow the test. Then check the result.

Report, once per run (code). Send a summary to Google Chat and save every step for review.

The seven steps of a test run in three phases. The AI acts in one of them.

Steps 4 and 6 are where the rules from the table live. The guard goes up before the AI acts, and the check runs after it stops.

Four Design Decisions

Most of the engineering went into four choices.

Decision 1: We give the AI the Menu, Not Just a Picture

The problem: from a screenshot alone, a model has to work out what on the page is clickable before it can decide what to click.

What we built:

Decision 2: Putting a Guard Between the AI and the Live App

The problem: the tests run on the live app, in a signed-in browser. An agent that misreads a page could steer away from the test criteria, especially with updates to the product.

What we built:

Decision 3: Code Checks the Result, Not the AI

The problem: an AI that has just finished a task is a poor judge of whether it worked. We needed a referee that doesn't depend on its opinion.

What we built:

Decision 4: Give Every Test a Budget

The problem: a lost agent does not always know it is lost. Without limits, it keeps clicking and blowing up tokens.

What we built:

In practice the budgets are generous. On the 25 Nov runs, a test used between 5 and 10 steps on average.

A Worked Example: Is Gmail Really Connected?

Most products that connect to other systems show a status badge. Ours lives in the Garage, and it says "Connected" next to Gmail. But the badge only updates when something uses the connection. If the login token expires, the badge stays green, and nobody knows until an agent that reads email fails.

So the check ignores the badge. It makes a test agent use Gmail and looks at what comes back.

1. Plant a canary. We sent the test account one email with the subject "PitCrew QA canary". Its body is a code word that appears nowhere else: canary-gmail-7431.

The canary email in the test inbox, with the code word canary-gmail-7431

2. Build a tiny, read-only agent. In PitCrew we built an agent with one task: find that email through the Gmail connection. It can read, and nothing else.

3. Write the check. The AI's instructions only get the run started. The success rules belong to code: wait for the run to end, then look for the code word in its output, and confirm the run completed.

The YAML for the Gmail check: plain-English instructions for the AI, success rules for code

4. Run it. Code signs in and looks up the agent. The browser agent opens it, presses Start run, and its job ends there. Code follows the run through PitCrew's API until it finishes, then searches the output for canary-gmail-7431.

5. Report. The result lands in Google Chat with the other connector checks. In the run below, three of four connectors passed and one timed out, and the card names it.

Google Chat card for a Garage run: 3 of 4 connector checks passed, one timed out

The pattern works for any integration: plant something only the real system could return, then check for it in code. A green badge tells you a connection was set up. A canary tells you it works today.

Anyone Can Write a Test

A test is a short YAML file, written mostly in plain English. If you can brief a new colleague, you can write one. Each test has four fields:

The AI gets the first two fields. The guard reads the third. Code runs the fourth.

Here is a test for our Cash Availability Checker, an agent that flags cash shortfalls in client accounts:

Test: Cash Availability Checker, positions file

Steps for the AI
  1. Open the Cash Availability Checker.
  2. Upload the file "positions.csv".
  3. Start one run.
  4. Wait until the run ends.

Inputs
  - File upload: positions.csv

Allowed changes
  - Start one run of the Cash Availability Checker.

Pass checks
  - The run completed.
  - The page shows: <the text the run must show>

Most changes need no code at all:

You want toWhat it takesCode?
Run the same test on another agentAdd one line to the group, with the agent's exact nameNo
Add a test from existing checksWrite one test file and add it to a groupNo
Use new sample filesAdd the files to the project and list them in the testNo
Check something no check reads yet, such as a new pageAn engineer writes one small checkA little
Let the AI do something new, such as a new kind of upload or a browser extensionAn engineer adds a tool for the AIYes

From Laptop to Cloud

A new test goes through three gates before it joins a cloud job:

One command starts a cloud job, and the log streams live to your terminal. Closing the log does not stop the run. When the run ends, a summary card lands in Google Chat. If a test failed, the card names it and gives the reason, and engineers can replay every step from the saved record.

Cloud jobs also run on a schedule, every day against production. Each run writes a report with every test's result, its one-line reason, its run time and its model cost. The report and the recorded evidence go to a private storage bucket, and the Chat card links to them.

Two cloud jobs exist today, and setting up a new one takes one command.

The First Cloud Runs, in Numbers

Today there are 25 tests in four groups:

On 25 Nov 2026 we ran the first three groups in the cloud as two jobs, twice each. All 23 tests in those jobs passed both times.

Started (IST)JobPassedRun timeAI steps per testTokens in / out
16:20Single + bulk runs8 of 820 min9.8764k / 86k
16:20Collections15 of 1516 min5.5743k / 74k
15:48Single + bulk runs8 of 817 min9.6765k / 82k
15:48Collections15 of 1516 min5.3726k / 73k

Three things stand out:

Next Steps

Every run above passed. That shows the browser automation can get through PitCrew's core flows without help. The next step is to break things on purpose and understand how our browser use is able to catch these errors. Upload the wrong file, and confirm that the check fails and the Chat card names the reason.

What We'd Tell Another Team

None of this is specific to financial services. If you're putting a browser agent on your own product, three ideas carry over:

How are you testing the agents in your own product? We'd like to compare notes.

See what PitCrew can take off your team's plate

Tell us one task your team does by hand every week. We'll show you the agent that handles it, set up to your firm's rules, with your team approving each step.