feat(redteam): add built-in red teaming support#184
Open
kevmyung wants to merge 8 commits intostrands-agents:mainfrom
Open
feat(redteam): add built-in red teaming support#184kevmyung wants to merge 8 commits intostrands-agents:mainfrom
kevmyung wants to merge 8 commits intostrands-agents:mainfrom
Conversation
…exit condition tuning
…pport - AttackStrategy ABC, RiskCategory, AttackGoal shared types - red_team() entry point with Agent auto-extraction and tool trace capture - AttackSuccessEvaluator with continuous 0.0-1.0 scoring - Strategy cross-product expansion and custom case injection - RedTeamReport with grouped views
8d7d3f5 to
c9f5845
Compare
poshinchen
reviewed
May 1, 2026
Contributor
poshinchen
left a comment
There was a problem hiding this comment.
Could you use built-in python | / list instead of typing's deprecated Union, List and so on?
Author
Quick heads-up – fixed it in 438f9e0 |
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.
Description
Adds built-in red teaming capabilities to strands-evals, enabling automated adversarial testing of AI agents.
Core components:
jailbreak,prompt_extraction,harmful_content): Pre-built actor profiles, goals, seed inputs, and per-preset evaluation metricsgradual_escalation— an adaptive multi-turn strategy that analyzes target responses and pivots techniques dynamicallyRedTeamJudgeEvaluator: Composite safety evaluator with 3 metrics (guardrail_breach,harmfulness,prompt_leakage). Dynamically builds judge prompts based on only the metrics relevant to each attack patternrun_red_team()entry point: End-to-end orchestration — case generation, multi-turn attack simulation viaActorSimulator, and safety evaluation in a single calltarget_infoparameter for LLM-generated attack goals tailored to the specific target systemRelated Issues
Closes #177
Type of Change
New feature
Testing
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.