Can I make agent speak while executing some functi...
# ask-ai
f
Can I make agent speak while executing some function tools in parralel?
t
Thanks for reaching out, Taras. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Absolutely! An agent can indeed speak while running function tools in parallel. This happens when the
parallel_tool_calls
option is turned on during the agent's setup. How the agent talks depends on whether the tools send back any output: • If at least one tool gives a result, the agent will kindly wait and then respond once all tools have finished their work. • If you prefer the agent to stay quiet after the tools run, you can simply use
ev.cancel_tool_reply()
within the
function_tools_executed
event handler. If you'd like, I’d be happy to share a detailed code example to help you see exactly how to set this up. Just let me know! Sources: xAI LLM integration guide | LiveKit Docs | xAI LLM integration guide | LiveKit Docs | Perplexity LLM integration guide | LiveKit Docs | Cerebras LLM integration guide | LiveKit Docs | livekit-agents/livekit/agents/voice/generation.py