Skip to main content
Send additional messages to a running agent mid-execution to provide corrections, updates, or additional context:
examples/01_standalone_sdk/18_send_message_while_processing.py
Running the Example

Sending Messages During Execution

As shown in the example above, use threading to send messages while the agent is running:
The key steps are:
  1. Start conversation.run() in a background thread
  2. Send additional messages using conversation.send_message() while the agent is processing
  3. Use thread.join() to wait for completion
The agent receives and incorporates the new message mid-execution, allowing for real-time corrections and dynamic guidance.

Next Steps