25.9 C
New York
Thursday, July 10, 2025

Buy now

spot_img

Get began with Google Agent Growth Equipment




from google.adk.brokers import Agent
from google.adk.instruments import google_search

root_agent = Agent(
    title="search_assistant",
    description="An agent that solutions questions augmented with net searches.",
    mannequin="gemini-2.0-flash",
    instruction="Reply questions supplied by the consumer. Examine and distinction info gathered from Google with your individual info. In case you are given an announcement that's not a query, reply, 'Please ask me a query.'",
    instruments=[google_search]
)

Each time we wish to create a definite agent, we arrange a subdirectory in our foremost undertaking listing and provides it a reputation (on this case, searchagent). This lets us have a number of brokers in a single undertaking, which might run on their very own or interoperate.

The __init__.py file marks the listing as being an agent, by importing the precise agent code. The agent.py file units up the agent itself, as described by the Agent object.

Every Agent makes use of a mannequin API to interface with (right here, it’s gemini-2.0-flash). Our preliminary instructions to the agent, which prefix every enter from the consumer, are outlined in directions. Word that these directions might be way more detailed than what we’re offering right here. The instruments part supplies extra tooling that can be utilized by the agent; google_search lets the agent use Google searches to enhance its outcomes.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

0FansLike
0FollowersFollow
0SubscribersSubscribe
- Advertisement -spot_img

Latest Articles

Hydra v 1.03 operacia SWORDFISH