This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from google.adk.agents import Agent | |
| # --- Import your new, specialized tools --- | |
| from agent.tools import ( | |
| get_live_leave_data_tool, | |
| get_daily_timesheet_hours_tool, | |
| get_weekly_timesheet_hours_tool, | |
| get_monthly_timesheet_summary_tool, | |
| get_yearly_timesheet_summary_tool, | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import pandas as pd | |
| import requests | |
| from google.adk.tools import FunctionTool | |
| from google.cloud import bigquery | |
| from datetime import datetime, timedelta | |
| from typing import List, Optional | |
| # ============================================================================== | |
| # TOOL 1: GET LEAVE DATA FROM GOOGLE SHEETS (Unchanged) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| google-cloud-bigquery | |
| google-cloud-storage | |
| google-adk>=0.3.0 | |
| pandas | |
| google-cloud-aiplatform>=1.108.0 | |
| pydantic==2.11.7 | |
| cloudpickle==3.1.1 | |
| requests | |
| google-generativeai | |
| google-cloud-aiplatform==1.121.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import asyncio | |
| # THE FIX: Add the vertexai import | |
| import vertexai | |
| from google.adk.sessions import InMemorySessionService | |
| from google.adk.runners import Runner | |
| from google.genai import types | |
| # --- Import the agent you want to test --- | |
| from agent.agent import root_agent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import vertexai | |
| from vertexai import agent_engines | |
| from vertexai.preview import reasoning_engines | |
| # --- Import your root agent object directly --- | |
| # This assumes your agent code is in a folder named 'agent' | |
| # and the main agent object is 'root_agent' in 'agent/agent.py' | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from . import agent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # In timesheet/agent.py | |
| import os | |
| from google.adk.agents import Agent | |
| from .tools import get_live_leave_data_tool, get_timesheet_data_tool | |
| os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "TRUE" | |
| os.environ["GOOGLE_CLOUD_PROJECT"] = "agentspace-enterprise" | |
| os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # In timesheet/agent.py | |
| import os | |
| from google.adk.agents import Agent | |
| from .tools import get_live_leave_data_tool, get_timesheet_data_tool | |
| os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "TRUE" | |
| os.environ["GOOGLE_CLOUD_PROJECT"] = "agentspace-enterprise" | |
| os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # deploy.py | |
| import os | |
| import vertexai | |
| from vertexai import agent_engines | |
| from vertexai.preview import reasoning_engines | |
| # --- IMPORTANT --- | |
| from timesheet.agent import root_agent | |
| # --- Configuration --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| google-cloud-bigquery | |
| google-adk | |
| pandas | |
| google-cloud-aiplatform | |
| pydantic | |
| cloudpickle | |
| requests | |
| google-genai>=0.3.0 | |
| urllib3 | |
| fastapi |
OlderNewer