LiveKit docs › Prebuilt components › Prebuilt tools › EndCallTool

---

# EndCallTool

> Provide your agent with a tool that gracefully ends the call and disconnects from the room.

Available in (BETA):
- [ ] Node.js
- [x] Python

## Overview

Use `EndCallTool` to provide your agent with a tool that gracefully ends the call and disconnects from the room. The tool automatically handles cleanup, including optionally deleting the room and shutting down the session.

When the `end_call` tool is called:

1. The agent generates a final response (based on `end_instructions`).
2. The session shuts down after the response is complete.
3. If `delete_room` is `True`, the room is deleted, disconnecting all participants.
4. The job process shuts down.

### Basic usage

Add `EndCallTool` to your agent's tools:

```python
from livekit.agents.beta.tools import EndCallTool
from livekit.agents import Agent

class CustomerServiceAgent(Agent):
    def __init__(self):
        end_call_tool = EndCallTool()
        super().__init__(
            instructions="You are a helpful customer service agent.",
            tools=end_call_tool.tools,
        )

```

The LLM automatically has access to the `end_call` tool and can use it when the conversation is complete.

### Custom implementation

By default, `EndCallTool` uses generic instructions for when and how to end the call. The following example customizes the tool with `extra_description` and `end_instructions` so the agent only ends the call after confirming the customer's issue is resolved and says a custom goodbye message.

```python
from livekit.agents.beta.tools import EndCallTool
from livekit.agents import Agent

class SupportAgent(Agent):
    def __init__(self):
        end_call_tool = EndCallTool(
            extra_description="Only end the call after confirming the customer's issue is resolved.",
            delete_room=True,
            end_instructions="Thank the customer for their time and wish them a good day.",
        )
        super().__init__(
            instructions="You are a technical support agent. Help resolve customer issues.",
            tools=end_call_tool.tools,
        )

```

### Parameters

For a full list of parameters, see the [EndCallTool reference](https://docs.livekit.io/reference/python/livekit/agents/beta/tools/index.html.md#livekit.agents.beta.tools.EndCallTool).

- **`extra_description`** _(string)_ (optional): Additional description to add to the end call tool description. Useful for providing context-specific instructions.

- **`delete_room`** _(bool)_ (optional) - Default: `True`: Whether to delete the room when the call ends. Deleting the room disconnects all remote users, including SIP callers.

- **`end_instructions`** _(string)_ (optional) - Default: `say goodbye to the user`: Tool output to the LLM for generating the tool response. This is the message the LLM receives after the tool is called.

---

This document was rendered at 2026-06-07T11:36:47.467Z.
For the latest version of this document, see [https://docs.livekit.io/agents/prebuilt/tools/end-call-tool.md](https://docs.livekit.io/agents/prebuilt/tools/end-call-tool.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).