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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sente_sdk-0.7.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sente_sdk-0.7.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for sente_sdk-0.7.0.tar.gz
Algorithm Hash digest
SHA256 3a967e2e9c984f4cb7bb212ae2a1dd2f4f6376737d29fcc37102b0781c25b054
MD5 e67a422d257536f98b6e7a793d0f2f62
BLAKE2b-256 32e27540ad3e0cd6a303f38cf2cdcf0b7054d4202047df9cf98530d700385fd1

See more details on using hashes here.

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

Hashes for sente_sdk-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dcf9e58b3f9702a9b83ccba1e98fd31c93a88d3b581a5c954ec9f5bb292c2e2
MD5 9daf855182e9c7227924f27fb6166e21
BLAKE2b-256 377d872e8b3a201018e30c01047a20789b6e2b94dbc23f859f767b8f1ced064e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.2.0

2 files

0.1.0

2 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