kind-postman-17041
11/24/2025, 5:36 AMtall-airline-16756
11/24/2025, 5:36 AMtall-airline-16756
11/24/2025, 5:36 AMllm_node yields llm.ChatChunk objects that can include text plus optional tool calls, so a single generation can both speak to the user (e.g., TTS) and invoke backend logic without an extra LLM turn.
Would you like an example of the output shape or a brief code sketch for your SDK (JS or Go)?
Sources: Tool definition and use | LiveKit docs | Pipeline nodes and hooks | LiveKit docskind-postman-17041
11/24/2025, 5:41 AMtall-airline-16756
11/24/2025, 5:42 AMfunction_call (e.g., lookup_weather), receiving the function_call_output, and then emitting a message like “The weather in Tokyo is sunny…” all within one turn. The testing framework and events (e.g., function_tools_executed) validate and observe this multi-part output flow in real workflows such as voice agents and support bots.
Would you like a short code sketch (JS or Go) showing the output shape and event sequence for this flow?
Sources: Testing and evaluation | LiveKit Docs | Events and error handling | LiveKit docs | Building the all-in-one platform for voice AI agents | OpenAI and LiveKit partner to turn Advanced Voice into an APIkind-postman-17041
11/24/2025, 5:49 AMtall-airline-16756
11/24/2025, 5:49 AMNone). The agent will execute the tool and continue the turn without needing results for further reasoning. This is useful for information-collection tasks (e.g., persisting user profile data) or signaling a handoff where no LLM-visible output is required.
If helpful, I can:
• Share a short code sketch for JS or Python showing a silent tool, or
• Show the event sequence/output shape you’ll see when a tool runs silently. Which would you prefer? Sources: Tool definition and use | LiveKit docskind-postman-17041
11/24/2025, 5:49 AMtall-airline-16756
11/24/2025, 5:49 AMtool_behavior (e.g., BLOCK vs STREAM) — switch to streaming/async behaviors so the model can continue without waiting.
◦ tool_response_scheduling (e.g., WHEN_IDLE vs IMMEDIATELY) — controls when tool results are delivered to the model and whether they can interrupt generation.
Would you like a short code sketch (JS or Python) showing a non-blocking STREAM setup or an example with tool_response_scheduling?
Sources: Real-time AI Models & Streaming | livekit/livekit_composite | DeepWiki | AI Agents Framework | livekit/livekit_composite | DeepWikikind-postman-17041
11/24/2025, 5:50 AMtall-airline-16756
11/24/2025, 5:50 AMget_balance, waits for result, then replies with the balance.
What STREAM does
• Behavior: Asynchronous/streaming. The agent can continue generation without waiting for the tool to fully complete, and may receive partial/intermediate tool outputs.
• Effect: Allows lower-latency replies, partial updates, or continuing speech while tools run; tool outputs can be delivered incrementally or after generation depending on scheduling.
• When to use: Fire-and-forget actions, long-running background tasks, or when partial results are acceptable (e.g., telemetry, logging, long computations).
• Example: Agent acknowledges a request and continues speaking while a long report generation runs in the background and streams progress updates.
Key knobs that affect behavior
• tool_behavior: set to BLOCK (default) or STREAM.
• tool_response_scheduling: controls when tool outputs are delivered (e.g., WHEN_IDLE vs IMMEDIATELY) and whether they can interrupt generation.
If you want, I can provide a short JS or Python snippet showing how to configure tool_behavior=STREAM and tool_response_scheduling. Which language?kind-postman-17041
11/24/2025, 5:52 AMtall-airline-16756
11/24/2025, 5:52 AMSTREAM you can fire a tool asynchronously, continue the conversation for multiple turns, and have the tool result reinjected later.
How it works
• Invocation: The LLM issues a tool call but does not wait for it to finish.
• Conversation continues: The agent and the user can exchange multiple turns while the tool runs.
• Reinjection: The tool’s output is delivered back to the model later according to tool_response_scheduling (for example, IMMEDIATELY to interrupt or WHEN_IDLE to deliver when the model is not actively generating). The model can then use that result in subsequent reasoning or replies.
• Partial results: If the tool streams intermediate output, those chunks can be delivered incrementally during generation depending on scheduling.
When to use
• Use STREAM for long-running tasks, fire-and-forget actions, or when you want low-latency interaction while work proceeds in the background.
• Keep BLOCK when the tool result is required immediately for the next reply.
Would you like a short JS or Python snippet showing tool_behavior=STREAM with tool_response_scheduling set to WHEN_IDLE or IMMEDIATELY?kind-postman-17041
11/24/2025, 5:53 AMtall-airline-16756
11/24/2025, 5:53 AMBLOCK vs STREAM) and tool response scheduling are supported in LiveKit agents.
• Supported knobs:
◦ tool_behavior (e.g., BLOCK or STREAM) — controls whether the model waits for tool completion.
◦ tool_response_scheduling (e.g., WHEN_IDLE or IMMEDIATELY) — controls when tool outputs are delivered back to the model and whether they can interrupt generation.
• Practical effect:
◦ Default is BLOCK (synchronous): agent waits, tool result is fed to the model before the next reply.
◦ STREAM (async): agent can continue the conversation while the tool runs; results (or intermediate chunks) are reinjected later per scheduling settings.
Would you like a short JS or Python example showing how to enable STREAM with WHEN_IDLE or IMMEDIATELY?kind-postman-17041
11/24/2025, 5:54 AMtall-airline-16756
11/24/2025, 5:54 AMtool_behavior (BLOCK vs STREAM) and tool_response_scheduling (e.g., WHEN_IDLE vs IMMEDIATELY) at the agent/runtime layer so you can control blocking vs async tool execution across model backends.
• Gemini Realtime is a common backend that demonstrates and uses these modes (and thus often surfaces examples), but the behavior control is provided by LiveKit and works with other supported realtime LLM integrations too.
• If you want, I can share a short JS or Python snippet showing how to set tool_behavior=STREAM and tool_response_scheduling=WHEN_IDLE for your agent — which language do you prefer?