Skip to content

Commit 8cf0125

Browse files
committed
Rename dummy agent to sample_calculator agent
- Renamed dummy/ directory to sample_calculator/ - Updated function name from create_dummy_agent to create_sample_calculator_agent - Updated all references in registry.py (commented-out registration) - Updated README.md documentation - Maintained commented-out status for development reference
1 parent 7dc8db7 commit 8cf0125

File tree

4 files changed

+51
-6
lines changed

4 files changed

+51
-6
lines changed

lib/idp_common_pkg/idp_common/agents/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

lib/idp_common_pkg/idp_common/agents/factory/registry.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
from ..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
2525
from .agent_factory import IDPAgentFactory
2626

2727
logger = logging.getLogger(__name__)
@@ -49,13 +49,13 @@
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?",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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"]
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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])

0 commit comments

Comments
 (0)