Skip to content

Conversation

erezweinstein5
Copy link
Contributor

@erezweinstein5 erezweinstein5 commented Aug 27, 2025

Amazon Bedrock AgentCore Samples Pull Request

Important

  1. We strictly follow a issue-first approach, please first open an issue relating to this Pull Request.
  2. Once this Pull Request is ready for review please attach review ready label to it. Only PRs with review ready will be reviewed.

Issue number:
#303

Concise description of the PR

- Built financial intelligence agent using AgentCore with LangGraph, Claude Sonnet 4, and multi-strategy memory for personalized market analysis
- Real-time market tools - live stock data, multi-source news aggregation and browser automation for dynamic content

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • Add your name to CONTRIBUTORS.md
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you uploading a dataset?
  • Have you documented Introduction, Architecture Diagram, Prerequisites, Usage, Sample Prompts, and Clean Up steps in your example README?
  • I agree to resolve any issues created for this example in the future.
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

- Implements Strands-based agent for real-time stock data and business news
- Uses Bedrock AgentCore browser_client for web scraping
- Includes tools for Yahoo Finance stock data and Bloomberg news search
- Features professional market analysis with AI-powered insights
- Supports concurrent browser sessions for multiple stock comparisons
- Complete with tests, documentation, and clean requirements
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added 01-tutorials 01-tutorials 01-AgentCore-runtime 01-tutorials/01-AgentCore-runtime 02-AgentCore-gateway 01-tutorials/02-AgentCore-gateway 05-AgentCore-tools 01-tutorials/05-AgentCore-tools 06-AgentCore-observability 01-tutorials/06-AgentCore-observability 02-use-cases 02-use-cases and removed 01-tutorials 01-tutorials 01-AgentCore-runtime 01-tutorials/01-AgentCore-runtime 02-AgentCore-gateway 01-tutorials/02-AgentCore-gateway 05-AgentCore-tools 01-tutorials/05-AgentCore-tools 06-AgentCore-observability 01-tutorials/06-AgentCore-observability labels Aug 27, 2025
- Implement conversational broker card system with memory integration
- Add browser automation for real-time market data and news
- Create LangGraph-based agent architecture with tool orchestration
- Include deployment scripts and comprehensive documentation
- Add test scripts demonstrating broker profile workflow
- Configure Docker containerization for AgentCore Runtime
@erezweinstein5 erezweinstein5 force-pushed the feature/market-trends-agent branch from 61b0c6d to 519586f Compare August 27, 2025 15:52
erezweinstein5 and others added 5 commits August 27, 2025 18:53
- Fix memory creation to check existing memory first, eliminating ValidationException errors
- Extract memory tools into separate module for better organization
- Update deployment script with enhanced error handling and IAM permissions
- Add architecture documentation and diagrams
- Successfully deployed to burner account with Claude Sonnet 4 and multi-strategy memory
…dynamic config

- Remove auto_update_on_conflict parameter from runtime.launch() call
- Allow .bedrock_agentcore.yaml to be generated dynamically by deploy script
- Successfully deployed to burner account (484363822803) with Claude Sonnet 4
- All tests passing: 4/4 (100% success rate)
- Agent fully functional with memory, market data, and news search capabilities
Erez Weinstein added 2 commits September 2, 2025 17:44
- Remove unused imports: tool, MemoryClient, ClientError, argparse, json, os, datetime, Any, re
- Fix f-strings without placeholders by converting to regular strings
- Remove unused variables: config_response, launch_result
- Clean up code to pass GitHub checks and improve maintainability

Fixes:
- deploy.py: 4 issues (f-strings + unused variables)
- market_trends_agent.py: 6 unused imports
- test_broker_card.py: 2 issues (unused import + f-string)
- tools/broker_card_tools.py: 2 unused imports
- tools/memory_tools.py: 3 issues (unused import + 2 f-strings)
	modified:   02-use-cases/market-trends-agent/.gitignore
	modified:   02-use-cases/market-trends-agent/tools/memory_tools.py
