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.
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
- Open the agent and choose the Tests tab.
- Choose Add a test.
- Enter a Name and an Input, the text the agent would be given.
- Optionally set what should happen: Must call (tool names), Must not call, Answer must contain, and the checkbox Must ask for my approval.
- 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
- Open a finished run.
- 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
What a PGB Agent is and what it can do
An agent is a saved job with instructions, a list of allowed tools, a budget and a record of every step it takes.
Create an agent from scratch or from the Marketplace
Make a blank agent in two clicks, or add a ready-made one from PGB Marketplace and review it before it runs.
Write good instructions for an agent
How to word the Instructions box so an agent does the right job, stays inside its limits and tells you when it is unsure.
Choose tools and understand which need approval
The list of tools an agent can use, what each does, and which ones always pause for your approval.
Start agents manually, on a schedule or from a webhook
Run an agent by hand, set it to repeat with the schedule builder, or give it a private web address that starts a run.
Set budgets and know when a run will stop
Put a dollar limit on each run and each month, and learn the other limits that stop an agent from running away.