Does livekit send a session state signal for start...
# ask-ai
a
Does livekit send a session state signal for starting and ending tool execution?
t
Thanks for reaching out, Michał. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your question about whether LiveKit sends a session state signal for the start and end of tool execution. LiveKit does not send a single session-state signal specifically named “tool execution started” or “tool execution ended.” Instead, it emits detailed events that mark those phases: • When a tool is invoked, LiveKit emits a conversation_item_added event containing a
FunctionCall
item — this serves as the signal that tool execution has started. • When the tool finishes, LiveKit emits another conversation_item_added event containing a
FunctionCallOutput
item — this signals the end of the tool execution and includes the result. You can observe these lifecycle events programmatically (for example, during testing) using assertion helpers like
is_function_call()
and
is_function_call_output()
to detect the start and end of tool runs. If you’d like, I can: • Show example event payloads for
FunctionCall
and
FunctionCallOutput
. • Suggest how to wire these events into your monitoring/logging or agent workflow. Which would help you most right now? Sources: Testing and evaluation | LiveKit Documentation | Agent session | LiveKit Documentation