Skip to content

Commit 1212e8c

Browse files
deeheberkiro-agent
andauthored
Add http_request web search tool to agent (#18)
* Add http_request web search tool to agent Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com> * Fix E501 linting error in agentcore_app.py Split long logging statement to comply with 100-character line limit --------- Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
1 parent 1e3d69e commit 1212e8c

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.kiro/steering/product.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This is a template repository for deploying Strands-based AI agents to AWS Bedro
1414
- CDK infrastructure specifically designed for AWS Bedrock AgentCore Runtime deployment
1515
- Single agent implementation (`agentcore_app.py`) that runs locally and deploys to AgentCore
1616
- Uses `@aws-cdk/aws-bedrock-agentcore-alpha` constructs for AgentCore integration
17-
- Currently implements multiple tools including calculator, current_time (community), and letter_counter (custom)
17+
- Currently implements multiple tools including calculator, current_time, http_request (community), and letter_counter (custom)
1818
- Full CI/CD pipeline with GitHub Actions for both Python and TypeScript components
1919
- Enhanced observability with OpenTelemetry integration for distributed tracing
2020

.kiro/steering/python-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fileMatchPattern: "agent/**"
1818

1919
## Patterns
2020

21-
**Agent**: `Agent(tools=[calculator, current_time, custom_tool])`
21+
**Agent**: `Agent(tools=[calculator, current_time, http_request, custom_tool])`
2222
**Tool**: `@tool` decorator with Google docstrings (Args, Returns, Raises)
2323
**Error**: Return `{"status": "success/error", "response/error": "..."}` pattern
2424

agent/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Strands Agent
22

3-
Python 3.13 agent with calculator, time, and letter counter tools.
3+
Python 3.13 agent with calculator, time, web search, and letter counter tools.
44

55
## Quick Start
66

@@ -16,7 +16,7 @@ python src/agentcore_app.py
1616
```python
1717
from strands_tools import http_request, file_read, browser
1818
def get_agent() -> Agent:
19-
return Agent(tools=[calculator, current_time, http_request])
19+
return Agent(tools=[calculator, current_time, http_request, browser])
2020
```
2121

2222
**Custom Tools:**

agent/src/agentcore_app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from bedrock_agentcore.runtime import BedrockAgentCoreApp
88
from strands import Agent
9-
from strands_tools import calculator, current_time # type: ignore[import-untyped]
9+
from strands_tools import calculator, current_time, http_request # type: ignore[import-untyped]
1010

1111
from tools import letter_counter
1212

@@ -25,7 +25,7 @@
2525

2626
def get_agent() -> Agent:
2727
"""Create and return a Strands agent with configured tools."""
28-
return Agent(tools=[calculator, current_time, letter_counter])
28+
return Agent(tools=[calculator, current_time, http_request, letter_counter])
2929

3030

3131
@app.entrypoint
@@ -39,7 +39,8 @@ async def invoke(payload: dict[str, Any] | None = None) -> dict[str, Any]:
3939

4040
agent = get_agent()
4141
logging.info(
42-
"Agent created successfully with tools: calculator, current_time, letter_counter"
42+
"Agent created successfully with tools: "
43+
"calculator, current_time, http_request, letter_counter"
4344
)
4445

4546
logging.info("Starting agent execution...")

0 commit comments

Comments
 (0)