Skip to main content

SentinelProxy integrations for LangChain and LiteLLM — mirror agent turns for self-healing evaluation.

Project description

sentinelproxy (Python)

Mirror your LangChain or LiteLLM agent turns to SentinelProxy — the self-healing layer for AI agents. The judge catches hallucinations, prompt injections, PII leaks and competitor mentions, then hands you a hardened system prompt.

Install

pip install sentinelproxy            # core + LiteLLM
pip install "sentinelproxy[langchain]"   # + LangChain callback handler

Get a per-project API key from your dashboard → project → Connect tab.

LangChain

from sentinelproxy import SentinelProxyCallbackHandler

handler = SentinelProxyCallbackHandler(
    api_key="sk_sentinel_…",
    system_prompt="You are a support agent for Acme.",
)
llm.invoke(messages, config={"callbacks": [handler]})

LiteLLM

import litellm
from sentinelproxy import sentinel_litellm_callback

litellm.success_callback = [sentinel_litellm_callback("sk_sentinel_…")]

Low-level client

from sentinelproxy import SentinelClient

SentinelClient("sk_sentinel_…").log(
    system_prompt="You are a support agent for Acme.",
    user_input="Where's my order?",
    llm_response="Let me check…",
    latency_ms=820,
)

Logging is best-effort and off your critical path — failures are swallowed so observability never breaks the agent (pass raise_on_error=True to SentinelClient to surface them). PII is scrubbed at the SentinelProxy edge before anything is stored.

Build & publish

python -m build
python -m twine upload dist/*

License

MIT

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

sentinelproxy-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

sentinelproxy-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sentinelproxy-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sentinelproxy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b8e3e3c4d25a6a62ebbb152bdba701070c53b3e477af6897bd3601ef2c090c77
MD5 dd68a6faeb509d17b5fb54127621abf5
BLAKE2b-256 7a635ba387a8bcce37cd2fdc94c814cccb403cbe01d2401816305563398c067a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sentinelproxy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sentinelproxy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cd3cf2d6e97623d8b8194ed6fa996adf2b478ad8653f03a35bcd0686c8283d5
MD5 4b5eb29b8b145038df2836565fe1cd12
BLAKE2b-256 66e809c5b715e8c23a83aa5dc71f19d3620cdf162b4d8969ac200deed6f02b78

See more details on using hashes here.

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