ec2b666284
Continuous Integration / Pre-commit Linter (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.10) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.11) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.12) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.13) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.10) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.11) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.12) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.13) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.14) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.10) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.11) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.12) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.13) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.14) (push) Waiting to run
Copybara PR Handler / close-imported-pr (push) Waiting to run
1.2 KiB
1.2 KiB
Live Non-Blocking Tool Agent Sample
Overview
This sample provides a minimal agent to demonstrate non-blocking tool execution in ADK Live mode (adk web / run_live).
When a tool declaration is configured with response_scheduling set to WHEN_IDLE, SILENT, or INTERRUPT, it indicates to the model that response handling can occur asynchronously.
Sample Inputs
-
Please start a slow background task for data processing, and then let's keep talking.Triggers
slow_background_taskwhich sleeps for 10 seconds. While it runs, continue speaking to the agent.
Reproduction Instructions
- Run the sample via
adk web:uv run adk web contributing/samples/live/live_non_blocking_tool_agent - Open the ADK web interface and start a Live Session with the agent.
- Trigger the tool by saying: "Please start a slow background task and keep talking with me."
- Continue speaking to the agent while the background task runs in console (
[Tool] Starting slow background task...).
Expected Behavior
The model should continue conversing and generating audio/transcription responses immediately while the tool executes in the background. The tool result is delivered later per the response_scheduling mode.