broad-area-19468
09/19/2025, 9:29 AMlivekit-examples/agent-starter-react template to build with a Node.js Agent (powered by Azure OpenAI gpt-realtime ). I'm trying to build a feature that a user can type in some information, and these information will be injected into the system prompt of the agent, however so far I still cannot make it work. Is there anyone have built this before based on the agent-starter-react teamplate?tall-airline-16756
09/19/2025, 9:29 AMtall-airline-16756
09/19/2025, 9:30 AMlivekit-examples/agent-starter-react template using a Node.js Agent and Azure OpenAI gpt-realtime. You can achieve this smoothly by using the updateInstructions method of the RealtimeSession class. This lets you update the instructions sent to the model while your session is still running.
Here’s a simple guide to get you started:
• First, initialize your agent with a RealtimeModel instance using withAzure, where you set the initial instructions.
• Next, access the RealtimeSession instance through the LLM in your agent session.
• Then, use the updateInstructions method to change the system prompt dynamically. For example:
await session.updateInstructions("You are now a technical support agent.");
This approach updates the instructions without needing to restart the session, so everything stays smooth and seamless. Please feel free to reach out if you’d like any more help or clarification while implementing this—I’m here for you!
Sources: Azure OpenAI Realtime API and LiveKit | LiveKit Docs | plugins/openai/CHANGELOG.mdbroad-area-19468
09/19/2025, 9:33 AMagent-starter-react, thats the thingtall-airline-16756
09/19/2025, 9:34 AMagent-starter-react setup. Are you using a WebSocket, REST API, or maybe something else to send data to your Node.js backend?
Knowing this will really help me guide you better on how to send dynamic system prompt updates from the frontend. I'm here to help every step of the way!