I've been able to set up my client and my server, ...
# server-api
h
I've been able to set up my client and my server, but I'm having trouble figuring out how I can set the initial instructions from the client to the server dynamically. For example, a user can create a chat room with a book and I want to add a summary of the book as the agent's instructions. How can I do this via the API?
r
In the dispatch API there is a way to set metadata. The agent has access to that form the job context. https://docs.livekit.io/agents/v1/build/dispatch/#dispatch-via-api
👍 1
h
okay this is cool. I didnt know about dispatch. I got it working by putting the item ID as the room name.
🎉 1
If I'm wanting to create concurrent rooms for different users, should I use dispatch over using the what's in the multimodal-agent-node example?
const agent = new multimodal.MultimodalAgent({ model });
const session = await agent
.start(_ctx_.room, participant)
.then((_session_) => _session_ as openai.realtime.RealtimeSession);
Maybe its just me but I found this very confusing. I was using the v0.x docs because it says it has node support and avoiding the v1.0 RC stuff because it just says python.
Screenshot 2025-04-04 at 11.27.45 AM.png
but it looks like it has node.js support in the code examples
okay I see now that the node side is still being worked on
Should I just use Python for the back end? It doesn't seem like the node version is ready. What would you recommend?
r
TLDR; I would urge you to use Python for your agent development
👍 1
h
will do. thanks