Skip to main content

Python SDK for Sentinel human-in-the-loop oversight

Project description

Sentinel SDK

License: MIT PyPI version

Oversight infrastructure for AI agents.

Sentinel adds human-in-the-loop approval to any Python function your agent calls. Wrap the function with @oversight, and the SDK pauses execution, requests approval, and only runs once a human approves.

Install

pip install sentinel-oversight

Quick start

from sentinel import configure, oversight

configure(api_key="sk_live_...")

@oversight(
    risk_level="high",
    approvers=["sms:+15551234567"],
    timeout_seconds=300,
)
def transfer_funds(amount: int, recipient: str):
    return stripe.transfers.create(amount=amount, destination=recipient)

When your agent calls transfer_funds(1000, "acct_xyz"), Sentinel pauses execution, texts an approval request, and only runs the function once a human approves it. If rejected, ApprovalRejected is raised. If no response within timeout_seconds, ApprovalTimeout is raised (unless fallback="execute").

Configuration

Set via configure(...) or env vars:

  • SENTINEL_API_URL (default https://api.pauseapi.app)
  • SENTINEL_API_KEY
  • SENTINEL_TIMEOUT (default 300)
  • SENTINEL_FALLBACK (default reject)

LangChain

from sentinel.adapters.langchain import SentinelCallbackHandler

agent.run("...", callbacks=[SentinelCallbackHandler(risk_level="high")])

Install with pip install sentinel-oversight[langchain].

Links

License

MIT

Project details


Download files

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

Source Distribution

sentinel_oversight-0.1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

sentinel_oversight-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file sentinel_oversight-0.1.1.tar.gz.

File metadata

  • Download URL: sentinel_oversight-0.1.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sentinel_oversight-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3d867d900e3bb728ca9d080c1c3b08360b8a154b5bdbfcbc365030a9de1d4bda
MD5 ad85a5aba6d63804f8b18aa66bb41104
BLAKE2b-256 a72cd6f2db340d59fdfedabe9fa751aa061d1e6e870f984654088b0334fe0d88

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinel_oversight-0.1.1.tar.gz:

Publisher: publish.yml on PetrefiedThunder/sentinel-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sentinel_oversight-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sentinel_oversight-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 debdf92a2afe858a078ce8d7aa97a6d1283160b3f9f1aa3202710b7ab975a9c1
MD5 e786e17bd2fbaad8bb20747427575560
BLAKE2b-256 00ba083be0b8c6f5a94f97f279fa00620a6262195a9ddda51514a8853722a650

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinel_oversight-0.1.1-py3-none-any.whl:

Publisher: publish.yml on PetrefiedThunder/sentinel-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page