Skip to content

Add room deletion on agent session close#1501

Merged
toubatbrian merged 6 commits into
mainfrom
brian/delete-room-on-close
May 14, 2026
Merged

Add room deletion on agent session close#1501
toubatbrian merged 6 commits into
mainfrom
brian/delete-room-on-close

Conversation

@toubatbrian
Copy link
Copy Markdown
Contributor

@toubatbrian toubatbrian commented May 13, 2026

Summary

  • Add JobContext.deleteRoom() for deleting the current or specified LiveKit room.
  • Add RoomInputOptions.deleteRoomOnClose, defaulting to false, and wire RoomIO to delete the room when the agent session closes.
  • Preserve close-time behavior by capturing JobContext when RoomIO is created and awaiting the delete task during RoomIO teardown.

Test plan

  • pnpm test agents/src/job.test.ts agents/src/voice/agent_session.test.ts agents/src/voice/room_io/room_io.test.ts
  • pnpm build:agents
  • Manually verified with examples/src/basic_agent.ts by enabling deleteRoomOnClose and confirming the room deletion completed on session close.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 13, 2026

🦋 Changeset detected

Latest commit: 392e5ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 31 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-assemblyai Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-cerebras Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-fishaudio Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-hume Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral Patch
@livekit/agents-plugin-mistralai Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-runway Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@toubatbrian toubatbrian changed the title brianyin/agt-2866-delete-room-on-session-close Add room deletion on agent session close May 13, 2026
@toubatbrian toubatbrian requested a review from a team May 13, 2026 23:37
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf736998c9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread agents/src/job.ts Outdated
Comment thread agents/src/voice/agent_session.test.ts Outdated
devin-ai-integration[bot]

This comment was marked as resolved.

@toubatbrian toubatbrian requested a review from theomonnom May 14, 2026 00:11
@toubatbrian toubatbrian enabled auto-merge (squash) May 14, 2026 00:20
@toubatbrian toubatbrian merged commit 2133852 into main May 14, 2026
9 checks passed
@toubatbrian toubatbrian deleted the brian/delete-room-on-close branch May 14, 2026 23:51
@github-actions github-actions Bot mentioned this pull request May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants