how to pass context from the frontend (client) to ...
# ask-ai
t
how to pass context from the frontend (client) to the livekit agent?
t
Thanks for reaching out, Ellis. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! You can share context from your frontend (client) to the LiveKit agent in a couple of easy ways: • Remote Procedure Calls (RPC): This lets you send dynamic data back and forth while everything’s running. For example, your frontend can call an RPC method on the agent to share things like user preferences or location. The agent will listen and handle that info for you. • Job Metadata: If you want to pass some static info right at the start, you can include metadata when you dispatch the agent. The agent will grab this data as it starts up. If you want me to walk you through some detailed examples for either method, just give me a shout! Sources: Agent dispatch | LiveKit Docs | Web and mobile frontends | LiveKit Docs | Function calling with Voice Agents | LiveKit Docs | Tool definition and use | LiveKit Docs