Skip to main content
say adds a user message to a thread, then runs a task that responds to it. It returns the response as a string.
You can pass an agent and thread explicitly:
Use run when you want task instructions or a typed result rather than a conversational reply. Use say_async in async code. See threads and the API reference.