Skip to content

Add support for tools to Phonic Plugin#1076

Merged
toubatbrian merged 7 commits intolivekit:mainfrom
Phonic-Co:qiong/phonic-tools
Feb 26, 2026
Merged

Add support for tools to Phonic Plugin#1076
toubatbrian merged 7 commits intolivekit:mainfrom
Phonic-Co:qiong/phonic-tools

Conversation

@qionghuang6
Copy link
Contributor

@qionghuang6 qionghuang6 commented Feb 25, 2026

Description

  • Add support for client defined tools to Phonic Plugin.
  • Updated README.md and example
  • Minor fix: wait for Phonic to indicate that it is ready before sending audio; only impacts Phonic call recording on Phonic platform side.

Changes Made

  • Adds tool_call handling to Phonic plugin
  • Adds tool example.
  • Adds conversion from LiveKit tool format to Phonic tool format.

Video demo:

https://drive.google.com/file/d/13uSdc8PbNC7MLAGZK3wDHn77xTDDrDhf/view?usp=sharing

Pre-Review Checklist

  • Build passes: All builds (lint, typecheck, tests) pass locally
  • AI-generated code reviewed: Removed unnecessary comments and ensured code quality
  • Changes explained: All changes are properly documented and justified above
  • Scope appropriate: All changes relate to the PR title, or explanations provided for why they're included
  • Video demo: A small video demo showing changes works as expected and did not break any existing functionality using Agent Playground (if applicable)

Testing

  • Tested using various tools with Phonic plugin, with different tool execution times, tool formats, and interruptions

Additional Notes

  • Certain Phonic flags wait_for_speech_before_tool_call: true and allow_tool_chaining: true had to be turned on to ensure only 1 tool call is made at a time and that we can complete the current generation on receiving a tool from Phonic.

Note to reviewers: Please ensure the pre-review checklist is completed before starting your review.

@changeset-bot
Copy link

changeset-bot bot commented Feb 25, 2026

🦋 Changeset detected

Latest commit: 309e355

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

This PR includes changesets to release 21 packages
Name Type
@livekit/agents-plugin-phonic Patch
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugin-xai Patch
@livekit/agents-plugins-test 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

@qionghuang6 qionghuang6 changed the title Add support for tools Phonic Plugin Add support for tools to Phonic Plugin Feb 25, 2026
@qionghuang6 qionghuang6 marked this pull request as ready for review February 26, 2026 00:08
devin-ai-integration[bot]

This comment was marked as resolved.

this.instructionsReady = new Promise<void>((resolve) => {
this.resolveInstructionsReady = resolve;
});
this.resolveToolsReady = () => {};
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use Future object here from utils.ts

devin-ai-integration[bot]

This comment was marked as resolved.

Comment on lines +291 to +292
// Tool chaining and tool calls during speech are not supported at this time
// for ease of implementation within the RealtimeSession generations framework
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@toubatbrian
Copy link
Contributor

LG! Can you fix the format error?

@qionghuang6
Copy link
Contributor Author

LG! Can you fix the format error?

Thanks @toubatbrian, just fixed the pnpm-lock.json

@toubatbrian toubatbrian merged commit 122bbd8 into livekit:main Feb 26, 2026
4 checks passed
@github-actions github-actions bot mentioned this pull request Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants