Skip to content

Commit e8a951f

Browse files
committed
fix: Instruct agent to retry tool failures
1 parent d476fcb commit e8a951f

3 files changed

Lines changed: 2 additions & 43 deletions

File tree

e2e_tests/python/fail_on_tool_error.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

e2e_tests/python/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
create_lambda_function_url_client,
1313
create_automated_oauth_client,
1414
)
15-
from fail_on_tool_error import FailOnToolError
1615

1716
# Configure logging
1817
logging.basicConfig(
@@ -83,8 +82,7 @@ def main() -> None:
8382
agent = Agent(
8483
model=bedrock_model,
8584
tools=mcp_clients,
86-
system_prompt="You are a helpful assistant.",
87-
hooks=[FailOnToolError()],
85+
system_prompt="You are a helpful assistant. Always retry on tool errors, to recover from transient failures.",
8886
)
8987

9088
# Run test utterances

e2e_tests/servers_config.integ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"stdioServers": {
33
"fetch": {
44
"command": "uvx",
5-
"args": ["mcp-server-fetch"]
5+
"args": ["--quiet", "mcp-server-fetch"]
66
}
77
},
88
"lambdaFunctionServers": {

0 commit comments

Comments
 (0)