Critcal : AI Agent Unexpectedly Ending Interview Mid-Session

Hi LiveKit Team,

I am facing a critical issue that is directly impacting my business and I need urgent help investigating it.

Room ID: RM_zJCcCAvUJ5pN

What happened: The AI agent called the end interview tool and terminated the session while the user had not said anything to trigger it. The agent was in the middle of asking interview questions and ended the call unexpectedly without any input from the user.

Why this is critical: This is an AI-powered interview platform. When the agent unexpectedly ends an interview mid-session, it creates a very bad experience for the candidate and directly damages our business reputation. This kind of issue is not acceptable in a production environment.

Additional context: We previously used Vapi for the same use case and never experienced a single case where the AI called the end interview tool unexpectedly during an active session. This issue appears to be specific to our LiveKit implementation.

What I need from you:

  1. Please investigate Room ID RM_zJCcCAvUJ5pN and tell me exactly why the agent triggered the end interview tool

  2. What could cause the agent to call an end tool without any user input?

  3. How can we prevent this from happening in production?

  4. Is there a way to add a guard or confirmation step before the agent is allowed to call the end interview tool?

So to clarify you have a function tool the agent can call to disconnect the call, and that is getting called, but the user did not say something that would cause that tool to get called?

Yes, correct
I have a function tool that the agent can call to disconnect the call, but I don’t know why I call that tool

You don’t see anything helpful in your agent logs or in Agent Insights?

Is there a built-in tool to end the interview session? I do not want to rely on my own custom tool as I am not fully confident in its reliability.
Do you have any suggestions or recommendations for a more reliable approach?

Yes — LiveKit provides a built‑in EndCallTool that safely ends a session and handles cleanup for you. It generates a final response, shuts down the session, and can optionally delete the room and disconnect all participants. See EndCallTool.

Unexpected endings usually happen because the LLM decides to call the tool based on its instructions or conversation state — even without explicit user input. To make this safer in production, you should:

  • Add strict extra_description instructions limiting when it may end.

  • Require confirmation in your system prompt before ending.

  • Log tool-call events to see exactly what triggered the decision.

Unexpected tool calls are usually related to the prompt - ensure you have observability whenever a tool call is invoked (ask the llm to explain why it called the tool). Using state machines for the conversation state can also elimiated unexpted tool calls.