AgentMail Toolkit
The AgentMail Toolkit integrates popular agent frameworks including OpenAI Agents SDK, LangChain, and LiveKit Agents with the AgentMail API.
Setup
Get your API key from AgentMail
Installation
pip install agentmail-toolkit
Configuration
export AGENTMAIL_API_KEY=your-api-key
Usage
from agentmail_toolkit.openai import AgentMailToolkit
from agents import Agent
agent = Agent(
name="Email Agent",
instructions="You are an agent created by AgentMail that can send, receive, and manage emails.",
tools=AgentMailToolkit().get_tools(),
)
Errors
A failed tool call (an AgentMail API error, or any other exception) is surfaced
as a real failure, not a disguised success — each adapter raises the way its
framework expects: RuntimeError (OpenAI Agents SDK), ToolException
(LangChain, which becomes an error ToolMessage), or ToolError (LiveKit
Agents).
Attachment downloads
get_attachment's text extraction (PDF/DOCX) only follows https://
download URLs, applies a 15-second fetch timeout, and caps the downloaded
body at 25MB — attachments outside these bounds, or that fail to parse, are
returned without extracted text instead of raising.
Metadata
Release files for agentmail-toolkit 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentmail_toolkit-0.3.2.tar.gz | 256.0 kB | Without provenance | Details for agentmail_toolkit-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentmail_toolkit-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for agentmail_toolkit-0.3.2-py3-none-any.whl |
Total release size: 267.9 kB
Release files / agentmail_toolkit-0.3.2.tar.gz
| Download URL | agentmail_toolkit-0.3.2.tar.gz |
|---|---|
| Size | 256.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3eeb4edd98c9950344644e156b25d3960a8e346db2a40ba4f1e60c1f75fa4f95
|
|
BLAKE2b-256 checksum How to use checksums |
730c84b07694bfdec4e27e4f72d156cd81f7201aafadcc71d6ee95804b2b3ae6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / agentmail_toolkit-0.3.2-py3-none-any.whl
| Download URL | agentmail_toolkit-0.3.2-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07e76e95b31f296da0234365fdd30c36d2e3ba7128e881b7468848a277b99a6f
|
|
BLAKE2b-256 checksum How to use checksums |
9877d9b21ed33fcdd79d27e75c220b52a77dc75677c6be12a7dfd7d3ec0df882
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for agentmail-toolkit 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.