dict: # ã«ã¹ã¿ã ããŒã« """ Get the current time in the format YYYY-MM-DD HH:MM:SS """ return {"current_time": ...} root_agent = Agent( tools=[google_search, get_current_time], # çµã¿èŸŒã¿ + ã«ã¹ã¿ã ) äž¡æ¹äœ¿ãããå Žåã¯ãåŸè¿°ã®ãã«ããšãŒãžã§ã³ãã§ã®ãAgent as a Toolãã¢ãããŒããå¿ èŠã§ãã 22
import google_search news_analyst = Agent( name="news_analyst", model="gemini-2.0-flash", description="News analyst agent", instruction=""" You are a helpful assistant that can analyze news articles and provide a summary of the news. When asked about news, you should use the google_search tool to search for the news. If the user ask for news using a relative time, you should use the get_current_time tool to get the current time to use in the search query. """, tools=[google_search], ) 38