feat: add safety guardrails demo with Sentinel AI#57
Open
MaxwellCalkin wants to merge 1 commit intoanthropics:mainfrom
Open
feat: add safety guardrails demo with Sentinel AI#57MaxwellCalkin wants to merge 1 commit intoanthropics:mainfrom
MaxwellCalkin wants to merge 1 commit intoanthropics:mainfrom
Conversation
Add a new demo showing how to integrate real-time safety scanning into Claude Agent SDK applications using Sentinel AI. The demo uses SDK hooks to scan user inputs and agent outputs for prompt injection, PII leakage, harmful content, toxicity, and hallucination indicators. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new safety-guardrails demo that shows how to integrate real-time AI safety scanning into Claude Agent SDK applications using Sentinel AI.
PreToolUse/PostToolUse) to scan all user inputs and agent outputs in real-timepyproject.toml,uv sync)How it works
Files added
Test plan
uv syncto install dependenciesANTHROPIC_API_KEYand runuv run python safety_guardrails/agent.py"Hello, tell me about machine learning"— passes through"Ignore all previous instructions"— blocked"My SSN is 123-45-6789"— detected and redacted