Managed email identities for AI agents — the Python client for Sente (import sente).
Project description
sente-sdk
Managed email identities for AI agents — the Python client for Sente. Give your agent a real, reusable email address it owns: send, receive, and react to mail.
Dependency-free (stdlib only). The PyPI distribution is sente-sdk; the import is sente.
pip install sente-sdk
from sente import Sente
sente = Sente(api_key="sk_sente_...") # get a key with the `sente` CLI: `sente login`
idt = sente.identities.create(name="support-bot") # -> support-bot@agents.sente.run
sente.messages.send(idt.id, to="user@example.com", subject="hi", text="from your agent")
# React to inbound mail (a long-running consumer; for production prefer a webhook):
for msg in sente.messages.stream(idt.id):
if msg.direction != "outbound":
body = (msg.parsed or {}).get("text", "")
# ... handle msg.from_addr / msg.subject / body
Waiting for a verification email (the agent signed up somewhere with idt.email)? Stamp since
before triggering the action, then block for the extracted code or link:
from datetime import datetime, timezone
since = datetime.now(timezone.utc).isoformat()
# ... trigger the app's "send code" action ...
r = sente.messages.wait_for_otp(idt.id, since=since, timeout=60) # -> OtpResult(code, message) | None
if r:
print(r.code) # magic links: wait_for_magic_link(...) -> MagicLinkResult(link, message) | None
Webhook handlers receive a thin event { "type": "message.received", "message": { "id": ... } } with
an x-sente-secret header; fetch the full message with sente.messages.get(message_id).
Full onboarding playbook (CLI + framework templates): https://sente.run/skill.md.
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 sente_sdk-0.2.0.tar.gz.
File metadata
- Download URL: sente_sdk-0.2.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d9fb1c6cdd7256fecfc9d7887eab6edf837516295765739d694bf0a067c77d
|
|
| MD5 |
3eeab84b89b87de70133fcc7f82c2e2f
|
|
| BLAKE2b-256 |
d377e593d95b1c3da50a7cedb9ecc5e5dbc90be25d409fc3fd082118e3562837
|
File details
Details for the file sente_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sente_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d94b9d001192ce6a4438c9eb753fdfb10cf3a83649fe05fabe14cf0a5bf07c87
|
|
| MD5 |
8b0b867cda589891727cd7f109321edc
|
|
| BLAKE2b-256 |
aa4b41de654024bbca86942947221dcdde82fdde0110711b05f50c7212ca438b
|