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: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 viasend_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.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

