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.1.tar.gz (23.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.1-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sentinel_llm-0.1.1.tar.gz
  • Upload date:
  • Size: 23.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.1.tar.gz
Algorithm Hash digest
SHA256 0940fa1705b96574405619291e7114cc1d422a688f75b9fc771333a739a7af1a
MD5 1b6366bf43e7378baefd41e259388072
BLAKE2b-256 4e0a658b047828f7b71e8292b93b21b38dbee6faf51f3b95caba361ea632320e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinel_llm-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: sentinel_llm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6041937bd7db89b660ced184d321efef479b3e5c7637c0c9d390cd463dc80849
MD5 1d48957f78f8749544f85c1a6bb1fc8c
BLAKE2b-256 03d5f9849e56cff549282356f7edb2b24dced55e6d45a0971ffb6fb7fcdd3d28

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinel_llm-0.1.1-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