chore: import upstream snapshot with attribution
Continuous Integration / Pre-commit Linter (push) Has been cancelled
Continuous Integration / Mypy Check (Python 3.10) (push) Has been cancelled
Continuous Integration / Mypy Check (Python 3.11) (push) Has been cancelled
Continuous Integration / Mypy Check (Python 3.12) (push) Has been cancelled
Continuous Integration / Mypy Check (Python 3.13) (push) Has been cancelled
Continuous Integration / Unit Tests (Python 3.10) (push) Has been cancelled
Continuous Integration / Unit Tests (Python 3.11) (push) Has been cancelled
Continuous Integration / Unit Tests (Python 3.12) (push) Has been cancelled
Continuous Integration / Unit Tests (Python 3.13) (push) Has been cancelled
Continuous Integration / Unit Tests (Python 3.14) (push) Has been cancelled
Continuous Integration / A2A v0.3 Tests (Python 3.10) (push) Has been cancelled
Continuous Integration / A2A v0.3 Tests (Python 3.11) (push) Has been cancelled
Continuous Integration / A2A v0.3 Tests (Python 3.12) (push) Has been cancelled
Copybara PR Handler / close-imported-pr (push) Has been cancelled
Continuous Integration / A2A v0.3 Tests (Python 3.13) (push) Has been cancelled
Continuous Integration / A2A v0.3 Tests (Python 3.14) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:25:13 +08:00
commit ec2b666284
2231 changed files with 491535 additions and 0 deletions
@@ -0,0 +1,40 @@
# Simple Live (Bidi-Streaming) Agent with Parallel Tools
This project provides a basic example of a live, [bidirectional streaming](https://google.github.io/adk-docs/streaming/) agent that demonstrates parallel tool execution.
## Getting Started
Follow these steps to get the agent up and running:
1. **Start the ADK Web Server**
Open your terminal, navigate to the root directory that contains the
`live_bidi_streaming_parallel_tools_agent` folder, and execute the following
command:
```bash
adk web
```
1. **Access the ADK Web UI**
Once the server is running, open your web browser and navigate to the URL
provided in the terminal (it will typically be `http://localhost:8000`).
1. **Select the Agent**
In the top-left corner of the ADK Web UI, use the dropdown menu to select
this agent (`live_bidi_streaming_parallel_tools_agent`).
1. **Start Streaming**
Click on the **Audio** icon located near the chat input
box to begin the streaming session.
1. **Interact with the Agent**
You can now begin talking to the agent, and it will respond in real-time.
Try asking it to perform multiple actions at once, for example: "Turn on the
lights and the TV at the same time." The agent will be able to invoke both
`turn_on_lights` and `turn_on_tv` tools in parallel.
## Usage Notes
- You only need to click the **Audio** button once to initiate the
stream. The current version does not support stopping and restarting the stream
by clicking the button again during a session.
@@ -0,0 +1,15 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from . import agent
@@ -0,0 +1,39 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.agents.llm_agent import Agent
def turn_on_lights():
"""Turn on the lights."""
print("turn_on_lights")
return {"status": "OK"}
def turn_on_tv():
"""Turn on the tv."""
print("turn_on_tv")
return {"status": "OK"}
root_agent = Agent(
# Find supported models in Vertex here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
model="gemini-live-2.5-flash-native-audio", # Vertex
# Find supported models in Gemini API here: https://ai.google.dev/gemini-api/docs/models
# model='gemini-2.5-flash-native-audio-preview-12-2025', # Gemini API
name="Home_helper",
instruction="Be polite and answer all user's questions.",
tools=[turn_on_lights, turn_on_tv],
)