I am trying to show the avatar from bey but its no...
# ask-ai
e
I am trying to show the avatar from bey but its not showing at all I have following the docs on implementing it but on the nextjs side nothing is showing what am I missing?
t
Thanks for reaching out, Brian. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I understand you're trying to show the Beyond Presence ("bey") avatar in your Next.js app and it's not rendering even though you followed the docs. I’ll help you narrow down where it might be failing and what to check next. First, quick checklist of the most common causes and what to verify: • Backend: Confirm
bey.AvatarSession
is created and started before the
AgentSession
. The avatar must join the room as a separate participant for a video track to be published. ◦ Verify your code calls
avatar.start(session, room=...)
(or equivalent) and that it completes without exception. ◦ Ensure your
BEY_API_KEY
is set and valid in the environment where the backend runs. • Frontend: Confirm you’re using the
useVoiceAssistant()
hook (from
@livekit/components-react
) or otherwise subscribing to the avatar worker’s video track. ◦
useVoiceAssistant()
exposes
videoTrack
and `audioTrack`; if
videoTrack
is null, the avatar worker either didn’t join or didn’t publish video. ◦ Make sure your component attaches the track to a <video> element (autoplay, playsInline, muted for preview). • Room participants: The avatar appears as a separate participant (kind: Agent) with attributes like
lk.publish_on_behalf
. If that participant is missing, the avatar session didn’t start. • Errors & fallbacks: Avatar failures fall back to audio-only rather than crash the agent. Check backend logs for exceptions such as
BeyException
or authentication/connectivity errors when starting the avatar session. If you want me to pinpoint the issue, please share any of the following (the more, the faster I can diagnose): 1. Backend logs around the time you start the agent/ avatar (any errors or stack traces). 2. The backend snippet that creates/starts
bey.AvatarSession
and the
AgentSession
. 3. The frontend snippet where you render the agent (how you use
useVoiceAssistant()
or subscribe to tracks). 4. Output from the frontend: Does
useVoiceAssistant()
return
videoTrack
as null or undefined? 5. A console log of room participants (e.g.,
room.participants.forEach(...)
) — do you see the avatar participant? 6. Environment details: running locally, Agents Playground, or deployed; and the version of
@livekit/components-react
. If you prefer, paste the small backend and frontend snippets and I’ll point out exactly what to change. Sources: Beyond Presence virtual avatar integration guide | LiveKit Documentation | Virtual avatar models overview | LiveKit Documentation | examples/avatar_agents | livekit/livekit_composite | DeepWiki | Web and mobile frontends | LiveKit Documentation
e
Oh i just realised am using outdated versions can you give me the versions I need to use? both typescript and python libs
t
Great — thanks for the update. Below are the versions you should use for a compatible Beyond Presence ("bey") avatar setup: TypeScript (frontend) and Python (backend). TypeScript / JavaScript (Next.js frontend) • livekit-client: ^2.15.15 • @livekit/components-react: ^2.9.15 • livekit-server-sdk (optional, for token generation on Node): ^2.13.2 Python (backend agent with bey plugin) • livekit-agents[bey]: ~=1.3 Notes and quick tips • Use
^
for the JS packages in package.json to allow compatible minor/patch updates; use
~=
for the Python package to stay in the 1.3 series while getting patch updates. • Make sure you rebuild your frontend after updating packages (install → dev server restart / next build). • Confirm
BEY_API_KEY
is present in your backend environment and that
AvatarSession.start(...)
completes successfully so the avatar participant joins the room. • If you rely on starter apps, they are built against these versions and expect
@livekit/components-react
to expose
useVoiceAssistant()
which resolves the avatar’s tracks. If you want, paste your current package.json and Python requirements (or the exact pip/uv add command you used) and I’ll give precise upgrade commands and any migration notes. Sources: Examples | livekit/livekit_composite | DeepWiki | Client SDKs | livekit/livekit_composite | DeepWiki | Beyond Presence virtual avatar integration guide | LiveKit Documentation | Virtual avatar models overview | LiveKit Documentation
e
what about python livekit lib itself not plugin
t
Thanks — good clarification. You're asking about the core Python LiveKit libraries (not the bey plugin). Here’s what to use and how they relate to the agents/plugin install. Recommended core Python LiveKit packages and versions •
livekit >= 1.0.19, < 2
— the Python SDK for LiveKit client functionality •
livekit-api >= 1.0.7, < 2
— the server-side API client •
livekit-protocol >= 1.1, < 2
— protocol buffer definitions How this fits with the agents + bey plugin • You generally do not need to install those core packages separately. Installing
livekit-agents[bey]~=1.3
will pull in the compatible
livekit
,
livekit-api
, and
livekit-protocol
versions as dependencies. • If you prefer to pin them manually, use the ranges above to remain compatible with
livekit-agents~=1.3
. Quick actions 1. If you install with pip/uv: ◦ Recommended: uv add "livekit-agents[bey]~=1.3" (this pulls the correct core libs automatically). 1. If you pin manually in requirements.txt, include these three core packages with the version ranges above. 2. After updating, restart your backend and verify
AvatarSession.start(...)
completes and no dependency conflicts appear. If you want, paste your current pip list / requirements.txt (or the output of
pip show livekit livekit-api livekit-protocol livekit-agents
) and I’ll confirm exact upgrade commands and whether any conflicts need resolving. Sources: Examples | livekit/livekit_composite | DeepWiki | Models overview | LiveKit Documentation | Beyond Presence virtual avatar integration guide | LiveKit Documentation