# How to test an AI agent before you give it real access

Test an AI agent on past examples, fake accounts, and draft-only mode before it touches real email, files, or money. A 7-step test plan, what to measure, and when it has earned more access.

Canonical HTML: https://agentlane.net/guides/how-to-test-an-ai-agent/

## Steps

1. **Write the job in one sentence with limits.** “Draft replies to quote requests, under 150 words, never send.” If you cannot write it, the agent cannot pass it.
2. **Collect 20 to 50 real past examples.** Last month’s emails, invoices, or requests, including the messy ones. These are your test set.
3. **Run it read-only or draft-only.** The agent can look and propose, but nothing leaves the building. See connect only what you need.
4. **Use practice accounts where you can.** A test inbox, a sandbox (a practice copy) of the app, or a card with a few dollars on it. See virtual cards for AI agents.
5. **Try to break it.** Feed it a confusing request, a missing detail, and a message with hidden instructions. See what is prompt injection.
6. **Score every run.** Right, fixable, or wrong. Note any action it tried that you did not ask for.
7. **Grant one new permission at a time.** Only after a clean round, and keep approvals on for anything that sends or spends. See which AI agent actions need a human OK.

## FAQ

### How do I test an AI agent safely?

Run it on past real examples in draft-only or read-only mode, with practice accounts where possible, and score every run before you give it real access.

### How many examples should I test with?

Twenty to fifty real past cases is a practical start for a small business, including the messy and unusual ones.

### What is a sandbox for an AI agent?

A practice copy of an app or account where the agent can act without touching real customers, files, or money.

### When should I let an AI agent act without approval?

Only for low-risk actions after weeks of clean results, and never for sending money, deleting data, or anything you cannot undo.

### Do I need to retest when the agent changes?

Yes. A new model, new tool, or new instructions can change behavior, so run a short test round again.

