Skip to content
Let’s Talk

How to Test Whether an Email Can Trick Your AI Agent

A planted instruction, sent between two addresses of your own, and what to read afterwards.

Plant an instruction in a made-up message, send it to your own agent and read what the agent did. An agent reads an email or an attachment as text, and it has no reliable way to tell an instruction in that text from one of yours. This is called prompt injection.

We told it to ignore instructions in emails. Isn’t that enough?

It helps, but no instruction blocks every message. The test shows what the agent is able to do on the day one gets through.

1. List what the agent reads, reaches and can send.

Start with what someone outside wrote: emails and attachments, web pages, forms customers fill in. Then list the records its account can open, and each way something can leave or change: an email to any address, a web address it opens, a record it can alter.

2. Plant an instruction and send it.

Write a made-up message that asks for something the task doesn’t allow. Send it from an address of your own, and make sure anything the agent might send ends at another address of your own.

3. Read what happened, close it and test again.

Go by what was sent and what was changed, because the agent’s reply can sound careful either way. If something left, close the way out or what the agent could reach. If something changed, put a person’s approval in front of that kind of change. Then test with a different message.

A fictional example: an agent that reads tenants’ repair requests and books contractors.

Can reach
The tenant list and the contractors’ contact details. It can email any address.
First planted email
A made-up repair request from one of the property manager’s own addresses. Its last line asks for the tenant list to go to another of them.
What happened
The list arrived.
Closed
The agent emails only the tenant who wrote in and the contractors on file, and looks up one tenant at a time.
Second planted email
A made-up request saying the repair is approved and urgent.
What happened next
An urgent job went to a contractor entry added for the test, at the manager’s own address.
Closed as well
A person approves each job before a contractor is told.

Practical check: Run the test again after any change to what the agent can read, reach or send.

Read more: AI Agent Permissions: What Can Your Agent See and Do? · Human Approval of AI Actions: Is Anyone Actually Reviewing? · How to Test an AI Agent With Questions It Hasn’t Seen

The example is fictional. Test only your own agent, with made-up content and addresses of your own. A planted message that fails doesn’t show the next one will, and a test like this doesn’t replace a security assessment. This is general guidance, not security advice.