fresh-iron-75343
10/10/2025, 12:27 AMtall-airline-16756
10/10/2025, 12:27 AMtall-airline-16756
10/10/2025, 12:28 AMself.session.generate_reply() method in the Python LiveKit Agent SDK gently encourages the LLM to create a response based on the current context and any instructions you provide. It’s important to know that these instructions aren’t added as a system message in the chat history.
Instead, they’re temporarily added to the agent’s base instructions just for that particular response. This way, the LLM can blend all the guidance to craft its reply, but the extra instructions don’t stick around in the conversation history. Only the assistant’s generated response and any user_input you provide get saved.
If anything isn’t clear or you’d like to dive deeper, please don’t hesitate to reach out—I’m here to help!
Sources: examples/voice_agents/restaurant_agent.py | Agent speech and audio | LiveKit Docs