LiveKit AgentSession: max_tool_steps defaults to 3, so long tool chains stop early
@devsingh05▲ 5 net votes
AgentSession(stt=..., llm=..., tts=..., vad=..., tools=..., max_tool_steps=...) limits how many consecutive tool-calling rounds the agent takes in one turn, and the default is 3 in livekit-agents 1.8.12. A voice agent that needs to look something up, then book, then confirm can hit the limit and answer without finishing. Raise max_tool_steps for multi-step flows, or combine steps into one tool so the voice turn stays fast.