most-evening-18072
09/28/2025, 6:20 PMtall-airline-16756
09/28/2025, 6:20 PMtall-airline-16756
09/28/2025, 6:20 PMset metadata(md: string) or set attributes(attrs: Record<string, string>).
• Python SDK: Use with_metadata(metadata: str) or with_attributes(attributes: dict[str, str]).
• Go SDK: Use SetMetadata(md string) or SetAttributes(attrs map[string]string).
• Rust SDK: Use with_metadata(metadata: &str) or with_attributes().
• Ruby SDK: Use metadata= or attributes=.
• Kotlin SDK: Use the metadata or attributes properties.
Once set, these initial values will be ready and waiting as soon as your participant connects to the room, as long as the token includes the necessary grants. If you have any questions or need a hand with this, feel free to ask—I’m here to help!
Sources: auth/accesstoken.go | Authentication | LiveKit Docs | packages/livekit-server-sdk/src/grants.ts | examples/agent_dispatch.py | livekit-protocol/src/livekit.rsmost-evening-18072
10/01/2025, 8:30 PMtall-airline-16756
10/01/2025, 8:31 PMmost-evening-18072
10/01/2025, 8:34 PMtall-airline-16756
10/01/2025, 8:35 PMupdateParticipant from a backend service once the user has joined. This helps keep things flexible!
2. Access participant attributes in the session: After connecting to the room, you can retrieve these attributes from the participant object. Here's a simple example in Python:
async def entrypoint(ctx: JobContext):
await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)
participant = await ctx.wait_for_participant()
# Read custom attribute
mcp_url = participant.attributes.get("mcp_server_url")
if mcp_url:
mcp_servers.append(mcp.MCPServerHTTP(url=mcp_url))
1. Update the MCP server list: With the attribute value you retrieved, you can dynamically configure the mcp_servers list and pass it along to the AgentSession. This keeps your session up-to-date with the right servers.
If you find that attributes aren't accessible at runtime, a handy alternative is to embed the MCP server URL in the metadata field or pass it through environment variables during deployment. This way, you still maintain flexibility without any hiccups.
Feel free to reach out if you'd like me to walk you through any of these steps in more detail—I'm here to help!
Sources: examples/voice_agents/mcp/mcp-agent.py | Tool definition and use | LiveKit Docs | Using MCP with LiveKit Agents | agent-console/app/_components/participant-action-panel.tsx | SIP overview | LiveKit Docsmost-evening-18072
10/01/2025, 8:38 PMtall-airline-16756
10/01/2025, 8:39 PMllm_node method in a custom Agent class. This approach is supported and reliable within LiveKit Agents, letting you inspect and respond to tool call initiations just before they happen.
Here’s a friendly example to guide you through overriding `llm_node`:
async def llm_node(self, chat_ctx, tools, model_settings):
tool_call_detected = False
async for chunk in super().llm_node(chat_ctx, tools, model_settings):
if isinstance(chunk, ChatChunk) and chunk.delta and chunk.delta.tool_calls and not tool_call_detected:
tool_call_detected = True
self.activity.agent.say("Sure, I'll check that for you.")
yield chunk
This method helps you to:
• Spot when the LLM decides to make a tool call.
• Carry out side effects like logging, updating states, or giving feedback.
• Continue with the tool call smoothly by yielding the chunk.
If anything feels unclear or you’d like some extra help implementing this, please don’t hesitate to ask—I’m here to support you every step of the way!
Sources: livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti... | mcp_client/server.py | Tool definition and use | LiveKit Docsmost-evening-18072
11/08/2025, 9:36 PMtall-airline-16756
11/08/2025, 9:37 PMSoundWaveformWidget using the LiveKit Flutter SDK's handy tools. Here's a simple way to get started:
1. Install Required Packages: First, add these to your `pubspec.yaml`:
dependencies:
livekit_client: ^1.4.0
livekit_components: ^0.5.0
1. Configure Permissions: Make sure your app has microphone access enabled in your configuration files (like Info.plist for iOS and AndroidManifest.xml for Android).
2. Use the SoundWaveformWidget or `AudioVisualizerWidget`: These widgets will take care of processing the PCM audio buffers and display a lively waveform or bar visualizer. Here's an example:
SoundWaveformWidget(
audioTrack: localAudioTrack, // e.g., room.localParticipant.audioTrack
options: AudioVisualizerWidgetOptions(
barCount: 7,
width: 12,
minHeight: 12,
maxHeight: 100,
color: Colors.blue,
spacing: 5,
),
)
If you prefer, you can also try AudioVisualizerWidget which integrates nicely with LiveKit's provider pattern:
AudioVisualizerWidget(
options: AudioVisualizerWidgetOptions(
barCount: 7,
color: Colors.green,
width: 10,
minHeight: 10,
maxHeight: 80,
),
backgroundColor: Colors.black12,
)
Both of these widgets handle the audio visualization seamlessly by processing the audio track's data for you.
If you have any questions or want to explore more customization options, please feel free to ask. I'm here to help you every step of the way!
Sources: Web and mobile frontends | LiveKit Docs | lib/src/ui/widgets/track/audio_visualizer_widget.dart | Flutter quickstart | LiveKit docs | shared_swift/Visualizer.swift | Docs/audio.md