Skip to main content

Sentisec public SDK — cognitive integrity monitoring for autonomous agents (thin client).

Project description

sentisec-sdk

Public Python SDK for Sentisec.

sentisec-sdk is a thin client. You install it with pip, point it at your workspace, and wrap your existing OpenAI / Anthropic client. Your agent's tool calls then flow through Sentisec's hosted control plane, where they are evaluated and either allowed, rewritten, or blocked before they reach the world.

Install

pip install sentisec-sdk

Python 3.11+ is required.

Quick start

from sentisec_sdk import Monitor

monitor = Monitor()  # picks up ~/.sentisec/credentials.toml after `sentisec login`
client = monitor.wrap_openai(...)
client = monitor.wrap_anthropic(...)

The sentisec CLI is shipped in the same wheel:

sentisec login
sentisec status
sentisec demo run
sentisec logout

Note (alpha): the public surface is being assembled across a small set of release tasks. Calling Monitor() / Session() in this alpha pre-release raises NotImplementedError pointing at the tracking task — install the 0.1.0 (non-alpha) release for the working client.

From 0.1.0a4 onwards SENTISEC_WORKSPACE_ID is OPTIONAL — the Sentisec proxy resolves the workspace from the API key prefix, so a one-env-var setup (SENTISEC_API_KEY only) is sufficient for the wrap_anthropic / wrap_openai path.

Documentation

Building the standalone CLI

For shipping channels that cannot rely on a working pip on the user's box (curl installer, npm postinstall, GitHub Releases tarball), the sentisec console-script entry is bundled as a single shiv zipapp:

# one-time: install the build-only extra
uv pip install --system shiv          # or: pipx install shiv

# build
./scripts/build-cli.sh                # → dist/sentisec (executable)

# (optional) verify the build is reproducible
VERIFY_DETERMINISM=1 ./scripts/build-cli.sh

The build script:

  • runs shiv --console-script sentisec --output-file dist/sentisec --reproducible --compressed --python "/usr/bin/env python3" .,
  • smoke-tests ./dist/sentisec --version and asserts the output equals sentisec <version-from-pyproject>,
  • when VERIFY_DETERMINISM=1, rebuilds into a tempdir and diffs the two artifacts byte-for-byte (shiv's --reproducible flag pins all zip-entry timestamps to a fixed value).

Platform caveat. The resulting dist/sentisec shebangs to /usr/bin/env python3, but its bundled wheels include the native pydantic-core extension for the builder's (os, arch, python-minor) tuple. The artifact therefore runs on hosts matching that tuple only. The release pipeline (P-INST-02) matrix-builds one artifact per supported tuple and uploads each as a separate GitHub Release asset.

License

Apache License 2.0. See LICENSE.

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

sentisec_sdk-0.1.0a5.tar.gz (109.6 kB view details)

Uploaded Source

Built Distribution

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

sentisec_sdk-0.1.0a5-py3-none-any.whl (127.7 kB view details)

Uploaded Python 3

File details

Details for the file sentisec_sdk-0.1.0a5.tar.gz.

File metadata

  • Download URL: sentisec_sdk-0.1.0a5.tar.gz
  • Upload date:
  • Size: 109.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sentisec_sdk-0.1.0a5.tar.gz
Algorithm Hash digest
SHA256 340c82a57824e3c6e939f8b453bd88d50f364e4f5f7a922dcaa72c0eeab264c2
MD5 17dab8a0099205993c469f75b28d980b
BLAKE2b-256 21744d451f711f2c693adb26e01fc9f037ea5b7a329a37d8415ab2cddb75b1ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentisec_sdk-0.1.0a5.tar.gz:

Publisher: publish-sdk-py.yml on Hamza-Rivon/sentisec

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

File details

Details for the file sentisec_sdk-0.1.0a5-py3-none-any.whl.

File metadata

  • Download URL: sentisec_sdk-0.1.0a5-py3-none-any.whl
  • Upload date:
  • Size: 127.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sentisec_sdk-0.1.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 af1affca71265d0287e1b580e43a656724fa7e468bccb7c18d30cc38e93dbaf0
MD5 18b8b02f49817dc9283fb7118ade40da
BLAKE2b-256 f5fc6b8a424f8c54f43f366ff95ce4235f724285ed9cfd4d45c52524dc20357f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentisec_sdk-0.1.0a5-py3-none-any.whl:

Publisher: publish-sdk-py.yml on Hamza-Rivon/sentisec

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