AgentMail integration
AgentMail gives AI agents their own email inboxes. Create inboxes, send, reply to and forward real email, read and label messages and threads, manage drafts (including scheduled sends), allow and block lists, custom sending domains, pods for multi-tenant setups, inbox calendars and webhooks, and read delivery metrics. Left out: agent self sign-up, API key management, inbox file uploads, polling webhooks, custom webhook delivery headers (their values are usually credentials), AgentID sign-in authorization and connect links, and labs enrollment. Messages, threads, drafts, attachments and calendar attendees are personal data (addresses and email content). Authentication is an API key from the AgentMail Console, sent as a Bearer token, plus the region host of your organization (US or EU; calendar is US only).
Say what should happen.
The workflow builds itself.
What you can do with AgentMail
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Each badge shows the default agent permission of an endpoint (allowed: an agent calls it without asking; ask first: you are asked before an agent calls it, when the agent or chat asks permission for sensitive actions; never: no agent may call it), which every user can change endpoint by endpoint in their credential settings.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Webhook, 10 operations
create_inbox_webhookCreate inbox webhookPOSTAgents: ask firstCreates a webhook that POSTs this inbox's events (new mail, deliveries, bounces, calendar) to your URL; returns webhook_id. The signing secret is not returned here: read it in the AgentMail Console.create_webhookCreate webhookPOSTAgents: ask firstCreates a webhook that POSTs events (new mail, deliveries, bounces, calendar) of the organization, or only of the listed inboxes and pods, to your URL. The signing secret is not returned: read it in the AgentMail Console.delete_inbox_webhookDelete inbox webhookDELETEAgents: ask firstDeletes an inbox webhook; its URL receives no further events.delete_webhookDelete webhookDELETEAgents: ask firstDeletes a webhook; its URL receives no further events.get_inbox_webhookGet inbox webhookGETAgents: ask firstReturns one inbox webhook: URL, event types, enabled flag and dates. The signing secret used to verify deliveries is not returned here: read it in the AgentMail Console.get_webhookGet webhookGETAgents: ask firstReturns one webhook: URL, event types, covered inboxes and pods, enabled flag and dates. The signing secret used to verify deliveries is not returned here: read it in the AgentMail Console.list_inbox_webhooksList inbox webhooksGETAgents: ask firstLists the webhooks scoped to this inbox: URL, event types and whether each is enabled (a webhook failing for 5 days is disabled with no notice).list_webhooksList webhooksGETAgents: ask firstLists the organization's webhooks: URL, event types, the inboxes and pods each covers, and whether it is enabled (a webhook failing for 5 days is disabled with no notice).update_inbox_webhookUpdate inbox webhookPATCHAgents: ask firstChanges an inbox webhook's event types (replaced in full) or enables or disables it. Fields left out keep their value.update_webhookUpdate webhookPATCHAgents: ask firstChanges a webhook: replaces its event types in full, enables or disables it, or adds and removes covered inboxes and pods. Fields left out keep their value.
Thread, 9 operations
delete_inbox_threadDelete inbox threadDELETEAgents: ask firstDeletes a thread and all of its messages from the inbox. Cannot be undone.delete_threadDelete threadDELETEAgents: ask firstDeletes a thread and all of its messages. Cannot be undone.get_inbox_threadGet inbox threadGETAgents: ask firstReturns one thread with its messages (sender, recipients, subject, text, html, attachments, labels). The messages are email content and may contain personal data. Page long threads with page_token.get_threadGet threadGETAgents: ask firstReturns one thread from any inbox the API key can see, with its messages (sender, recipients, subject, text, html, attachments, labels). Email content may contain personal data.list_inbox_threadsList inbox threadsGETAgents: ask firstLists the inbox's email threads (conversations), most recent first, with subject, senders, recipients, preview, labels and message count. Filter by labels, dates, senders, recipients or subject (substring).list_pod_threadsList pod threadsGETAgents: ask firstLists the email threads of one pod's inboxes, most recent first. Filter by labels, dates, senders, recipients or subject (substring).list_threadsList threadsGETAgents: ask firstLists email threads across every inbox the API key can see, most recent first, with subject, senders, recipients, preview and labels. Filter by labels, dates, senders, recipients or subject (substring).update_inbox_thread_labelsUpdate inbox thread labelsPATCHAgents: ask firstAdds and removes labels on every message of a thread; returns the thread's new labels. Pass at least one of add_labels and remove_labels.update_thread_labelsUpdate thread labelsPATCHAgents: ask firstAdds and removes labels on every message of a thread (any inbox the key can see); returns the thread's new labels. Pass at least one of add_labels and remove_labels.
Event, 8 operations
create_calendar_eventCreate calendar eventPOSTAgents: ask firstCreates a one-off or recurring event on the inbox's calendar; with send_invites true it also emails real invitations to the attendees. Returns the event (with UTC start_at and end_at) and its etag. US host only.delete_calendar_eventDelete calendar eventDELETEAgents: ask firstDeletes an event and all its dates (UUID), or cancels one or later dates of a recurring event (dated ID plus mode). With send_invites true, attendees are emailed a cancellation. US host only.get_calendar_eventGet calendar eventGETAgents: ask firstReturns one event by UUID, or one date of a recurring event by its dated ID, with attendees, recurrence, UTC start_at and end_at, and the etag to send as If-Match on a change. US host only.get_event_metricsGet event metricsGETAgents: ask firstCounts email events for the organization (sent, delivered, bounced, complained, received...) over time, as a map from event type to timestamped counts. Defaults to the last 24 hours.get_inbox_event_metricsGet inbox event metricsGETAgents: ask firstCounts email events for one inbox (sent, delivered, bounced, complained, received...) over time, as a map from event type to timestamped counts. Defaults to the last 24 hours.list_calendar_eventsList calendar eventsGETAgents: ask firstLists the events stored on the calendar, most recently updated first: one item per one-off or recurring event plus each edited date, cancelled ones included. For what happens when, use get_calendar_agenda.list_inbox_label_eventsList inbox label eventsGETAgents: ask firstLists label change events of the inbox (which message gained or lost which label, and when), newest first. Useful for audit logs or syncing labels.update_calendar_eventUpdate calendar eventPATCHAgents: ask firstChanges an event, or one or later dates of a recurring event (dated ID plus mode). Send only fields to change; with send_invites true attendees are emailed the update. US host only.
List, 8 operations
create_access_list_entryCreate access list entryPOSTAgents: ask firstAdds an email address or domain to an organization-wide allow or block list; it applies at once to every inbox (a block entry stops mail to or from it).create_inbox_access_list_entryCreate inbox access list entryPOSTAgents: ask firstAdds an email address or domain to the inbox's allow or block list; it applies at once to this inbox.delete_access_list_entryDelete access list entryDELETEAgents: ask firstRemoves an address or domain from an organization-wide allow or block list.delete_inbox_access_list_entryDelete inbox access list entryDELETEAgents: ask firstRemoves an address or domain from the inbox's allow or block list.get_access_list_entryGet access list entryGETAgents: ask firstReturns one organization-wide allow or block list entry, with its reason and creation date.get_inbox_access_list_entryGet inbox access list entryGETAgents: ask firstReturns one entry of the inbox's allow or block list, with its reason and creation date.list_access_list_entriesList access list entriesGETAgents: ask firstLists the organization-wide allow or block list entries (email addresses and domains) for sending, receiving or replying.list_inbox_access_list_entriesList inbox access list entriesGETAgents: ask firstLists the inbox's own allow or block list entries (email addresses and domains) for sending, receiving or replying.
Domain, 7 operations
create_domainCreate domainPOSTAgents: ask firstRegisters a custom domain to send (and receive) from; returns domain_id, status and the DNS records to add at your DNS provider. Counts against the plan's domain limit.create_pod_domainCreate pod domainPOSTAgents: ask firstRegisters a custom domain inside a pod; returns domain_id, status and the DNS records to add at your DNS provider.delete_domainDelete domainDELETEAgents: ask firstRemoves a custom domain from AgentMail; inboxes on it can no longer send or receive. Cannot be undone.get_domainGet domainGETAgents: ask firstReturns one domain: verification status and reason, open-tracking status, enabled options, and every DNS record it needs with each record's status.list_domainsList domainsGETAgents: ask firstLists the organization's custom sending domains with their verification status and the DNS records each needs.list_pod_domainsList pod domainsGETAgents: ask firstLists the custom domains of one pod with their verification status and required DNS records.update_domainUpdate domainPATCHAgents: ask firstChanges a domain's options (feedback notifications, inbound mail, subdomains, open tracking); changing them can add or remove required DNS records. Fields left out keep their value.
Draft, 7 operations
create_draftCreate draftPOSTAgents: ask firstCreates a draft in the inbox (nothing is sent). With in_reply_to or forward_of it becomes a reply or forward draft. With send_at it is SENT automatically at that time. Send it now with send_draft.delete_draftDelete draftDELETEAgents: ask firstDeletes a draft (a scheduled draft is then never sent). Cannot be undone.get_draftGet draftGETAgents: ask firstReturns one draft from any inbox the API key can see: recipients, subject, text, html, attachments, send status and scheduled send time.get_inbox_draftGet inbox draftGETAgents: ask firstReturns one draft of the inbox: recipients, subject, text, html, attachments, labels, send status and scheduled send time.list_draftsList draftsGETAgents: ask firstLists drafts across every inbox the API key can see, most recent first, with recipients, subject, preview and scheduled send time.list_inbox_draftsList inbox draftsGETAgents: ask firstLists the inbox's drafts, most recent first, with recipients, subject, preview, labels and scheduled send time.update_draftUpdate draftPATCHAgents: ask firstEdits a draft: recipients, subject, body, attachments, labels or scheduled send time. Fields left out keep their value; an empty list clears a recipient field. A draft already being sent cannot be edited.
Inbox, 7 operations
create_inboxCreate inboxPOSTAgents: ask firstCreates a new email inbox (a real address that can send and receive) and returns its inbox_id and email. username is random and domain is agentmail.to when left out. Counts against the plan's inbox limit.create_pod_inboxCreate pod inboxPOSTAgents: ask firstCreates a new email inbox inside a pod and returns its inbox_id and email. username is random and domain is agentmail.to when left out. Counts against the plan's inbox limit.delete_inboxDelete inboxDELETEAgents: ask firstPermanently deletes an inbox and its address. Cannot be undone.get_inboxGet inboxGETAgents: ask firstReturns one inbox: its email address, display name, pod, status (paused or active), scheduled pause, signature and metadata.list_inboxesList inboxesGETAgents: ask firstLists the inboxes of the organization (or of the API key's pod or inbox), newest first, with each inbox_id, email address, display name, status and metadata. Page with page_token.list_pod_inboxesList pod inboxesGETAgents: ask firstLists the inboxes of one pod, newest first, with each inbox_id, email address, display name and status.update_inboxUpdate inboxPATCHAgents: ask firstChanges an inbox's display name, signature or metadata, pauses it (status paused stops sending and receiving) or resumes it (status active). Fields left out keep their current value.
Account, 5 operations
get_accountGet accountGETAgents: ask firstReturns one AgentID account: app, inbox, sign-in dates and count, and whether it is disabled.get_inbox_accountGet inbox accountGETAgents: ask firstReturns one AgentID account of this inbox: app, sign-in dates and count, and whether it is disabled.list_accountsList accountsGETAgents: ask firstLists the AgentID accounts your inboxes hold at apps (one per inbox and app), with first and last sign-in and status, within the API key's scope.list_app_accountsList app accountsGETAgents: ask firstLists your inboxes' accounts at one AgentID app, most recent sign-in first, with sign-in counts and status.list_inbox_accountsList inbox accountsGETAgents: ask firstLists the AgentID accounts this inbox holds at apps, with sign-in dates, counts and status.
Attachment, 5 operations
get_draft_attachmentGet draft attachmentGETAgents: ask firstReturns a temporary download_url (and text_url with extracted text, when available) for one attachment, with its filename, size and content type. The URL needs no API key and expires at expires_at.get_inbox_draft_attachmentGet inbox draft attachmentGETAgents: ask firstReturns a temporary download_url (and text_url with extracted text, when available) for one attachment, with its filename, size and content type. The URL needs no API key and expires at expires_at.get_inbox_thread_attachmentGet inbox thread attachmentGETAgents: ask firstReturns a temporary download_url (and text_url with extracted text, when available) for one attachment, with its filename, size and content type. The URL needs no API key and expires at expires_at.get_message_attachmentGet message attachmentGETAgents: ask firstReturns a temporary download_url (and text_url with extracted text, when available) for one attachment, with its filename, size and content type. The URL needs no API key and expires at expires_at.get_thread_attachmentGet thread attachmentGETAgents: ask firstReturns a temporary download_url (and text_url with extracted text, when available) for one attachment, with its filename, size and content type. The URL needs no API key and expires at expires_at.
Search, 5 operations
search_appsSearch appsGETAgents: ask firstSearches the AgentID app catalog by name prefix.search_inboxesSearch inboxesGETAgents: ask firstSearches the organization's inboxes by address or display name (word prefixes: sup matches support@...), best match first. q takes 2 to 256 characters; limit at most 100.search_inbox_threadsSearch inbox threadsGETAgents: ask firstFull-text search over the inbox's threads (senders, recipients, subject and body), best match first. Spam, trash, blocked and unauthenticated threads are always excluded; limit at most 100.search_messagesSearch messagesGETAgents: ask firstFull-text search over the inbox's messages (sender, recipients and subject as substrings, body as full text), best match first. Spam, trash, blocked and unauthenticated mail is excluded; limit at most 100.search_threadsSearch threadsGETAgents: ask firstFull-text search over threads across every inbox the API key can see (senders, recipients, subject, body), best match first. Spam, trash, blocked and unauthenticated threads are excluded; limit at most 100.
Message, 4 operations
delete_messageDelete messageDELETEAgents: ask firstPermanently deletes one message. Cannot be undone.get_messageGet messageGETAgents: ask firstReturns one message: sender, recipients, subject, text and HTML bodies, extracted reply text (quoted history stripped), attachments, labels, headers and Agent Armor verdict. Email content may contain personal data.list_messagesList messagesGETAgents: ask firstLists the inbox's messages, most recent first, with sender, recipients, subject, preview and labels. Filter by labels, dates, or substrings of from, to or subject. Email content may contain personal data.update_message_labelsUpdate message labelsPATCHAgents: ask firstAdds and removes labels on one message (for example add read, remove unread); returns its new labels. Pass at least one of add_labels and remove_labels.
Pod, 4 operations
create_podCreate podPOSTAgents: ask firstCreates a pod, an isolated group of inboxes, domains and data (for example one per customer); returns pod_id.delete_podDelete podDELETEAgents: ask firstDeletes a pod. Cannot be undone.get_podGet podGETAgents: ask firstReturns one pod: name, client_id and dates.list_podsList podsGETAgents: ask firstLists the organization's pods (isolated groups of inboxes, domains and data for multi-tenant setups), newest first.
File, 3 operations
delete_inbox_fileDelete inbox fileDELETEAgents: ask firstDeletes a file from the inbox's drive and frees its path and quota. Cannot be undone; a download URL signed earlier keeps working until it expires.get_inbox_fileGet inbox fileGETAgents: ask firstReturns one file of the inbox's drive: path, size, content type, status and, when ready, a fresh download_url valid for up to an hour (no API key needed to use it).list_inbox_filesList inbox filesGETAgents: ask firstLists the files stored in the inbox's drive in path order (pending uploads included), optionally under a path_prefix. Items carry no download URL: call get_inbox_file for one.
App, 2 operations
get_appGet appGETAgents: ask firstReturns one AgentID app by ID or slug: name, description, categories, terms and privacy links, and how many accounts your organization may create there.list_appsList appsGETAgents: ask firstLists apps in the AgentID catalog (services an inbox can sign in to with its address), most popular first, optionally in one category.
Calendar, 2 operations
get_calendarGet calendarGETAgents: ask firstReturns the inbox's calendar: default time zone, event count and etag (send it as If-Match to make update_calendar conditional). Every inbox has one calendar. US host only.update_calendarUpdate calendarPATCHAgents: ask firstChanges the calendar's default time zone (an IANA name such as Europe/Paris). Existing events keep their own time zone; only later events created without one use it. US host only.
Header, 2 operations
list_inbox_webhook_header_namesList inbox webhook header namesGETAgents: ask firstLists the names of the custom HTTP headers sent with this inbox webhook's deliveries. Header values are write-only and never returned.list_webhook_header_namesList webhook header namesGETAgents: ask firstLists the names of the custom HTTP headers sent with this webhook's deliveries. Header values are write-only and never returned.
Rate, 2 operations
get_inbox_rate_metricsGet inbox rate metricsGETAgents: ask firstRolling bounce and complaint rates for one inbox: at each point, bounced (or complained) messages over the preceding window divided by messages sent. Moderation acts on the organization rate.get_rate_metricsGet rate metricsGETAgents: ask firstRolling bounce and complaint rates for the organization: at each point, bounced (or complained) messages over the preceding window divided by messages sent, with the send count.
Send, 2 operations
send_draftSend draftPOSTAgents: ask firstSends a draft as a real email now and returns message_id and thread_id; the draft is consumed. Irreversible; counts against the daily send limit. Pass an Idempotency-Key to retry safely.send_messageSend messagePOSTAgents: ask firstSends a real email now from the inbox to the given recipients and returns message_id and thread_id. Irreversible; counts against the plan's daily send limit (Free plan: 100 per day). Pass an Idempotency-Key to retry safely.
Usage, 2 operations
get_inbox_usage_metricsGet inbox usage metricsGETAgents: ask firstCumulative usage of one inbox over time (storage bytes, message count, thread count): each point is the running total at that time.get_usage_metricsGet usage metricsGETAgents: ask firstCumulative usage of the organization over time (storage bytes, messages, threads, inboxes, pods, domains): each point is the running total at that time.
Agenda, 1 operation
get_calendar_agendaGet calendar agendaGETAgents: ask firstLists every date on the calendar in a time window (default: now to 90 days ahead), in start order: one-off events and each date of recurring events, cancelled dates left out. US host only.
Batch get, 1 operation
batch_get_messagesBatch get messagesPOSTAgents: ask firstReturns up to 500 messages of the inbox in one call, by message_ids. IDs not found or not readable are silently left out: compare count with limit to detect misses.
Batch update, 1 operation
batch_update_message_labelsBatch update message labelsPOSTAgents: ask firstAdds and removes the same labels on up to 50 messages at once (all or none). Pass at least one of add_labels and remove_labels. Missing ids are silently skipped: compare count with limit.
Feedback, 1 operation
create_agent_armor_feedbackCreate agent armor feedbackPOSTAgents: ask firstRecords your verdict on Agent Armor's prompt-injection scan of a message (correct_review, incorrect_review, missed_threat, legitimate_agent_instruction, spam_or_phishing). At most 20 per message.
Forward, 1 operation
forward_messageForward messagePOSTAgents: ask firstForwards a received message as a real email now, from the inbox to the given recipients; returns the new message_id and thread_id. Irreversible; counts against the daily send limit.
Instance, 1 operation
list_calendar_event_datesList calendar event datesGETAgents: ask firstLists the dates of one recurring event in a time window (default: now to 90 days ahead, at most 366 days), in start order with edits applied and cancelled dates left out. US host only.
Me, 1 operation
get_current_identityGet current identityGETAgents: ask firstReturns what the configured API key is bound to: its scope (organization, pod or inbox), the organization, pod and inbox IDs, and the API key ID. Use it to find the inbox of an inbox-scoped key.
Organization, 1 operation
get_organizationGet organizationGETAgents: ask firstReturns the API key's organization: inbox and domain counts and limits, billing provider references, and whether (and why) it is suspended.
Raw, 1 operation
get_raw_messageGet raw messageGETAgents: ask firstReturns a temporary download_url for the message's original raw email (RFC 822 .eml), with its size; the URL needs no API key and expires at expires_at.
Release, 1 operation
release_held_messageRelease held messagePOSTAgents: ask firstReleases a message Agent Armor held for review, so your agents receive it (message.received is sent and the agent-armor-held label removed). Needs the opt-in agent_armor_release permission; 409 unless held.
Reply, 1 operation
reply_to_messageReply to messagePOSTAgents: ask firstSends a real reply now, in the same thread, to the original sender (or everyone with reply_all); returns message_id and thread_id. Irreversible; counts against the daily send limit.
Reply all, 1 operation
reply_all_to_messageReply all to messagePOSTAgents: ask firstSends a real reply now to the sender and every recipient of the original message, in the same thread; returns message_id and thread_id. Irreversible; counts against the daily send limit.
Respond, 1 operation
respond_to_calendar_eventRespond to calendar eventPOSTAgents: ask firstAccepts, declines or tentatively accepts an invitation the inbox received by email, for every date (UUID) or one date (dated ID). With send_reply true the organizer is emailed the answer. US host only.
Setup link, 1 operation
get_domain_setup_linkGet domain setup linkGETAgents: ask firstBuilds a one-click Domain Connect link that adds the domain's DNS records at a supported DNS provider; supported false means add them by hand. The domain owner opens url in a browser.
Update, 1 operation
update_accountUpdate accountPATCHAgents: ask firstDisables an inbox's AgentID account at an app (it can no longer sign in there) or re-enables it.
Verify, 1 operation
verify_domainVerify domainPOSTAgents: ask firstAsks AgentMail to check the domain's DNS records again now, instead of waiting for the periodic check; read the result with get_domain.
Zone file, 1 operation
get_domain_zone_fileGet domain zone fileGETAgents: ask firstDownloads the domain's DNS records as a BIND zone file, stored as a file, to import at your DNS provider.
Use AgentMail from Claude Code, Cursor or Codex
Connect AgentMail in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its AgentMail operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect AgentMail
- Create your workspace
Sign up free. Nothing to install.
- Connect AgentMail once
Add your AgentMail connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
AgentMail integration FAQ
What can you do with the AgentMail integration?
LiveContext exposes 111 operations on AgentMail, covering webhook, thread, event and list.
