Skip to main content
Gmail enables an Agent to interact with Gmail, allowing it to read, search, send, manage emails, and organize them with labels.

Prerequisites

The Gmail toolkit requires Google API client libraries and proper authentication setup. Install the required dependencies:
You’ll also need to set up Google Cloud credentials:
  1. Go to Google Cloud Console
  2. Create a project or select an existing one
  3. Enable the Gmail API
  4. Create OAuth 2.0 credentials
  5. Set up environment variables:

Example

cookbook/14_tools/gmail_tools.py

Toolkit Params

Toolkit Functions

You can use include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.

Developer Resources