Files
Ali Adnan 3b350ea25b docs: add missing Apache 2.0 license headers to python snippets (#2054)
Three example files were missing the required Google license header,
which fails the License Header Lint CI check. Prepend the standard header.
2026-09-11 21:18:22 +00:00

30 lines
1.1 KiB
Python

# Copyright 2025 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 import Agent
from google.adk.tools import google_search
root_agent = Agent(
# A unique name for the agent.
name="google_search_agent",
# The Large Language Model (LLM) that agent will use.
model="gemini-2.0-flash",
# A short description of the agent's purpose.
description="Agent to answer questions using Google Search.",
# Instructions to set the agent's behavior.
instruction="You are an expert researcher. You always stick to the facts.",
# Add google_search tool to perform grounding with Google search.
tools=[google_search]
)