Skip to main content

Drop-in observability and trust layer for AI pipelines and agents.

Project description

sentinel-llm

Drop-in observability and trust layer for AI pipelines and agents. Part of Sentinel. Installs as sentinel-llm, imports as sentinel.

The SDK has zero runtime dependencies (standard library only) so it's safe to import into any process. It intercepts LLM calls, tool calls, and retrieval steps and ships them - batched, PII-redacted, on a background thread - to a Sentinel collector.

Install

pip install sentinel-llm
# optional provider extras
pip install "sentinel-llm[openai]"      # or [anthropic], [otel]

Use

import sentinel
from openai import OpenAI

sentinel.init(service_name="my-agent")     # defaults to http://localhost:8000
client = sentinel.wrap(OpenAI())           # the only change to your code

client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)

Instrument your own code:

@sentinel.trace(kind="tool")
def search(query: str) -> list[str]:
    ...

with sentinel.span("agent-run", kind="agent"):
    search("vector databases")             # nested under the agent span

Works with sync and async clients, streaming responses, and Anthropic (sentinel.wrap(Anthropic())). For other frameworks, use @sentinel.trace / sentinel.span() directly.

Configuration

All settings have env-var equivalents (SENTINEL_*); see the configuration guide.

Option Default Purpose
endpoint http://localhost:8000 collector URL
service_name default logical service name
capture_content true record prompt/response payloads
redact_pii true redact PII before export
sample_rate 1.0 head-based sampling
enabled true set false to make the SDK a no-op

License

Apache 2.0.

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

sentinel_llm-0.1.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

sentinel_llm-0.1.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file sentinel_llm-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for sentinel_llm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 37fcd63d29d4410ebfc1809c4dd4e01bf007e1260c39266ed8c6c1a6dd18f398
MD5 c80f27f976971f27b2a36aba586d38fb
BLAKE2b-256 5b845bd13ac8d52aaaf3b4c3cdf06272fc5e00f3f808a2684b30169ba329506f

See more details on using hashes here.

Provenance

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

Publisher: release.yml on SumanD18/sentinel

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

File details

Details for the file sentinel_llm-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for sentinel_llm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07c120764a6418f245afc4797d895b28ce4c9964e1bbc702daac6e249cae51b1
MD5 31eb12c9764ce35a51d948a88fbcf75b
BLAKE2b-256 c661f7bb32dcd6bb02c86f518d973c40913e6e9de60449ee94116a2b650b0a19

See more details on using hashes here.

Provenance

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

Publisher: release.yml on SumanD18/sentinel

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