CrewAI + AgentMail
Official AgentMail integration for CrewAI. Give your CrewAI agents real email inboxes — send, receive, reply, search, and organize emails as tools.
Install
pip install crewai-agentmail
Quick Start
from crewai import Agent
from crewai_agentmail import AgentMailTools
# Initialize with API key (or set AGENTMAIL_API_KEY env var)
toolkit = AgentMailTools(api_key="am_live_...")
# Add all 11 tools to an agent
agent = Agent(
role="Email Assistant",
goal="Manage email communications",
tools=toolkit.get_tools(),
)
Create an Inbox & Send Email
# Individual tools
from crewai_agentmail import CreateInbox, SendEmail
create = CreateInbox(api_key="am_live_...")
print(create._run(name="Support Agent")) # → inbox ID + email
send = SendEmail(api_key="am_live_...")
print(send._run(to="user@example.com", subject="Hello", body="Hi there!"))
Wait for Replies
from crewai_agentmail import WaitForMessage
wait = WaitForMessage(api_key="am_live_...")
print(wait._run(inbox_id="inbox_123", timeout=120))
Search & Label
from crewai_agentmail import SearchMessages, CreateLabel, ApplyLabel
search = SearchMessages(api_key="am_live_...")
print(search._run(inbox_id="inbox_123", query="urgent"))
label = CreateLabel(api_key="am_live_...")
print(label._run(name="Follow-Up", color="#FF5733"))
Environment Variables
| Variable | Description |
|---|---|
AGENTMAIL_API_KEY |
Your AgentMail API key. Optional if passed to constructor. |
Available Tools
| Tool | Description |
|---|---|
CreateInbox |
Create a new email inbox |
SendEmail |
Send an email |
ListMessages |
List messages in an inbox |
GetMessage |
Get full message details |
ReplyToEmail |
Reply to a message |
ForwardEmail |
Forward a message |
WaitForMessage |
Long-poll for new messages |
SearchMessages |
Search messages by query |
CreateLabel |
Create an organizational label |
ApplyLabel |
Apply a label to a message |
DeleteInbox |
Delete an inbox permanently |
Example
See example.py for a full CrewAI crew with a Sales Rep agent that creates an inbox, sends outreach, waits for replies, and cleans up.
License
MIT
Release files for crewai-agentmail 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crewai_agentmail-0.1.0.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crewai_agentmail-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / crewai_agentmail-0.1.0.tar.gz
| Download URL | crewai_agentmail-0.1.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76ac5c6a40ce6bbee70dcaa925984cb2fac2ad6fc20f408650efef9dc38cfa9c
|
|
BLAKE2b-256 checksum How to use checksums |
f4ad35f70315f1d902a772b296df2799082874ee7e426cac7c0b95b926438538
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / crewai_agentmail-0.1.0-py3-none-any.whl
| Download URL | crewai_agentmail-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
947b910d1b255ce211c2d3e2c45dd08f9e3ba948ddd93837063e68caf3ef1641
|
|
BLAKE2b-256 checksum How to use checksums |
8ab8a4db10b4281ea815c40f1a3d79f12ae2c996c03486077fe6db0d0c88f47f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|