Module livekit.agents.beta.tools.end_call
Classes
class EndCallTool-
Expand source code
class EndCallTool(Toolset): @function_tool(name="end_call") async def _end_call(self, ctx: RunContext) -> None: """ Ends the current call and disconnects immediately. Call when: - The user clearly indicates they are done (e.g., “that’s all, bye”). - The agent determines the conversation is complete and should end. Do not call when: - The user asks to pause, hold, or transfer. - Intent is unclear. This is the final action the agent can take. Once called, no further interaction is possible with the user. """ logger.debug("end_call tool called") ctx.session.shutdown() @property def tools(self) -> list[Tool]: return [self._end_call]Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- livekit.agents.llm.tool_context.Toolset
- abc.ABC
Instance variables
prop tools : list[livekit.agents.llm.tool_context.Tool]-
Expand source code
@property def tools(self) -> list[Tool]: return [self._end_call]Tools exposed by the toolset.