Erez Weinstein added 2 commits September 2, 2025 19:01
The datetime import was accidentally removed but is still needed on line 27 for creating session IDs in the format 'market-{datetime.now().strftime('%Y%m%d%H%M%S')}'.
- Remove Dockerfile from version control
- Add Dockerfile to .gitignore
- Deployment script will auto-generate Dockerfile with proper defaults
- Reduces repo clutter while maintaining deployment functionality
- Auto-generated Dockerfile will include necessary configurations
Erez Weinstein added 4 commits September 2, 2025 22:51
- Add pyproject.toml with uv configuration
- Update README to use only uv commands
- Fix Reuters and CNBC URL issues with better error handling
- Add interactive chat instructions for users
- Improve browser tool with retry logic and reliable fallbacks"
- Fix broker identity confusion by enforcing identify_broker() workflow
- Improve actor_id consistency across memory operations
- Add enhanced error handling for news sources (Reuters/CNBC 503 errors)
- Add uv integration with pyproject.toml for faster dependency management
- Streamline README to uv-only workflow with interactive chat instructions
- Add reliable fallback news sources (Yahoo Finance, MarketWatch)
- Enhanced system prompt to enforce mandatory broker identification
- Fixed tool_use/tool_result message pairing in filtering logic
- Added comprehensive test suite for broker memory storage
- Verified multi-strategy memory works for Tim Dunk and Maria Rodriguez
- Added SSM Parameter Store for distributed memory ID coordination
- Enhanced race condition protection for deployment scenarios
- Updated IAM permissions to include SSM parameter access
- Prevents multiple memory instances during AgentCore deployment
- Maintains backward compatibility with local .memory_id file
- Created cleanup.py script to remove all deployed AWS resources
- Cleans up AgentCore runtime, memory, ECR, CodeBuild, S3, IAM, SSM
- Added safety features: dry-run mode, confirmation prompts, detailed logging
- Updated README with complete cleanup section and troubleshooting
- Tested cleanup successfully removes all resources except runtime (manual)
- Supports selective cleanup options (--skip-iam, --region, --dry-run)
Copy link

github-actions bot commented Sep 3, 2025

Latest scan for commit: 02e8ae5 | Updated: 2025-09-04 17:25:38 UTC

Security Scan Results

Scan Metadata

  • Project: ASH
  • Scan executed: 2025-09-04T17:25:23+00:00
  • ASH version: 3.0.0

Summary

Scanner Results

The table below shows findings by scanner, with status based on severity thresholds and dependencies:

Column Explanations:

Severity Levels (S/C/H/M/L/I):

  • Suppressed (S): Security findings that have been explicitly suppressed/ignored and don't affect the scanner's pass/fail status
  • Critical (C): The most severe security vulnerabilities requiring immediate remediation (e.g., SQL injection, remote code execution)
  • High (H): Serious security vulnerabilities that should be addressed promptly (e.g., authentication bypasses, privilege escalation)
  • Medium (M): Moderate security risks that should be addressed in normal development cycles (e.g., weak encryption, input validation issues)
  • Low (L): Minor security concerns with limited impact (e.g., information disclosure, weak recommendations)
  • Info (I): Informational findings for awareness with minimal security risk (e.g., code quality suggestions, best practice recommendations)

Other Columns:

  • Time: Duration taken by each scanner to complete its analysis
  • Action: Total number of actionable findings at or above the configured severity threshold that require attention

Scanner Results:

  • PASSED: Scanner found no security issues at or above the configured severity threshold - code is clean for this scanner
  • FAILED: Scanner found security vulnerabilities at or above the threshold that require attention and remediation
  • MISSING: Scanner could not run because required dependencies/tools are not installed or available
  • SKIPPED: Scanner was intentionally disabled or excluded from this scan
  • ERROR: Scanner encountered an execution error and could not complete successfully

Severity Thresholds (Thresh Column):

  • CRITICAL: Only Critical severity findings cause scanner to fail
  • HIGH: High and Critical severity findings cause scanner to fail
  • MEDIUM (MED): Medium, High, and Critical severity findings cause scanner to fail
  • LOW: Low, Medium, High, and Critical severity findings cause scanner to fail
  • ALL: Any finding of any severity level causes scanner to fail

Threshold Source: Values in parentheses indicate where the threshold is configured:

  • (g) = global: Set in the global_settings section of ASH configuration
  • (c) = config: Set in the individual scanner configuration section
  • (s) = scanner: Default threshold built into the scanner itself

Statistics calculation:

  • All statistics are calculated from the final aggregated SARIF report
  • Suppressed findings are counted separately and do not contribute to actionable findings
  • Scanner status is determined by comparing actionable findings to the threshold
Scanner S C H M L I Time Action Result Thresh
bandit 0 0 0 0 6 0 1.0s 0 PASSED MED (g)
cdk-nag 0 0 0 0 0 0 25.0s 0 PASSED MED (g)
cfn-nag 0 0 0 0 0 0 7ms 0 PASSED MED (g)
checkov 0 0 0 0 0 0 4.0s 0 PASSED MED (g)
detect-secrets 0 0 0 0 0 0 990ms 0 PASSED MED (g)
grype 0 0 0 0 0 0 <1ms 0 ERROR MED (g)
npm-audit 0 0 0 0 0 0 180ms 0 PASSED MED (g)
opengrep 0 0 0 0 0 0 <1ms 0 SKIPPED MED (g)
semgrep 0 0 0 0 0 0 12.0s 0 PASSED MED (g)
syft 0 0 0 0 0 0 2.2s 0 PASSED MED (g)

- Remove unused imports (json, time, extract_actor_id)
- Fix f-strings without placeholders in browser_tool.py
- Replace bare except clauses with specific exception handling
- Add proper logging for exception cases
- All files now pass ruff lint checks
@EashanKaushik EashanKaushik merged commit e2d9590 into awslabs:main Sep 4, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02-use-cases 02-use-cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants