This runsheet includes the essential commands and steps required to run the timesheet agent locally.
- Python 3.8+ (required to run the agent)
- Git (to clone the repository)
- Google Cloud Authentication (required for Vertex AI access)
Note: If you're using Google Cloud Shell, it comes with Python, Git, and gcloud CLI pre-installed and pre-authenticated.
⚠️ IMPORTANT: Authentication Required - Click to expand authentication options
By default this agent uses Vertex AI API and requires Google Cloud authentication. Choose ONE of the following methods:
# macOS with Homebrew:
brew install google-cloud-sdk
# Windows with Chocolatey:
choco install gcloudsdk
# Windows with Scoop:
scoop bucket add extras
scoop install gcloud
# Or download installer from: https://cloud.google.com/sdk/docs/install# Authenticate with Google Cloud
gcloud auth application-default login
# Set your project (replace with your actual project ID)
gcloud config set project YOUR_PROJECT_ID- Create a service account in Google Cloud Console
- Download the JSON key file
- Set the environment variable:
Linux/macOS:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-key.json"Windows (Command Prompt):
set GOOGLE_APPLICATION_CREDENTIALS=C:\path\to\your\service-account-key.jsonWindows (PowerShell):
$env:GOOGLE_APPLICATION_CREDENTIALS="C:\path\to\your\service-account-key.json"For enterprise environments using external identity providers, follow the Workload Identity Federation guide.
git clone https://github.com/yashmehta10/timesheet-agent-workshop.git
cd timesheet-agent-workshoppython3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtCreate a file at timesheet_agent/.env based on the template below. Ensure you add your actual GOOGLE_CLOUD_PROJECT ID:
GOOGLE_GENAI_USE_VERTEXAI=TRUE
GOOGLE_CLOUD_PROJECT={your-actual-project-id}
GOOGLE_CLOUD_LOCATION=us-central1
TIMESHEET_DB_PATH=timesheet_agent/database/timesheet.db
🔍 How to find your Project ID:
- Google Cloud Console: Look at the top of any GCP page
- Command line:
gcloud config get-value project
If you want to customize, update the timesheet_schema.sql file:
INSERT INTO employees (first_name, last_name, email) VALUES
('<your first name>', '<your last name>', '<your email>'); -- employee_id will be 1# Initialize database schema and sample data
cd timesheet_agent/database
sqlite3 timesheet.db < sql/timesheet_schema.sql # Creates tables and relationships
sqlite3 timesheet.db < sql/read_data.sql # Inserts sample data for employees, projects, and assignments📖 Detailed schema: See timesheet_agent/database/sql/timesheet_schema.sql for complete schema definitions, constraints, and sample data.
Navigate to the root directory (timesheet-agent-workshop) using cd ../.. if you are still in the database folder.
adk webIf you see errors like "DefaultCredentialsError" or "Your default credentials were not found":
- Verify authentication:
gcloud auth list - Re-authenticate:
gcloud auth application-default login - Check project setting:
gcloud config get-value project - Verify environment variables: Check your
.envfile has the correct project ID
- Missing project ID: Ensure
GOOGLE_CLOUD_PROJECTin.envmatches your actual GCP project - Vertex AI not enabled: Enable the Vertex AI API in your Google Cloud project
- Billing not enabled: Ensure billing is enabled for your Google Cloud project
🎯 Ready to go! Your timesheet agent should now be running at http://localhost:8000