Lumbox SDK — Email for AI agents. Create inboxes, receive OTPs, send replies.
Project description
lumbox
Email for AI agents. Create inboxes, receive OTPs, extract verification codes — all via API.
Install
pip install lumbox
Quick Start
from lumbox import Lumbox
client = Lumbox(api_key="ak_...")
# Create an inbox
inbox = client.create_inbox(name="github-bot")
# → github-bot@lumbox.co
# Sign up on any service with inbox.address...
# Wait for the OTP (blocks until it arrives)
otp = inbox.wait_for_otp(timeout=60)
print(otp["code"]) # "847291"
Auth header
The SDK sends Authorization: Bearer ak_... by default. The legacy
X-API-Key header still works server-side. Raw HTTP example:
curl https://api.lumbox.co/v1/inboxes \
-H "Authorization: Bearer ak_your_key_here"
Inbox-scoped API keys
Mint a key that can only ever touch one inbox:
created = client.inboxes.api_keys.create(inbox.id, name="ci-bot")
print(created["api_key"]) # shown once
client.inboxes.api_keys.list(inbox.id)
client.inboxes.api_keys.delete(inbox.id, created["id"])
Features
- OTP extraction — verification codes parsed automatically
- Long-poll —
wait_for_email()andwait_for_otp()block until arrival - Send/reply/forward — full outbound email support
- Custom domains — DKIM, SPF, DMARC verification
- LangChain & CrewAI — pre-built tool wrappers
Framework Integration
LangChain
pip install lumbox[langchain]
from lumbox import create_langchain_tools
tools = create_langchain_tools(api_key="ak_...")
# Use tools directly with LangChain agents
Any Framework
from lumbox import lumbox_tools
tools = lumbox_tools(api_key="ak_...")
# Dict of plain functions with proper type hints
API
Lumbox(api_key, base_url?)
Create a client. base_url defaults to https://api.lumbox.co.
client.create_inbox(name?, domain?)
Returns an Inbox object with .address, .id, and convenience methods.
inbox.wait_for_otp(timeout?, sender?)
Blocks until an email with an OTP arrives.
inbox.wait_for_email(timeout?, sender?, subject?)
Blocks until any email arrives.
inbox.list_emails()
List all emails in the inbox.
Full API docs: docs.lumbox.co
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lumbox-0.3.0.tar.gz.
File metadata
- Download URL: lumbox-0.3.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a42f41e587234a389574e3e0782c36efbeb779cb29de3fb89edb58d2451a924
|
|
| MD5 |
c6a343ccd2a188b951c337c1a41bbdf6
|
|
| BLAKE2b-256 |
ba61d1eb2883231e0d2746375bee2e1a3b21702d83d6cb9520f336165843fd2b
|
File details
Details for the file lumbox-0.3.0-py3-none-any.whl.
File metadata
- Download URL: lumbox-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89a6a87ac246afaa79c3e4f947ec38dd32e71319a39ef77c82dd7a38c8088a47
|
|
| MD5 |
571008c4675eb6dbdddf09c19912e5f6
|
|
| BLAKE2b-256 |
66ff7aa94426d37b72e23995a8710446e916a882951e3b61ae5423db4e814e57
|