sentinel-agent-sdk
Non-blocking AI agent event logging for Python. Every agent action fires a tamper-evident audit event to Sentinel — without adding latency to your agents.
Install
pip install sentinel-agent-sdk
Requires Python 3.9+. Zero dependencies (stdlib only).
Quick start
import sentinel
# Initialize once at startup
sentinel.init(api_key="sk_live_...")
# Option 1 — decorator (auto-logs every call)
@sentinel.wrap("payment-agent", "invoke")
def run_agent(prompt: str) -> str:
... # your agent logic
return result
# Option 2 — log events manually
sentinel.log_event(
"payment-agent",
"tool_call",
duration_ms=120,
input_data={"tool": "stripe_charge", "amount": 2999},
output_data={"status": "ok"},
)
Events fire in daemon threads — your agent never waits for Sentinel.
Configuration
| Method | How |
|---|---|
| Direct | sentinel.init(api_key="sk_live_...") |
| Env var | SENTINEL_API_KEY=sk_live_... |
| Custom URL | sentinel.init(api_key=..., api_url="https://...") |
API
sentinel.init(api_key, api_url=None) → SentinelClient
Initialize the default client. Call once at startup.
sentinel.log_event(agent_id, action_type, *, input_data=None, output_data=None, duration_ms=None, framework=None, session_id=None)
Log a single event. Returns immediately (fires in background thread).
sentinel.wrap(agent_id_or_fn, action_type="invoke", *, framework=None)
Wrap a callable to auto-log every invocation. Supports two forms:
# Decorator with explicit IDs
@sentinel.wrap("my-agent", "process")
def my_fn(...): ...
# Direct wrap — agent_id inferred from function name
wrapped = sentinel.wrap(my_fn)
SentinelClient
For multi-tenant apps or multiple API keys:
from sentinel import SentinelClient
client = SentinelClient(api_key="sk_live_...")
client.log_event("agent-a", "invoke")
Field stripping
The following fields are automatically stripped from input_data and output_data before sending to protect sensitive data: prompt, completion, content, messages, text.
License
MIT
Metadata
Release files for sentinel-agent-sdk 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sentinel_agent_sdk-0.1.3.tar.gz | 6.0 kB | Without provenance | Details for sentinel_agent_sdk-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sentinel_agent_sdk-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for sentinel_agent_sdk-0.1.3-py3-none-any.whl |
Total release size: 11.0 kB
Release files / sentinel_agent_sdk-0.1.3.tar.gz
| Download URL | sentinel_agent_sdk-0.1.3.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
904584fed64d2232167a8215a105dfbf6383d492fd636fd137cc086370b895cc
|
|
BLAKE2b-256 checksum How to use checksums |
1f98680d2f396ed7be57aa1e71481c860dae3b78f8323d45fa380c0533eafff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / sentinel_agent_sdk-0.1.3-py3-none-any.whl
| Download URL | sentinel_agent_sdk-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebb285869bb35ce8db99aeb3767d5c73a23f5753d209ab9c758295b2fd26b70f
|
|
BLAKE2b-256 checksum How to use checksums |
a47d8c0e4068a77000c078dd87ef878207b900b5dafc1e6e30c885979396f6dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for sentinel-agent-sdk 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.