Skip to content
Skip to content
PGB Learn

Test and replay an agent

Save test cases, run them in a safe test mode, test unsaved edits and replay a past run against your current version.

Updated Nov 13, 2026

Tests check how an agent behaves before you rely on it. In test mode, anything that sends, writes or changes something is not done. It is recorded as "would have called".

Add a test

  1. Open the agent and choose the Tests tab.
  2. Choose Add a test.
  3. Enter a Name and an Input, the text the agent would be given.
  4. Optionally set what should happen: Must call (tool names), Must not call, Answer must contain, and the checkbox Must ask for my approval.
  5. Choose Save test.

A test with no expectations passes when the run finishes.

Run tests

Choose Run tests to run them all, or Run beside one. Each result shows Passed, Failed or Couldn't finish, each check with a reason, and a Would have called list. Choose See the steps to open the run.

If you have unsaved edits, tick Test my unsaved edits to try the draft before saving it.

Test runs use your AI balance. They are marked as test runs and left out of your reports, though their cost is counted.

Replay a past run

  1. Open a finished run.
  2. Choose Replay.

The agent runs the same input again against its current version, in test mode. The new run is labelled Replay, shows the version it used, and has a section Replay compared with the original with both answers side by side.

Good to know

  • Test the dangerous cases: input that tries to give the agent orders, an amount near an approval threshold, an empty input.
  • Every real failure deserves a new test.
  • Combine with Versions so you can go back if a change makes things worse.

More guides in PGB Agents