creamy-window-79763
12/05/2025, 2:49 PMtall-airline-16756
12/05/2025, 2:49 PMtall-airline-16756
12/05/2025, 2:49 PMfunction_tools_executed after all function tools run for a given user input. The event includes:
• function_calls — list of function call objects
• function_call_outputs — list of outputs returned by those calls
• zipped() — pairs each call with its corresponding output
Example listener (Python):
@session.on("function_tools_executed")
def on_function_tools_executed(event: FunctionToolsExecutedEvent):
for call in event.function_calls:
print(f"Function called: {call.name}")
for output in event.function_call_outputs:
print(f"Output received: {output.output}")
Would you like a JavaScript/TypeScript example or details on the structure of FunctionToolsExecutedEvent?
Sources: Events and error handling | LiveKit docscreamy-window-79763
12/05/2025, 3:22 PMFunctionToolExecutedEvent ?
That variable is not the output of the function calltall-airline-16756
12/05/2025, 3:22 PMfunction_tools_executed event only exposes function_calls, function_call_outputs, and zipped() (pairings of calls and outputs). It does not automatically include internal/local variables created inside the function unless those values are included in the function's returned output.
Options you can use to surface that internal value:
• Return it from the function call (add it to the function's output payload). The event will include it via function_call_outputs.
• Store it in session/state that your agent/session manages (e.g., session variables or a datastore) during the function execution, then read that state after the event fires.
• Attach metadata to the function call object itself (if your function-call system supports custom metadata) so the event's function_calls contains the extra data.
Which approach would you prefer? I can provide a code example for returning the value in the function output or for storing/retrieving it from session state.