> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Slides

> GoogleSlidesTools create, edit, and read Google Slides presentations, including slides, tables, and embedded videos.

**GoogleSlidesTools** enable an Agent to create, manage, and manipulate Google Slides presentations. Add slides with various layouts, insert text boxes, tables, images, and videos, read slide content, and manage slide order.

## Getting Started

**1. Install dependencies**

```shell theme={null}
uv pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib openai
```

**2. Setup Google Cloud project**

Enable the [Google Slides API](https://console.cloud.google.com/apis/enableflow?apiid=slides.googleapis.com) and [Google Drive API](https://console.cloud.google.com/apis/enableflow?apiid=drive.googleapis.com) in your Google Cloud project, then create OAuth credentials.

> **Detailed OAuth setup instructions**
>
> 1. Go To **API & Service > OAuth Consent Screen**
>
> 2. Select User Type
>    * Google Workspace user: select Internal
>    * Otherwise: select External
>
> 3. Fill in app details (App name, logo, support email, etc)
>
> 4. Select Scope
>    * Click Add or Remove Scope
>    * Select `/auth/presentations` and `/auth/drive.file`
>    * Save and continue
>
> 5. Add Test Users
>    * Click Add Users and enter the email addresses to allow during testing
>    * Only these users can access the app in "Testing" mode
>
> 6. Generate OAuth 2.0 Client ID
>    * Go to **Credentials > Create Credentials > OAuth Client ID**
>    * Select Application Type as **Desktop app**
>    * Download the JSON file

**3. Configure authentication**

**Environment Variables**

```shell theme={null}
export GOOGLE_CLIENT_ID=your_client_id_here
export GOOGLE_CLIENT_SECRET=your_client_secret_here
export GOOGLE_PROJECT_ID=your_project_id_here
```

**Credentials File**

Place the downloaded `credentials.json` in your working directory, or pass the path explicitly.

```python theme={null}
GoogleSlidesTools(credentials_path="path/to/credentials.json")
```

**Service Account**

For server/bot deployments without browser access. Create a service account at **IAM & Admin > Service Accounts**, download the JSON key file, then:

```shell theme={null}
export GOOGLE_SERVICE_ACCOUNT_FILE=/path/to/service-account-key.json
```

Or pass it directly:

```python theme={null}
GoogleSlidesTools(service_account_path="path/to/service-account.json")
```

**4. Create and run an agent**

```python cookbook/91_tools/google/slides/basic.py theme={null}
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.google.slides import GoogleSlidesTools

agent = Agent(
    name="Slides Assistant",
    model=OpenAIResponses(id="gpt-5.5"),
    tools=[GoogleSlidesTools()],
    instructions=[
        "You are a Google Slides assistant.",
        "Always call get_presentation_metadata before modifying slides.",
        "Use slide_id values returned by the API -- never guess them.",
        "Return both id and url with any additional text.",
    ],
    markdown=True,
)

agent.print_response(
    "Create a new Google Slides presentation titled 'Q3 2026 Business Review'. "
    "Then add a TITLE slide with title 'Q3 2026 Business Review' and subtitle "
    "'Prepared by the Strategy Team'.",
    stream=True,
)
```

> [!TIP]
>
> Results are capped at 20 per call by default to prevent context overflow. Increase `max_results` if your model has a larger context window.

## Toolkit Params

| Parameter | Type | Default | Description |
| - | - | - | - |
| `max_results` | `int` | `20` | Maximum results per API request to prevent context overflow |
| `creds` | `Credentials` | `None` | Pre-fetched OAuth credentials to skip auth flow |
| `credentials_path` | `str` | `None` | Path to OAuth credentials JSON file |
| `token_path` | `str` | `None` | Path to token file for storing access/refresh tokens |
| `service_account_path` | `str` | `None` | Path to service account JSON key. When set, OAuth is skipped |
| `delegated_user` | `str` | `None` | Email to impersonate when using service account auth |
| `scopes` | `List[str]` | `None` | Custom OAuth scopes (defaults to `presentations` + `drive.file`) |
| `oauth_port` | `int` | `0` | Port for OAuth authentication callback (0 = auto) |
| `login_hint` | `str` | `None` | Email to pre-select in the OAuth consent screen |
| `all` | `bool` | `False` | Master override: enable all tools including destructive ones |
| `create_presentation` | `bool` | `True` | Enable create\_presentation tool |
| `get_presentation` | `bool` | `True` | Enable get\_presentation tool |
| `list_presentations` | `bool` | `True` | Enable list\_presentations tool |
| `get_presentation_metadata` | `bool` | `True` | Enable get\_presentation\_metadata tool |
| `get_page` | `bool` | `True` | Enable get\_page tool |
| `get_slide_text` | `bool` | `True` | Enable get\_slide\_text tool |
| `read_all_text` | `bool` | `True` | Enable read\_all\_text tool |
| `get_slide_thumbnail` | `bool` | `True` | Enable get\_slide\_thumbnail tool |
| `add_slide` | `bool` | `True` | Enable add\_slide tool |
| `add_text_box` | `bool` | `True` | Enable add\_text\_box tool |
| `add_table` | `bool` | `True` | Enable add\_table tool |
| `set_background_image` | `bool` | `True` | Enable set\_background\_image tool |
| `duplicate_slide` | `bool` | `True` | Enable duplicate\_slide tool |
| `move_slides` | `bool` | `True` | Enable move\_slides tool |
| `insert_youtube_video` | `bool` | `True` | Enable insert\_youtube\_video tool |
| `insert_drive_video` | `bool` | `True` | Enable insert\_drive\_video tool |
| `delete_presentation` | `bool` | `False` | Enable delete\_presentation tool (destructive) |
| `delete_slide` | `bool` | `False` | Enable delete\_slide tool (destructive) |
| `instructions` | `str` | `None` | Custom instructions. Defaults to built-in Slides workflow guidance |
| `add_instructions` | `bool` | `True` | Inject the instructions into the agent system prompt |

## Toolkit Functions

### Presentation Management

| Function | Description |
| - | - |
| `create_presentation` | Create a blank presentation. Parameters: `title` (str) |
| `get_presentation` | Fetch full presentation metadata and content. Parameters: `presentation_id` (str), `fields` (str, optional) |
| `list_presentations` | List all accessible presentations. Parameters: `page_size` (int), `page_token` (str, optional) |
| `get_presentation_metadata` | Get lightweight metadata (title, slide count, slide IDs). Parameters: `presentation_id` (str) |

### Reading Slides

| Function | Description |
| - | - |
| `get_page` | Retrieve full content of a specific slide. Parameters: `presentation_id` (str), `page_object_id` (str) |
| `get_slide_text` | Extract text content from a single slide. Parameters: `presentation_id` (str), `page_object_id` (str) |
| `read_all_text` | Extract all text from every slide. Parameters: `presentation_id` (str) |
| `get_slide_thumbnail` | Get thumbnail image URL for a slide. Parameters: `presentation_id` (str), `slide_id` (str) |

### Creating & Modifying Slides

| Function | Description |
| - | - |
| `add_slide` | Add a slide with a layout and optional text. Parameters: `presentation_id` (str), `layout` (str), `title` (str), `subtitle` (str), `body` (str), `body_2` (str), `insertion_index` (int) |
| `add_text_box` | Create a positioned text box on a slide. Parameters: `presentation_id` (str), `slide_id` (str), `text` (str), `x` (float), `y` (float), `width` (float), `height` (float) |
| `add_table` | Create a table, optionally pre-populated. Parameters: `presentation_id` (str), `slide_id` (str), `rows` (int), `columns` (int), `content` (list\[list\[str]]) |
| `set_background_image` | Set a publicly accessible image as slide background. Parameters: `presentation_id` (str), `slide_id` (str), `image_url` (str) |
| `duplicate_slide` | Duplicate a slide (copy inserted after original). Parameters: `presentation_id` (str), `slide_id` (str) |
| `move_slides` | Reorder slides to a target position. Parameters: `presentation_id` (str), `slide_ids` (list\[str]), `insertion_index` (int) |
| `insert_youtube_video` | Embed a YouTube video on a slide. Parameters: `presentation_id` (str), `slide_id` (str), `video_id` (str), `x` (float), `y` (float), `width` (float), `height` (float) |
| `insert_drive_video` | Embed a Google Drive video on a slide. Parameters: `presentation_id` (str), `slide_id` (str), `file_id` (str), `x` (float), `y` (float), `width` (float), `height` (float) |

### Destructive Operations

These tools are **disabled by default**. Pass `delete_presentation=True` or `delete_slide=True` to enable them.

| Function | Description |
| - | - |
| `delete_presentation` | Permanently delete a presentation via Drive API. Parameters: `presentation_id` (str) |
| `delete_slide` | Remove a slide from the presentation. Parameters: `presentation_id` (str), `slide_id` (str) |

You can use `include_tools` or `exclude_tools` to modify the list of tools the agent has access to. Learn more about [selecting tools](https://agno-v2.mintlify.site/tools/selecting-tools.md).

## Cookbook Examples

The [slides cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/91_tools/google/slides) covers four scenarios:

| Example | What it demonstrates |
| - | - |
| `basic.py` | Create a presentation and add slides with layouts |
| `content_reader.py` | Read slide text and fetch slide thumbnails |
| `presentation_builder.py` | Build a multi-slide presentation with tables and text boxes |
| `media_slides.py` | Embed YouTube and Drive videos and set background images |

## Slide Layouts

The `add_slide` function supports the following Google Slides predefined layouts:

| Layout | Description |
| - | - |
| `BLANK` | Empty slide |
| `TITLE` | Title and subtitle |
| `TITLE_AND_BODY` | Title with body text |
| `TITLE_AND_TWO_COLUMNS` | Title with two body columns |
| `TITLE_ONLY` | Title only, no body placeholder |
| `SECTION_HEADER` | Large section header |
| `SECTION_TITLE_AND_DESCRIPTION` | Section title with description |
| `ONE_COLUMN_TEXT` | Single column of text |
| `MAIN_POINT` | Large main point text |
| `BIG_NUMBER` | Large number display |
| `CAPTION_ONLY` | Caption text only |

## Developer Resources

* [Source](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/google/slides.py)
* [Cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/91_tools/google/slides)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.