say
Make the AI agent speak specific text immediately, bypassing the normal LLM response flow. The text is spoken in the agent’s configured voice.
Parameters
text
Text for the agent to speak.
Returns
FunctionResult — self, for chaining.
Make the AI agent speak specific text immediately, bypassing the normal LLM response flow. The text is spoken in the agent’s configured voice.
Text for the agent to speak.
FunctionResult — self, for chaining.
1 from signalwire import AgentBase 2 from signalwire import FunctionResult 3 4 agent = AgentBase(name="my-agent", route="/agent") 5 agent.set_prompt_text("You are a helpful assistant.") 6 7 @agent.tool(name="announce_status", description="Announce the order status") 8 def announce_status(args, raw_data): 9 status = args.get("status") 10 return ( 11 FunctionResult() 12 .say(f"Your order status is: {status}") 13 ) 14 15 agent.serve()