Checks
Strands Version
1.20.0
Python Version
3.13
Operating System
macos
Installation Method
pip
Steps to Reproduce
Create a Bedrock model, enabling computer use functionality;
sonnet_4 = BedrockModel(
model_id="us.anthropic.claude-sonnet-4-20250514-v1:0",
region_name=os.environ.get("AWS_REGION"),
temperature=0.0,
max_tokens=10000,
additional_request_fields={
"tools": [
{
"type": "computer_20250124",
"name": "computer",
"display_width_px": 1024,
"display_height_px": 768,
"display_number": 1,
},
],
"anthropic_beta": ["computer-use-2025-01-24"],
},
)
Create the agent;
agent = Agent(
name="computer_use_agent",
model=sonnet_4,
system_prompt="you are an agent with computer use tools to help the user navigate their desktop",
session_manager=session_manager,
)
Then invoke the agent with something like "help me open Google Chrome"
Output when the agent tries to invoke a tool called computer with {"action": "screenshot"}:
tool_name=<computer>, available_tools=<[]> | tool not found in registry
I also tried adding a custom tool to combat this, like:
@tool(context=True)
def computer(tool_context: ToolContext, **kwargs):
"""
Execute a computer command on the user's machine.
:param tool_context:
:param command: The command to execute
:return:
"""
pass
But, understandably, receive this error:
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the ConverseStream operation: The model returned the following errors: tools: Tool names must be unique.
└ Bedrock region: us-east-1
└ Model id: us.anthropic.claude-sonnet-4-20250514-v1:0
Expected Behavior
The built-in computer tool should be useable!
Actual Behavior
It's not
Additional Context
No response
Possible Solution
No response
Related Issues
No response
Checks
Strands Version
1.20.0
Python Version
3.13
Operating System
macos
Installation Method
pip
Steps to Reproduce
Create a Bedrock model, enabling computer use functionality;
Create the agent;
Then invoke the agent with something like "help me open Google Chrome"
Output when the agent tries to invoke a tool called
computerwith{"action": "screenshot"}:I also tried adding a custom tool to combat this, like:
But, understandably, receive this error:
Expected Behavior
The built-in computer tool should be useable!
Actual Behavior
It's not
Additional Context
No response
Possible Solution
No response
Related Issues
No response