A/B testing with an AI coding agent

Last updated: 25 November 2026.

If an AI coding agent already works on your website, it can run your A/B tests too. With Pickbook A/B, the agent sets up the test, adds the code to your page, checks that visitors are counted, and explains the answer when it comes. This page explains how that works and what the agent is allowed to do.

What the agent does

You tell the agent what to test, in your own words. For example:

Test a new headline on my home page: "Send your first invoice in 2 minutes" against "Bookkeeping for freelancers".

The agent then does the work you would otherwise do yourself:

  1. It checks how many visitors your page gets and whether the test can finish within 60 days.
  2. It creates the test in Pickbook A/B, with your versions and your goal.
  3. It adds the Pickbook A/B script to your page and shows each version where the code says so.
  4. It checks that visitors are being counted.
  5. When the test has its answer, it reads the result and tells you in plain words which version won.

It works with any AI coding agent that can read a web page and make web requests. AI agents can also connect to Pickbook A/B directly.

How the agent learns Pickbook A/B

Pickbook A/B has a guide written for AI agents. It covers the whole job: checking the traffic, sizing the test, creating it, installing the code on common website setups, checking it, and reading the answer. The agent reads the guide with its agent key, so the guide is not a public page.

In the dashboard, choose "Ask your AI agent". Pickbook A/B makes an agent key and gives you a prompt to paste into your agent. You save the key on the computer where the agent works, so the key itself never goes into the chat. A key made this way lasts 24 hours, so a key left in a log stops working soon. You can make longer-lasting keys in Settings.

What the agent can and can't do

The agent key can set up and run tests and make website keys. It cannot invite people, change anyone's role, or erase a visitor's data. The guide tells the agent to follow these rules:

  • Ask you before it ends a test, deletes a test, or erases a visitor, and wait for a clear yes.
  • Never create a test that cannot reach its answer in time.
  • Never call a winner that Pickbook A/B has not called. The agent quotes the answer instead of working it out itself.
  • Never send made-up visitors to a real test.
  • Keep the agent key out of your page code, your files, and your commits. Only the website key, which is safe to publish, goes into your page.

Once a test starts, its versions and its goal are locked, so nobody can change what is being compared halfway through. The activity log names who made each change, including the agent.

Why an agent is a good fit for A/B testing

Most of the work in an A/B test is small, careful steps: add a script tag, show the right version, record the goal at the right moment, and check that it all works. An agent that already edits your website can do those steps in minutes. What it should not do is decide the winner by looking at the numbers. Pickbook A/B decides that by its own rules, after the test has all the visitors it needs, and the agent passes on the answer. Read How Pickbook A/B picks a winner for the rules in plain words.

You can still do it yourself

Everything the agent does, you or your developer can do by hand: fill in a short form, add the code to your page, and read the answer in the dashboard. Before you start either way, check your traffic in What can I test with my traffic?.

Your first test on Pickbook A/B is free, one per website. You don't need a card. Your AI agent doesn't count as a person on any plan. See the pricing for the plans after the first test.