Skip to main content

Sentinos Python SDK (control-plane client + runtime governance adapters)

Project description

sentinos (Python SDK)

Sentinos Python SDK

High-level Python SDK for Sentinos. Use it to connect agent workloads to governed execution, policy-backed decisions, trace forensics, and Chronos context with one environment-driven client.

If you want the lower-level generated API client instead, install sentinos-sdk-core. Most users should start with sentinos.

Install

pip install sentinos

Optional extras:

pip install "sentinos[providers]"  # OpenAI, Anthropic, and Bedrock helpers
pip install "sentinos[otel]"       # OpenTelemetry helpers
pip install "sentinos[langchain]"  # LangChain adapters
pip install "sentinos[grpc]"       # Native gRPC example support

Start here

Set the standard environment variables once:

export SENTINOS_BASE_URL="https://api.sentinos.ai"
export SENTINOS_ORG_ID="<org-id>"
export SENTINOS_ACCESS_TOKEN="<access-token>"

Then create the client and make a governed call:

from sentinos import SentinosClient

client = SentinosClient.from_env()
trace = client.kernel.execute(
    agent_id="assistant-1",
    session_id="sess-1",
    intent={"type": "tool_call", "tool": "example.tool", "args": {"x": 1}},
)

print(trace.decision, trace.trace_id)

If you host services separately, override SENTINOS_KERNEL_URL, SENTINOS_ARBITER_URL, or SENTINOS_CHRONOS_URL instead of switching constructors.

Common workflows

  • Govern direct provider calls with LLMGuard
  • Replay and export trace evidence for audits
  • Simulate Arbiter policy changes before rollout
  • Pull Chronos snapshots for context-aware investigation

LLMGuard example

from sentinos import LLMGuard, SentinosClient

client = SentinosClient.from_env()
guard = LLMGuard(kernel=client.kernel, agent_id="assistant-1", session_id="sess-42")

result = guard.run(
    provider="openai",
    operation="chat.completions",
    model="gpt-4o-mini",
    request={"messages": [{"role": "user", "content": "Summarize the incident."}]},
    invoke=lambda: {"id": "resp-1", "model": "gpt-4o-mini"},
)

print(result.trace.trace_id, result.trace.decision)

Trace replay example

from sentinos import SentinosClient

client = SentinosClient.from_env()
replay = client.traces.replay_trace(
    "11111111-1111-1111-1111-111111111111",
    request={"include_explain": True},
)

print(replay.decision, replay.fidelity)

Enterprise auth

Workforce token exchange is available when you need employee-scoped access:

from sentinos import SentinosClient, WorkforceAssertion, WorkforceTokenProvider
from sentinos.auth.jwt import JWTAuth

workforce_provider = WorkforceTokenProvider.from_env(
    assertion_provider=lambda: WorkforceAssertion(
        external_subject="employee-123",
        email="employee@enterprise.example",
        groups=["ai-users"],
    )
)

client = SentinosClient.from_env(auth=JWTAuth(workforce_provider))

Docs & examples

Included example files:

  • examples/quickstart.py
  • examples/auth_api_key.py
  • examples/protocols/grpc_execute_smoke.py
  • docs/cookbooks/quickstart.md
  • docs/cookbooks/chronos_snapshots.md
  • docs/cookbooks/policy_simulation.md

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

sentinos-0.1.10.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

sentinos-0.1.10-py3-none-any.whl (78.3 kB view details)

Uploaded Python 3

File details

Details for the file sentinos-0.1.10.tar.gz.

File metadata

  • Download URL: sentinos-0.1.10.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sentinos-0.1.10.tar.gz
Algorithm Hash digest
SHA256 3f177d1d1a89e71a74665098a0f3c83a2959c8355ff115a9f8f58eb63a23ac4f
MD5 d2dae5d47efe532fbc94cbacc410ca0a
BLAKE2b-256 29f7257fb1dd9fadf052bf442178ecceb81794cb66193a311b587221cd1495f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinos-0.1.10.tar.gz:

Publisher: publish.yml on SentinosHQ/sentinos-python

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

File details

Details for the file sentinos-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: sentinos-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 78.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sentinos-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 cbf931d326673038b914f3f52456cb59fee75f8af54ce19013ecaad3b4131d53
MD5 acd0ac33da03e526c0120cc45b778b11
BLAKE2b-256 053ed0e1c47a0eb6c74ad2f8f9da168ed98dc36976bbfaf5b6f2774c932c386e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinos-0.1.10-py3-none-any.whl:

Publisher: publish.yml on SentinosHQ/sentinos-python

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