Best way to prevent agent from speaking function t...
# ask-ai
b
Best way to prevent agent from speaking function tool call arguments?
t
Thanks for reaching out, Håvard. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To keep an agent from speaking function tool call arguments, here are a few friendly tips you can try: • Return None from Tools: Just have the tool function return
None
. This way, the agent won’t generate any response. • Use StopResponse Exception: You can raise a
StopResponse
exception inside the tool function to gently stop any response from being made. • Control Speech Generation: Use the
RunContext
within the tool to manage how speech behaves—like turning off interruptions or keeping responses quiet. These tricks help your tools work quietly without announcing their arguments or actions. If you want, I’m happy to share more details or examples—just let me know! Sources: livekit-agents/livekit/agents/voice/events.py | Tool definition and use | LiveKit Docs