Python SDK for Sentinel human-in-the-loop oversight
Project description
Sentinel SDK
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(defaulthttps://api.oversight.sh)SENTINEL_API_KEYSENTINEL_TIMEOUT(default300)SENTINEL_FALLBACK(defaultreject)
LangChain
from sentinel.adapters.langchain import SentinelCallbackHandler
agent.run("...", callbacks=[SentinelCallbackHandler(risk_level="high")])
Install with pip install sentinel-oversight[langchain].
Links
- Website: https://oversight.sh
- API repo: https://github.com/PetrefiedThunder/sentinel-api
- This SDK: https://github.com/PetrefiedThunder/sentinel-sdk
License
MIT
Project details
Release history Release notifications | RSS feed
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8351516de782832201c459632edb033f867922810900dc031aa51ca32f5cf013
|
|
| MD5 |
8cbbf051baef5e768883891e5c7ee3fa
|
|
| BLAKE2b-256 |
ec2cdb6693259b93dbcfe9743e1747b9031dd5295f56adf5dc2ab16778dd862a
|
File details
Details for the file sentinel_oversight-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sentinel_oversight-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ce2f6adac68593b649483ba0e26383cb87a36f805a865d2997f7d6394213711
|
|
| MD5 |
8d1f535beb314577143ddabc32947956
|
|
| BLAKE2b-256 |
e25eff1bbcec209fe156d83b7d8f96938bc97348d0cfe33d41a65390721b673f
|