Skip to content

strands-google

strands-google is a universal Google API integration tool that provides access to 200+ Google APIs (Gmail, Drive, Calendar, YouTube, Sheets, Docs, and more) directly from your Strands agent.

Terminal window
pip install strands-google
from strands import Agent
from strands_google import use_google, gmail_send, gmail_reply
agent = Agent(tools=[use_google, gmail_send, gmail_reply])
# Send an email
agent("Send an email to friend@example.com saying hello")
# Search Gmail
agent("Find all unread emails from last week")
# List Google Drive files
agent("Show me my recent Drive files")
# List calendar events
agent("What meetings do I have today?")
  • Universal Google API Access: Gmail, Drive, Calendar, YouTube, Sheets, Docs, and 200+ more via the Discovery API
  • Flexible Authentication: OAuth 2.0, Service Accounts, and API Keys
  • Gmail Helpers: Easy email sending and replying with automatic encoding
  • Dynamic Scopes: Configure OAuth scopes on-the-fly
  • Safety Prompts: Mutative operations require confirmation by default
Terminal window
GOOGLE_OAUTH_CREDENTIALS=~/gmail_token.json # OAuth token path
GOOGLE_APPLICATION_CREDENTIALS=~/service-key.json # Service account path
GOOGLE_API_KEY=your_api_key # API key for public APIs
GOOGLE_API_SCOPES=gmail.readonly,drive.file # Default OAuth scopes

Run the authentication helper to set up OAuth:

Terminal window
python -m strands_google.google_auth