sente-sdk
Working accounts for AI agents — the Python client for Sente.
Create accounts on third-party apps (or connect ones you already own), let Sente keep the login
alive, and get a browser that's already signed in — or a Playwright storageState for your own
stack — in one call. Underneath, every agent gets a real email identity it owns, with verification
emails parsed on arrival.
Dependency-free (stdlib only). The PyPI distribution is sente-sdk; the import is sente.
pip install sente-sdk
Quickstart: accounts and sessions
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@sente.run, the agent's identity
# Create an account at an app under that identity. Email verification completes
# from the identity's own inbox — the run controller applies the code for you:
reg = sente.registrations.register(identity_id=idt.id, app_url="https://app.example.com/signup")
sente.runs.wait_for_run(reg.run.id)
# ...or connect an account you already own (credentials vaulted write-only;
# with a totp_seed, TOTP re-login needs no human):
# conn = sente.connections.connect(identity_id=idt.id, app_url="https://app.example.com",
# username="me@co.example.com", password="...", totp_seed="...")
# When the agent needs to act: a remote browser, already signed in. If the login
# went stale, Sente re-logs-in first (vaulted creds + a fresh code from the inbox):
s = sente.registrations.get_session(reg.registration.id)
browser = playwright.chromium.connect_over_cdp(s["cdpUrl"]) # already logged in
# ...do the work...
sente.registrations.close_session(reg.registration.id)
# Prefer your own browser stack? Export the logged-in state instead:
state = sente.registrations.export_session(reg.registration.id) # Playwright storageState dict
Honest edges: some sites fraud-block automated signups, and CAPTCHAs are a hard stop — the run goes
blocked with a live_view_url for a human takeover (runs.resume after). Pass
confirm_before_submit=True to keep a human clicking the final signup submit.
The identity underneath: send & receive email
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 yourself (e.g. an app you drive with your own automation sent a
code to 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.
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.7.0.tar.gz.
File metadata
- Download URL: sente_sdk-0.7.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a967e2e9c984f4cb7bb212ae2a1dd2f4f6376737d29fcc37102b0781c25b054
|
|
| MD5 |
e67a422d257536f98b6e7a793d0f2f62
|
|
| BLAKE2b-256 |
32e27540ad3e0cd6a303f38cf2cdcf0b7054d4202047df9cf98530d700385fd1
|
File details
Details for the file sente_sdk-0.7.0-py3-none-any.whl.
File metadata
- Download URL: sente_sdk-0.7.0-py3-none-any.whl
- Upload date:
- Size: 9.3 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 |
9dcf9e58b3f9702a9b83ccba1e98fd31c93a88d3b581a5c954ec9f5bb292c2e2
|
|
| MD5 |
9daf855182e9c7227924f27fb6166e21
|
|
| BLAKE2b-256 |
377d872e8b3a201018e30c01047a20789b6e2b94dbc23f859f767b8f1ced064e
|