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.9.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.9-py3-none-any.whl (78.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sentinos-0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 85c97c1df83573ab34b5cf1c6fc83ca2b1610cd3bcad2977f004d6cf82c4337e
MD5 14e7484db20dfbe44ab42478fbe7bb30
BLAKE2b-256 b7f28e2bff4f0119d8672ff268b44735b243891296e5fadca6d80b00f81fa5da

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinos-0.1.9.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.9-py3-none-any.whl.

File metadata

  • Download URL: sentinos-0.1.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 31caeea842bba167e25230cfe726b846a955be610ff00c66a3e6d8f67670e0bb
MD5 90821be34a8d8dddbadc152810b22d4c
BLAKE2b-256 103cba1cc575a3e85539f76312b765d8579824feb22bec5d35d3c2c5147c6887

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinos-0.1.9-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