agentemail
Official Python SDK for the AgentEmail API.
Create and manage email inboxes programmatically for your AI agents and applications.
Installation
pip install agentemail
Quick Start
from agentemail import AgentemailApi
client = AgentemailApi(api_key="aem_your_api_key_here")
# List your inboxes
inboxes = client.sdk.sdk_list_inboxes()
print(inboxes.data)
# Create a new inbox
inbox = client.sdk.sdk_create_inbox(name="hello")
print(inbox.name) # "hello"
# Full address: hello@agentemail.co
# List email threads
threads = client.sdk.sdk_list_threads(inbox.id)
for thread in threads.data:
print(thread.subject, thread.message_count)
# Get a full thread with all messages
thread = client.sdk.sdk_get_thread(inbox.id, threads.data[0].id)
for message in (thread.messages or []):
print(message.from_address, message.body_text)
# Check usage vs plan limits
usage = client.sdk.sdk_get_usage()
print(usage)
Async Usage
import asyncio
from agentemail import AsyncAgentemailApi
async def main():
client = AsyncAgentemailApi(api_key="aem_your_api_key_here")
inboxes = await client.sdk.sdk_list_inboxes()
print(inboxes.data)
asyncio.run(main())
Authentication
Generate an API key from your AgentEmail dashboard.
import os
from agentemail import AgentemailApi
client = AgentemailApi(api_key=os.environ["AGENTEMAIL_API_KEY"])
API Reference
Inboxes
| Method | Description |
|---|---|
client.sdk.sdk_list_inboxes(limit=None, offset=None) |
List all your inboxes (paginated) |
client.sdk.sdk_create_inbox(name=...) |
Create a new inbox |
Emails & Threads
| Method | Description |
|---|---|
client.sdk.sdk_list_threads(inbox_id, limit=None, offset=None, unread_only=None) |
List email threads for an inbox |
client.sdk.sdk_get_thread(inbox_id, thread_id, mark_read=None) |
Get a thread with all messages |
Usage
| Method | Description |
|---|---|
client.sdk.sdk_get_usage() |
Get current usage vs plan limits |
Links
License
MIT
Metadata
Release files for agentemail 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentemail-0.1.3.tar.gz | 29.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentemail-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 76.2 kB
Release files / agentemail-0.1.3.tar.gz
| Download URL | agentemail-0.1.3.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b565186c1edb2f9584f9b09e0ef2754810dd78a0f56411e8ef5bd44cc00c87bd
|
|
BLAKE2b-256 checksum How to use checksums |
f2910883b524329ad1759c8828906bdba95a787b9d0be8ad4d596067a14db05f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / agentemail-0.1.3-py3-none-any.whl
| Download URL | agentemail-0.1.3-py3-none-any.whl |
|---|---|
| Size | 46.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26d492a0ca573b0f94a16639e050d86a84daaa05370401aeb2ba26c2ce5ce3f7
|
|
BLAKE2b-256 checksum How to use checksums |
f94a2c0fb7ea97cca67490b6a56420bb49b736aa52504c2a85d391a02d08f86b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|