hundreds-rainbow-68836
04/08/2026, 8:42 AMtall-airline-16756
04/08/2026, 8:43 AMtall-airline-16756
04/08/2026, 8:43 AMsession.generate_reply() having conversation history and calling it during a tool call.
• Yes. session.generate_reply() uses the agent’s chat_ctx by default, which contains the conversation history up to that point, so generated replies will see prior messages.
• Yes. You can call session.generate_reply() from inside a tool call to produce updates (for example, interim speech during a long-running task).
• Important notes:
◦ Don’t directly await the SpeechHandle returned by generate_reply() inside the tool. Use context.wait_for_playout() to wait for speech to finish.
◦ If you need to control which messages are visible to generate_reply(), copy and modify the agent’s chat_ctx and pass it as chat_ctx (Python) when calling generate_reply().
If you want, tell me which language/SDK and show a short snippet of your tool so I can give a tailored example.
Sources: Agent speech and audio | LiveKit Documentation | Function tool definition | LiveKit Documentation, with interactive elements