File tree Expand file tree Collapse file tree 4 files changed +51
-6
lines changed
lib/idp_common_pkg/idp_common/agents Expand file tree Collapse file tree 4 files changed +51
-6
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ idp_common/agents/
3939│ ├── __init__.py
4040│ ├── agent.py # External MCP agent factory
4141│ └── config.py # MCP-specific configuration
42- ├── dummy / # Dummy agent for development/testing
42+ ├── sample_calculator / # Sample calculator agent for development/testing
4343│ ├── __init__.py
4444│ └── agent.py # Simple calculator agent
4545├── factory/ # Agent factory and registry
Original file line number Diff line number Diff line change 2121
2222from ..analytics .agent import create_analytics_agent
2323
24- # from ..dummy .agent import create_dummy_agent # Commented out - kept as reference for developers
24+ # from ..sample_calculator .agent import create_sample_calculator_agent # Commented out - kept as reference for developers
2525from .agent_factory import IDPAgentFactory
2626
2727logger = logging .getLogger (__name__ )
4949 ],
5050)
5151
52- # Register dummy agent - COMMENTED OUT for production use
52+ # Register sample_calculator agent - COMMENTED OUT for production use
5353# Kept as reference pattern for developers
5454# agent_factory.register_agent(
55- # agent_id="dummy -dev-v1",
56- # agent_name="Dummy Agent",
55+ # agent_id="sample-calculator -dev-v1",
56+ # agent_name="Sample Calculator Agent",
5757# agent_description="Simple development agent with calculator tool",
58- # creator_func=create_dummy_agent ,
58+ # creator_func=create_sample_calculator_agent ,
5959# sample_queries=[
6060# "Calculate 25 * 4 + 10",
6161# "What is the square root of 144?",
Original file line number Diff line number Diff line change 1+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+ # SPDX-License-Identifier: MIT-0
3+
4+ """Sample calculator agent for development purposes."""
5+
6+ from .agent import create_sample_calculator_agent
7+
8+ __all__ = ["create_sample_calculator_agent" ]
Original file line number Diff line number Diff line change 1+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+ # SPDX-License-Identifier: MIT-0
3+
4+ """Sample Calculator Agent implementation for development purposes."""
5+
6+ import logging
7+
8+ import boto3
9+ import strands
10+ from strands .models import BedrockModel
11+ from strands_tools import calculator
12+
13+ logger = logging .getLogger (__name__ )
14+
15+
16+ def create_sample_calculator_agent (
17+ session : boto3 .Session ,
18+ ** kwargs ,
19+ ) -> strands .Agent :
20+ """
21+ Create a minimal sample calculator agent with calculator tool.
22+
23+ Args:
24+ session: Boto3 session for AWS operations
25+ **kwargs: Additional arguments
26+
27+ Returns:
28+ strands.Agent: Configured Strands agent instance
29+ """
30+ # Use hardcoded model ID
31+ model_id = "us.anthropic.claude-3-7-sonnet-20250219-v1:0"
32+
33+ # Create Bedrock model
34+ model = BedrockModel (model_id = model_id , session = session )
35+
36+ # Create and return agent with calculator tool
37+ return strands .Agent (model = model , tools = [calculator ])
You can’t perform that action at this time.
0 commit comments