Skip to content

Instantly share code, notes, and snippets.

View deepthinarayanks's full-sized avatar

deepthinarayanks

View GitHub Profile
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,
)
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)
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
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
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:
from . import agent
# 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"
# 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"
# 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 ---
google-cloud-bigquery
google-adk
pandas
google-cloud-aiplatform
pydantic
cloudpickle
requests
google-genai>=0.3.0
urllib3
fastapi