adorable-autumn-29772
09/27/2025, 7:38 AMtall-airline-16756
09/27/2025, 7:38 AMtall-airline-16756
09/27/2025, 7:39 AMBarVisualizer (React), AgentBarAudioVisualizer (Swift), or similar tools. These will create a dynamic audio waveform that beautifully reflects the agent’s speech and state.
• Video Visualization: If your agent provides a video track (like a virtual avatar), you can showcase it using a video track renderer like VideoTrack. It’s a great way to make the experience more engaging!
When it comes to recordings:
• Room Recording: If you're using LiveKit’s server-side recording, the good news is that the agent's audio and video tracks are automatically included—making your job easier!
• Client-Side Recording: Just make sure the visualization component is rendered in the UI that you’re recording on the frontend, so everything you want is captured.
If you'd like, I’m here to provide more details or even some examples to help you get started. Just let me know!
Sources: Docs::Agents | Bringing AI avatars to voice agents | Bringing AI avatars to voice agents | Bringing AI avatars to voice agentsadorable-autumn-29772
09/27/2025, 7:41 AMtall-airline-16756
09/27/2025, 7:42 AMaudio_only=False so it captures both audio and video. You can use the RoomCompositeEgressRequest API to kick off the recording. Here’s a handy Python example for you:
from livekit import api
async def start_recording():
req = api.RoomCompositeEgressRequest(
room_name="your-room-name",
audio_only=False,
preset=api.EncodingOptionsPreset.H264_720P_30,
file_outputs=[
api.EncodedFileOutput(
file_type=api.EncodedFileType.MP4,
filepath="recordings/session.mp4",
s3=api.S3Upload(
bucket="your-bucket-name",
region="us-east-1",
access_key="your-access-key",
secret="your-secret-key",
),
)
],
)
lkapi = api.LiveKitAPI()
await lkapi.egress.start_room_composite_egress(req)
1. Render Agent Visualization: Next, make sure the agent’s visualization—like an audio waveform or video avatar—is showing up in your room layout. If you’re working with React, the BarVisualizer component is a great way to do this:
import { useVoiceAssistant, BarVisualizer } from "@livekit/components-react";
function AgentVisualizer() {
const { state: agentState, audioTrack } = useVoiceAssistant();
return (
{agentState}
);
}
1. Verify Recording: Finally, double-check that your composite recording includes all media tracks published to the room, including the agent’s visualization—this will happen as long as it’s part of your room layout.
If you’d like to dive deeper, the Egress recording documentation is a fantastic resource. And of course, feel free to reach out if you want me to walk you through anything else or provide more examples—I’m here to help!
Sources: Session recording and transcripts | LiveKit Docs | Recording agent sessions | LiveKit Docs | OpenAI and LiveKit partner to turn Advanced Voice into an API | Bringing AI avatars to voice agents | Docs::Agentsadorable-autumn-29772
09/27/2025, 8:08 AMtall-airline-16756
09/27/2025, 8:09 AMlk.publish_on_behalf attribute pointing to the agent’s identity. This helps the video track associate correctly with the agent.
4. Confirm Visualizer is Enabled: For audio visualization, please verify that audio visualization is turned on when creating the Room. For example, in Flutter, you can use RoomOptions(enableVisualizer: true).
5. Check Recording Initiation Timing: Keep in mind that composite recording starts when video frames are decoded or after a timeout of 5-10 seconds. If the agent’s video track is published after this window, it might not be included.
6. Verify Participant Identification: Make sure the agent participant is correctly identified as an agent (participant kind = agent) in the room. Visualization components specifically look for agent participants.
If you’d like, I’m more than happy to help you with any of these steps or provide some additional code examples. Just let me know!
Sources: Docs::Agents | template-default/src/Room.tsx | Composite and web recordings | LiveKit Docs | src/components/playground/Playground.tsx | Docs::Agents