feat(03-integration): alice.io WonderFence guardrails#223
Open
lior-k wants to merge 1 commit intostrands-agents:mainfrom
Open
feat(03-integration): alice.io WonderFence guardrails#223lior-k wants to merge 1 commit intostrands-agents:mainfrom
lior-k wants to merge 1 commit intostrands-agents:mainfrom
Conversation
Adds third-party guardrails example integrating Alice WonderFence with Strands agents for real-time AI safety protection. The integration uses Strands hooks to evaluate prompts, responses, tool inputs, and tool outputs. Features: - Hook-based implementation (BeforeModelCall, AfterModelCall, BeforeTool, AfterTool) - Support for BLOCK, MASK, and ALLOW actions - Multimodal and multilingual detection (20+ languages) - Example demonstrations of prompt injection, hate speech, and PII detection - Customizable policies via WonderFence UI Co-Authored-By: Claude Sonnet 4.5 <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
This PR adds a new third-party guardrails integration example demonstrating how to use Alice WonderFence with Strands agents for real-time AI safety protection.
What's New
on_before_model_call: Evaluates user prompts before reaching the modelon_after_model_call: Evaluates model responses before returning to userson_before_tool_call: Evaluates tool input parameters for safetyon_after_tool_call: Evaluates tool execution resultsFeatures
Example Test Cases
The integration includes demonstrations of:
Files Added
03-integrations/third-party-guardrails/04-alice-wonderfence/README.md- Documentation and setup instructions03-integrations/third-party-guardrails/04-alice-wonderfence/guardrail.py- WonderFence hook implementation03-integrations/third-party-guardrails/04-alice-wonderfence/main.py- Demo application with test cases03-integrations/third-party-guardrails/04-alice-wonderfence/requirements.txt- Python dependencies