Metadata-Version: 2.4
Name: lumbox
Version: 0.3.0
Summary: Lumbox SDK — Email for AI agents. Create inboxes, receive OTPs, send replies.
License-Expression: MIT
Project-URL: Homepage, https://lumbox.co
Project-URL: Repository, https://github.com/kumard3/agentinbox
Project-URL: Documentation, https://docs.lumbox.co
Keywords: email,ai,agents,otp,mcp,lumbox,verification
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3.0; extra == "langchain"
Provides-Extra: crewai
Requires-Dist: crewai>=0.80.0; extra == "crewai"

# lumbox

Email for AI agents. Create inboxes, receive OTPs, extract verification codes — all via API.

## Install

```bash
pip install lumbox
```

## Quick Start

```python
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:

```bash
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:

```python
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()` and `wait_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

```bash
pip install lumbox[langchain]
```

```python
from lumbox import create_langchain_tools

tools = create_langchain_tools(api_key="ak_...")
# Use tools directly with LangChain agents
```

### Any Framework

```python
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](https://docs.lumbox.co)

## License

MIT
