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=["slack://channel/agent-approvals"],
    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, posts an approval card to Slack, and only runs the function once a human clicks Approve. 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.oversight.sh)
  • 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.0.tar.gz (6.2 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.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sentinel_oversight-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for sentinel_oversight-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8351516de782832201c459632edb033f867922810900dc031aa51ca32f5cf013
MD5 8cbbf051baef5e768883891e5c7ee3fa
BLAKE2b-256 ec2cdb6693259b93dbcfe9743e1747b9031dd5295f56adf5dc2ab16778dd862a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sentinel_oversight-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ce2f6adac68593b649483ba0e26383cb87a36f805a865d2997f7d6394213711
MD5 8d1f535beb314577143ddabc32947956
BLAKE2b-256 e25eff1bbcec209fe156d83b7d8f96938bc97348d0cfe33d41a65390721b673f

See more details on using hashes here.

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