Skip to main content

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.

Metadata

Release files for sente-sdk 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sente-sdk 0.7.0
File Size Uploaded
sente_sdk-0.7.0.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sente-sdk 0.7.0
File Interpreter ABI Platform
sente_sdk-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / sente_sdk-0.7.0.tar.gz

Download URL sente_sdk-0.7.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3a967e2e9c984f4cb7bb212ae2a1dd2f4f6376737d29fcc37102b0781c25b054
BLAKE2b-256 checksum
How to use checksums
32e27540ad3e0cd6a303f38cf2cdcf0b7054d4202047df9cf98530d700385fd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / sente_sdk-0.7.0-py3-none-any.whl

Download URL sente_sdk-0.7.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dcf9e58b3f9702a9b83ccba1e98fd31c93a88d3b581a5c954ec9f5bb292c2e2
BLAKE2b-256 checksum
How to use checksums
377d872e8b3a201018e30c01047a20789b6e2b94dbc23f859f767b8f1ced064e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page