generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 167
docs: Update Eval SOP guide for strands-agents-sops built-in support #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kangISU
wants to merge
1
commit into
strands-agents:main
Choose a base branch
from
kangISU:eval-sop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,68 +110,66 @@ agent-evaluation-project/ | |
|
|
||
| ### Option 1: MCP Integration (Recommended) | ||
|
|
||
| Set up MCP server for AI assistant integration: | ||
| This guide demonstrates setup using Claude Code. For other AI coding assistants, refer to the [Agent SOP](https://github.com/strands-agents/agent-sop) documentation for platform-specific instructions. | ||
|
|
||
| #### Setup with Claude Code | ||
|
|
||
| **Global-level MCP server configuration:** | ||
|
|
||
| ```bash | ||
| # Download Eval SOP | ||
| mkdir ~/my-sops | ||
| # Copy eval.sop.md to ~/my-sops/ | ||
| # Add Strands Agent SOP MCP server | ||
| claude mcp add -s user strands-agents-sops strands-agents-sops mcp | ||
|
|
||
| # Configure MCP server | ||
| strands-agents-sops mcp --sop-paths ~/my-sops | ||
| # Add context7 for up-to-date Strands Evals SDK documentation and code examples (recommended) | ||
| claude mcp add -s user context7 npx -- -y @upstash/context7-mcp | ||
| ``` | ||
|
|
||
| Add to your AI assistant's MCP configuration: | ||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "Eval": { | ||
| "command": "strands-agents-sops", | ||
| "args": ["mcp", "--sop-paths", "~/my-sops"] | ||
| } | ||
| } | ||
| } | ||
| **Start evaluation session:** | ||
|
|
||
| ```bash | ||
| cd path/to/agent-evaluation-project | ||
| claude | ||
| ``` | ||
|
|
||
| #### Usage with Claude Code | ||
| **In Claude session:** | ||
|
|
||
| ```bash | ||
| cd agent-evaluation-project | ||
| claude | ||
| # Verify MCP servers are connected | ||
| /mcp | ||
|
|
||
| # In Claude session: | ||
| /my-sops:eval (MCP) generate an evaluation plan for this agent at ./your-agent using strands evals sdk at ./evals-main | ||
| # Start evaluation workflow | ||
| /strands-agents-sops:eval (MCP) evaluate this agent at ./your-agent using strands evals sdk | ||
| ``` | ||
|
|
||
| The workflow proceeds through four phases: | ||
|
|
||
| 1. **Planning**: `/Eval generate an evaluation plan` | ||
| 2. **Data Generation**: `yes` (when prompted) or `/Eval generate the test data` | ||
| 3. **Evaluation**: `yes` (when prompted) or `/Eval evaluate the agent using strands evals` | ||
| 4. **Reporting**: `/Eval generate an evaluation report based on /path/to/results.json` | ||
| 1. **Planning**: `yes` (when prompted) or `/strands-agents-sops:eval (MCP) generate an evaluation plan` | ||
| 2. **Data Generation**: `yes` (when prompted) or `/strands-agents-sops:eval (MCP) generate the test data` | ||
| 3. **Evaluation**: `yes` (when prompted) or `/strands-agents-sops:eval (MCP) implement and execute the evaluation code using strands evals` | ||
| 4. **Reporting**: `/strands-agents-sops:eval (MCP) generate an evaluation report based on /path/to/results.json` | ||
|
|
||
| ### Option 2: Direct Strands Agent Integration | ||
|
|
||
| ```python | ||
| from strands import Agent | ||
| from strands_tools import editor, shell | ||
| from strands_agents_sops import eval | ||
|
|
||
| from strands_tools import editor, shell, mcp_client | ||
| from strands_agents_sops import eval | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: have you tested this code? You may want to rename this. |
||
| agent = Agent( | ||
| system_prompt=eval, | ||
| tools=[editor, shell], | ||
| tools=[editor, shell, mcp_client], | ||
| ) | ||
| # Connect to Context7 MCP server for documentation lookup (recommended) | ||
| agent.tool.mcp_client( | ||
| action="connect", connection_id="context7", transport="stdio", command="npx", args=["-y", "@upstash/context7-mcp"] | ||
| ) | ||
|
|
||
| # Initial message to start the evaluation | ||
| agent("Start Eval sop for evaluating my QA agent") | ||
|
|
||
| agent("Use Eval SOP to evaluate this agent at ./your_agent using strands evals sdk") | ||
| # Multi-turn conversation loop | ||
| while True: | ||
| user_input = input("\nYou: ") | ||
| if user_input.lower() in ("exit", "quit", "done"): | ||
| print("Evaluation session ended.") | ||
| break | ||
|
|
||
| agent(user_input) | ||
| ``` | ||
|
|
||
|
|
@@ -188,7 +186,7 @@ os.environ["BYPASS_TOOL_CONSENT"] = "true" | |
| Convert to Claude Skills format: | ||
|
|
||
| ```bash | ||
| strands-agents-sops skills --sop-paths ~/my-sops --output-dir ./skills | ||
| strands-agents-sops skills --output-dir ./skills | ||
| ``` | ||
|
|
||
| Upload the generated `skills/eval/SKILL.md` to Claude.ai or use via Claude API. | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should this be done with kiro cli instead?