narrow-chef-71655
10/12/2025, 1:39 PMconversation_item_added in session ?tall-airline-16756
10/12/2025, 1:39 PMtall-airline-16756
10/12/2025, 1:39 PMconversation_item_added event works in LiveKit! This event is automatically triggered whenever a new message is added to the chat history, for example, when you use session.say() or session.generate_reply(). Currently, there isn't a public API to emit this event manually.
If you're looking to add a message and have this event fire, you can simply use one of these methods:
• session.say() - This lets the agent send a message directly.
• session.generate_reply() - This generates a reply based on the conversation context.
And if you'd like to respond to this event, you can set up a listener like this:
@session.on("conversation_item_added")
def on_conversation_item_added(event):
print(f"Item added: {event.item}")
Please feel free to reach out if you want to dive deeper or have a specific scenario you'd like to explore—I’m here to help!
Sources: plugins/openai/src/realtime/api_proto.ts | basics/label_messages.py | Session recording and transcripts | LiveKit Docs | Events and error handling | LiveKit Docs | livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/real...