Skip to content

Commit 66be921

Browse files
committed
parent 44f5d23
author James Brubaker <[email protected]> 1750079629 -0400 committer James Brubaker <[email protected]> 1752586952 -0400 * test(memory): add an end-to-end integration test * test: refactor code to be more readable --------- Co-authored-by: Jack Yuan <[email protected]> fix(generate_image): updating generate_image tool to support additional models in Amazon Bedrock (strands-agents#89) * switching region to us-east-1 as sdxl model is no longer available in us-west-2 * fix(image-gen): add support for Amazon Nova Canvas Fix image generation functionality by adding support for Amazon Nova Canvas model in addition to existing Stable Diffusion models. This enhancement allows users to generate images using both model types with appropriate parameters. * fix(gen_image): region selection and number of images parmaters * fix: updating toolspec to include region id and remove number of images parameter (defaulting the tool to generate one image always * fix(generate_image): update the tool to initial state where it only support stable diffusion models * Update src/strands_tools/generate_image.py Co-authored-by: Mackenzie Zastrow <[email protected]> * fix(generate_image): removing conditional for model specific * Update src/strands_tools/generate_image.py Add end to end test for read, write, edit tools (strands-agents#100) * test(read_write_edit): add end to end tests for these tools --------- Co-authored-by: Jack Yuan <[email protected]> test(generate_read_image): add end to end tests for image tools (strands-agents#107) Co-authored-by: Jack Yuan <[email protected]> feat: migrate editor tool from TOOL_SPEC to @tool decorator (strands-agents#111) Adding use_computer tool fix: Updating readme with fix for use_browser tool fix: replace colorama with rich's native styling in use_aws tool (strands-agents#118) * fix: replace colorama with rich's native styling in use_aws tool - Replace colorama Fore/Style with rich Table for better UI rendering - Add structured table layout for AWS operation details - Improve visual consistency with other rich-based tools - Remove colorama dependency from use_aws module - Fixes strands-agents#35: use_aws tool rich UI rendering issues * chore: remove colorama dependency from pyproject.toml - No longer needed after replacing colorama with Rich native styling - Fixes Rich panel border rendering issues when mixing ANSI sequences - Part of use-aws Rich UI rendering improvements --------- Co-authored-by: Strands Agent <[email protected]> Add stability tool (strands-agents#101) Adds a tool that will create images using the Stability AI Platform + related documentation feat: updating README.md with information about use_computer test(http_request): add integration test for http_request tool (strands-agents#113) * test(http_request): add integration test for http_request tool * test(http_request): use self host server to handle the tests, fix mem0 unit test fail when user has faiss installed --------- Co-authored-by: Jack Yuan <[email protected]> fix: Fixing optional dependencies for use_browser tool (strands-agents#119) * fix: Fixing optional dependencies for use_browser tool * fix: Fixing optional dependencies for use_browser tool * fix: Updating readme with fix for use_browser tool fix: fixing dependencies and merging with main branch feat(a2a): native client tool (strands-agents#108) Co-authored-by: jer <[email protected]> refactor(a2a): rename dependency target and update docs (strands-agents#125) Co-authored-by: jer <[email protected]> adding code to delete screenshots taken by use_computer adding pytesseract dependency as optional
1 parent 3566b0f commit 66be921

File tree

4 files changed

+1881
-2
lines changed

4 files changed

+1881
-2
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Below is a comprehensive table of all available tools, how to use them with an a
121121
| slack | `agent.tool.slack(action="post_message", channel="general", text="Hello team!")` | Interact with Slack workspace for messaging and monitoring |
122122
| speak | `agent.tool.speak(text="Operation completed successfully", style="green", mode="polly")` | Output status messages with rich formatting and optional text-to-speech |
123123
| stop | `agent.tool.stop(message="Process terminated by user request")` | Gracefully terminate agent execution with custom message |
124+
| handoff_to_user | `agent.tool.handoff_to_user(message="Please confirm action", breakout_of_loop=False)` | Hand off control to user for confirmation, input, or complete task handoff |
124125
| use_llm | `agent.tool.use_llm(prompt="Analyze this data", system_prompt="You are a data analyst")` | Create nested AI loops with customized system prompts for specialized tasks |
125126
| workflow | `agent.tool.workflow(action="create", name="data_pipeline", steps=[{"tool": "file_read"}, {"tool": "python_repl"}])` | Define, execute, and manage multi-step automated workflows |
126127
| batch| `agent.tool.batch(invocations=[{"name": "current_time", "arguments": {"timezone": "Europe/London"}}, {"name": "stop", "arguments": {}}])` | Call multiple other tools in parallel. |
@@ -186,6 +187,13 @@ response = agent.tool.http_request(
186187
auth_type="Bearer",
187188
auth_token="your_token_here"
188189
)
190+
191+
# Convert HTML webpages to markdown for better readability
192+
response = agent.tool.http_request(
193+
method="GET",
194+
url="https://example.com/article",
195+
convert_to_markdown=True
196+
)
189197
```
190198

191199
### Python Code Execution
@@ -331,6 +339,27 @@ result = agent.tool.use_browser(actions=[
331339
])
332340
```
333341

342+
### Handoff to User
343+
344+
```python
345+
from strands import Agent
346+
from strands_tools import handoff_to_user
347+
348+
agent = Agent(tools=[handoff_to_user])
349+
350+
# Request user confirmation and continue
351+
response = agent.tool.handoff_to_user(
352+
message="I need your approval to proceed with deleting these files. Type 'yes' to confirm.",
353+
breakout_of_loop=False
354+
)
355+
356+
# Complete handoff to user (stops agent execution)
357+
agent.tool.handoff_to_user(
358+
message="Task completed. Please review the results and take any necessary follow-up actions.",
359+
breakout_of_loop=True
360+
)
361+
```
362+
334363
### A2A Client
335364

336365
```python
@@ -527,4 +556,4 @@ See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more inform
527556

528557
Strands Agents is currently in public preview. During this period:
529558
- APIs may change as we refine the SDK
530-
- We welcome feedback and contributions
559+
- We welcome feedback and contributions

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ dependencies = [
3535
"tenacity>=9.1.2,<10.0.0",
3636
"watchdog>=6.0.0,<7.0.0",
3737
"slack_bolt>=1.23.0,<2.0.0",
38+
"markdownify>=1.0.0,<2.0.0",
39+
"readabilipy>=0.2.0,<1.0.0",
3840
# Note: Always want the latest tzdata
3941
"tzdata ; platform_system == 'Windows'",
4042
]
@@ -185,4 +187,4 @@ name = "cz_conventional_commits"
185187
tag_format = "v$version"
186188
bump_message = "chore(release): bump version $current_version -> $new_version"
187189
version_files = ["pyproject.toml:version"]
188-
update_changelog_on_bump = true
190+
update_changelog_on_bump = true

0 commit comments

Comments
 (0)