Skip to content

Commit 95d315f

Browse files
committed
pass tool messages to the agent
1 parent 2c90377 commit 95d315f

File tree

1 file changed

+1
-1
lines changed
  • integrations/aws-strands/python/src/ag_ui_strands

1 file changed

+1
-1
lines changed

integrations/aws-strands/python/src/ag_ui_strands/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async def run(self, input_data: RunAgentInput) -> AsyncIterator[Any]:
9797
user_message = "Hello"
9898
if input_data.messages:
9999
for msg in reversed(input_data.messages):
100-
if msg.role == "user" and msg.content:
100+
if (msg.role == "user" or msg.role == "tool") and msg.content:
101101
user_message = msg.content
102102
break
103103

0 commit comments

Comments
 (0)