Prompt send_message to fire incrementally instead of buffering

This commit is contained in:
daniel
2026-05-07 14:54:21 -05:00
parent 0951d2be31
commit b69fdd479a

View File

@@ -66,7 +66,13 @@ app = BedrockAgentCoreApp()
@tool @tool
def send_message(text: str) -> str: def send_message(text: str) -> str:
"""Send a message to the user through their channel (Telegram, Slack, etc.)""" """Send a message to the user through their channel (Telegram, Slack, etc.).
Use this proactively throughout your response — don't wait until fully done.
Send the direct answer first, then elaboration if needed, then any caveats.
Each call appears to the user immediately. Prefer 2-4 focused messages over
one long wall of text.
"""
return messaging.send(text) return messaging.send(text)