How the agent works
When a new email arrives in an inbox, the agent reads it alongside your instructions and decides which of its enabled actions to take, if any. The agent runs once the inbox has instructions and at least one enabled action. The agent does not act on threads in the spam folder, and it skips emails that need no action.The agent never sends email on its own. Replies and forwards are saved as
drafts for a member of your team to review and send.
Configure the agent
Using the dashboard
1
Open an inbox and click the Settings button.
2
Select the Customize tab.
If the inbox is empty, you can also click Set up agent.
3
Write your Instructions.
Describe how the agent should handle email in this inbox, in up to 4,000
characters. Click the suggestion button for an example to start from.
4
Choose the Available actions.
Select the actions the agent is allowed to take, or choose All actions.
5
Set the Tone of voice.
Choose how concise or expanded, and how professional or casual, the agent’s
writing should be. The preview shows how replies will sound.
Using the API
You can also update the agent settings via the API, SDKs, or CLI. Fields you leave out keep their current value, andactions replaces the whole set of actions. The tone is one of concise_professional, concise_casual, expanded_professional, or expanded_casual.
Actions
The available actions are:
A few rules keep the agent’s actions safe:
- Drafts are never overwritten. If a thread already has a draft, the agent leaves it alone and does not draft a reply or forward.
- Forwards only go to addresses in your instructions. Write out the full email address the agent should forward to. Naming a domain or a person is not enough.
- Assignments need a clear match. Name the teammate by email address or name in your instructions. If the name matches nobody, or more than one person, the thread is not assigned.
- Labels must already exist. The agent applies your existing labels but does not create new ones. Create the labels you want it to use first.
Security
Anyone who knows an inbox address can send it email, including people who write instructions for the agent into an email, an attack known as prompt injection. The agent has these safeguards built in:- Email content is data, not instructions. The agent reads the subject, body, and sender name of every email as untrusted data. It ignores any instructions they contain, and it follows only your instructions. Label names are treated the same way.
- It never sends email. Replies and forwards are saved as drafts, so a person reviews every message before it leaves the inbox.
- Forward recipients are checked. A forward to any address that isn’t written out in your instructions is rejected, even when an email asks for it. Lookalike addresses don’t match.
- Important email stays in the inbox. Each new email is checked to see whether it needs your attention. When it does, the agent can’t archive it, move it to trash, or mark it as spam.
- It only uses the actions you enable. The agent has no access to actions you haven’t selected, and it doesn’t act on threads in the spam folder.
- Enable only the actions you need. An agent that only adds labels and drafts replies can’t move or forward email.
- Keep secrets out of your instructions. A draft reply goes back to the sender, so don’t include anything in your instructions that you don’t want a sender to see, such as internal links, credentials, or customer data.
- Don’t trust the sender’s address. Email addresses and display names can be spoofed, so don’t write instructions that give a sender special treatment based on who the email claims to be from.
- Review drafts before you send them. Check the recipients and the content of each agent draft, especially forwards.
These safeguards apply to the built-in agent. If you build your own agent on
inbox webhooks, see the Agent Email Inbox
skill for security patterns.
Writing instructions
Clear, specific instructions get the best results. Tell the agent what kinds of email to expect, and what to do with each. For example:Review the agent’s work
The agent’s work shows up directly in the inbox. Threads it labels, assigns or moves appear with those changes applied, and you can undo any of them by organizing the thread yourself. When you open a thread that the agent drafted a reply or forward for, the draft opens in the reply composer with a badge showing it was drafted by the agent. Edit the draft if needed, then click Send, or discard it.Disable the agent
To stop the agent from acting on new email, remove all of its available actions or clear its instructions. Via the API, send an emptyactions array.