feat(boson-avatar): add avatar plugin - #7019
Conversation
|
erik seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Note
This report is out of date. Scroll down for Devin Review's latest report on this PR.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
be915d5 to
30625f3
Compare
|
Ready for maintainer review at 30625f3.
@tinalenguyen, would you be able to take a look? You reviewed the recent Runway and Protoface Avatar plugin contributions. |
|
@tinalenguyen, following up on this Boson Avatar plugin contribution. I've merged current The latest code fixes both new public Devin findings: close can no longer spin on a completed startup-cleanup task while its callback is queued, and an avatar identity matching the agent is rejected before token issuance or provider creation. Regression tests reproduced both problems before the fixes and now pass, including DELETE retry after failed startup cleanup. All GitHub checks on Validation on the updated branch:
The three earlier public security review threads remain resolved. The plugin continues to compose with the existing AgentSession audio pipeline, with no Boson audio dependency or hard-coded provider endpoint. Could you review this, or help route it to the appropriate avatar-plugin maintainer? I can address any further changes. If there are provider-onboarding or release requirements beyond the code review, please let me know what is needed. Devin also mentions a finding hidden by the repository's GitHub settings; if it remains actionable, could you share it here so I can address it? |
|
Hi @longcw, would you have time to review this Boson Avatar plugin when convenient? I noticed you reviewed the Spatius integration (#5821) and the recent Avatar audio-stream recovery fix (#7007), so your perspective on the session lifecycle and audio routing would be especially helpful. The PR is updated with I'd appreciate any feedback and am happy to make changes to align with the existing Avatar plugins. If someone else is better placed to review this, a pointer would be very helpful. Thank you! |
Summary
livekit-plugins-boson-avatar, a BYOK Avatar plugin for Boson Higgs Audio-Driven AvatarAgentSessionvoice pipeline instead of creating a second voice participantlivekit-agents[boson-avatar]optional dependenciesDeveloper experience
The host application is the composition root: it supplies its Boson endpoint and API key, loads the project catalog server-side, and passes the Avatar selected by its UI to the session.
api_urlmay alternatively be supplied throughBOSON_AVATAR_API_URL;BOSON_API_KEYsupplies the API key. The plugin intentionally does not define or assume a production hostname. It accepts the audio output of any compatibleAgentSessionvoice pipeline and has no dependency on a Boson audio model. The URL must be an HTTPS base URL (loopback HTTP is allowed for local development); the plugin appends/avatarsand the session resource paths.list_avatars()owns its short-lived HTTP client, so it also works in a normal application server outside a LiveKit job context.Validation
uv run ruff format --check .anduv run ruff check .— passeduv run python scripts/check_types.py— passed strict mypycan_subscribe=False, Avatar joined, targeted PCM streamed, audio and video tracks published, and DELETE cleanup returned all four GPU workers to idleIntegration boundary
Deployment of a compatible Boson Avatar endpoint is an application/provider concern, not a plugin release dependency. The host app owns endpoint selection and composes the voice pipeline, Avatar plugin, LiveKit room, API credentials, and Avatar selection. The browser receives only catalog display data; the provider URL and Boson API key stay server-side.
The provider should retain its project-scoped catalog plus room-disconnect and max-duration reapers for process-kill and lost-response boundaries where a client can never receive the provider session ID.