hello ?
# ask-ai
m
hello ?
t
Thanks for reaching out, aigentzi. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
m
can i end a seesion in dashboard ?
t
Hi — thanks for reaching out! I’m here to help. What can I assist you with today? A few examples of things I can help with: • Troubleshooting room or connection issues (room ID and project ID are helpful) • SDK or integration questions (which SDK and which platform?) • Authentication or token problems • Feature questions (recording, relays, permissions) If you can share a bit more detail about the issue (steps to reproduce, error messages, SDK version, environment), I’ll jump in and guide you through the next steps.
Hi — thanks for asking! Yes, you can end a session from the LiveKit Cloud dashboard. The dashboard includes session management controls that let you manually stop or shut down active agent sessions. If you prefer to end sessions programmatically, you can call
session.shutdown()
or delete the room via the API; both actions will disconnect all participants and end the session. For more details, see the Job Lifecycle documentation: https://docs.livekit.io/agents/server/job/#session-shutdown Would you like step‑by‑step instructions for ending a session in the dashboard, or details on the API call? Sources: Job lifecycle | LiveKit Documentation | Agents telephony integration | LiveKit Documentation
m
How do i end a session in dashboard ?
t
Thanks — I can help with that. You asked how to end a session in the LiveKit dashboard. I don’t have documented steps that show a specific “End session” button in the dashboard UI. What I can confirm is: • You can end sessions programmatically by calling
session.shutdown()
or by deleting the room via the API; both actions disconnect participants and end the session. More on session shutdown here: https://docs.livekit.io/agents/server/job/#session-shutdown • You can view active sessions and agent activity in the Agent insights/Observability area of the dashboard: https://docs.livekit.io/deploy/observability/insights/ To give the exact dashboard steps I’ll need one quick clarification: • Which dashboard are you using — the LiveKit Cloud web dashboard for Agents (Agent Builder / Observability) or a self-hosted LiveKit dashboard? If possible, tell me what screen you see (e.g., “Agent insights”, “Rooms list”, or a page showing active sessions). If you prefer an immediate way to stop a session, I can give the API/SDK snippet you can run right now to shut it down. Which would you like? Sources: Job lifecycle | LiveKit Documentation | Agent Builder | LiveKit Documentation
m
livekit cloud
t
Thanks — and thanks for clarifying you’re using LiveKit Cloud. I don’t have step‑by‑step UI instructions showing a specific “End session” button in the LiveKit Cloud dashboard. What I can offer are two practical options so you can end a session right away: • Quick programmatic option (immediately ends the session) a. Call
session.shutdown()
in your server code for the job/session you want to stop. This disconnects all participants and ends the session. b. Or delete the room via the API (deleting the room will disconnect everyone and end the session). • Dashboard inspection + guidance ◦ You can view active sessions and agent activity in the Agent insights / Observability area of the LiveKit Cloud dashboard. If you tell me what you see on that screen (for example: a list titled “Rooms”, “Agents”, or “Active sessions”), I can walk you through the closest dashboard action available or confirm whether a manual “stop” control exists for that item. Which would you prefer: the exact API/SDK snippet to run now, or help locating the relevant view in your LiveKit Cloud dashboard (if you can describe the page you’re on or paste a short screenshot)?
m
share api end session snippet
t
Thanks — I’ll share API snippets you can use to end a LiveKit Cloud session by deleting the room. Deleting the room will disconnect all participants and end the session. Please replace the placeholders (URL, API key, secret, and room name) with your values. 1) Python (using the LiveKit API client)
Copy code
from livekit import api
import os
import asyncio

async def end_session(room_name: str):
    client = await api.LiveKitAPI(
        os.getenv("LIVEKIT_URL"),
        os.getenv("LIVEKIT_API_KEY"),
        os.getenv("LIVEKIT_API_SECRET"),
    )
    await client.room.delete_room(api.DeleteRoomRequest(room=room_name))

# example
asyncio.run(end_session("my-room-name"))
2) Node.js / TypeScript (RoomServiceClient)
Copy code
import { RoomServiceClient } from "livekit-server-sdk"; // or appropriate package
const url = process.env.LIVEKIT_URL!;
const apiKey = process.env.LIVEKIT_API_KEY!;
const apiSecret = process.env.LIVEKIT_API_SECRET!;

const roomService = new RoomServiceClient(url, apiKey, apiSecret);

async function endSession(roomName: string) {
  await roomService.deleteRoom(roomName);
}

// example
await endSession("my-room-name");
3) If you’re running inside an agent/job context (helper pattern)
Copy code
# within an agent session where `ctx` is available
async def hangup_call(ctx):
    if ctx is None:
        return
    await ctx.api.room.delete_room(api.DeleteRoomRequest(room=ctx.room.name))
If you’d like, I can: • Provide a snippet specific to your runtime (Express, FastAPI, AWS Lambda, etc.). • Show how to safely look up the active room name for a given job before deleting. • Explain any permission or environment setup needed for the API client to authenticate. Which of those would help you next? Sources: Job lifecycle | LiveKit Documentation | Agents telephony integration | LiveKit Documentation | Why is there extra audio at the end of my recordings of an agent session? |...