Skip to main content
AgentMail is an inbox-as-an-API platform for AI agents. The langchain-agentmail package provides LangChain tools for sending messages, replying inside a thread, managing drafts, downloading attachments, and labeling—all wired to a real AgentMail inbox.

Overview

Integration details

Available tools

Setup

Install the package:

Credentials

You need an AgentMail API key. Sign up at agentmail.to to get one.

Instantiation

Use the toolkit to get all tools at once:
You can also instantiate individual tools directly:

Invocation

Invoke directly with args

Invoke with ToolCall

Use within an agent

Drafts

The draft tools let an agent compose iteratively, revise, and ship—useful when a model wants to stage a message and confirm before sending, or schedule delivery via send_at:

Attachments

Outbound attachments can be passed as base64 file content or as a public URL. Inbound attachments are fetched via presigned download URLs:

API reference

For detailed documentation of the AgentMail API, visit docs.agentmail.to. The Python package source lives at github.com/agentmail-to/langchain-agentmail.