> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.tools.experimental.google.drive.GoogleDriveToolkit

<h2 id="autogen.tools.experimental.google.drive.GoogleDriveToolkit" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">GoogleDriveToolkit</span>
</h2>

```python theme={null}
GoogleDriveToolkit(
    *,
    credentials: Credentials,
    download_folder: Path | str,
    exclude: list[Literal['list_drive_files_and_folders', 'download_file_from_drive']] | None = None,
    api_version: str = 'v3'
)
```

A tool map for Google Drive.<br />Initialize the Google Drive tool map.<br />

<b>Parameters:</b>

| Name              | Description                                                                                                                              |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `credentials`     | **Type:** Credentials                                                                                                                    |
| `download_folder` | **Type:** pathlib.Path \| str                                                                                                            |
| `exclude`         | **Type:** list\[typing.Literal\['list\_drive\_files\_and\_folders', 'download\_file\_from\_drive']] \| None<br /><br />**Default:** None |
| `api_version`     | **Type:** str<br /><br />**Default:** 'v3'                                                                                               |

### Static Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### recommended\_scopes

```python theme={null}
recommended_scopes() -> list[str]
```

Return the recommended scopes manatory for using tools from this tool map.

<br />

### Instance Attributes

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### tools

<br />

Get the list of tools in the set.

### Instance Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### get\_tool

```python theme={null}
get_tool(self, tool_name: str) -> Tool
```

Get a tool from the set by name.<br />

<b>Parameters:</b>

| Name        | Description                                           |
| ----------- | ----------------------------------------------------- |
| `tool_name` | The name of the tool to get.<br /><br />**Type:** str |

<b>Returns:</b>

| Type                                           | Description                         |
| ---------------------------------------------- | ----------------------------------- |
| [Tool](/docs/api-reference/autogen/tools/Tool) | Tool: The tool with the given name. |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### register\_for\_execution

```python theme={null}
register_for_execution(self, agent: ConversableAgent) -> 
```

Register the tools in the set with an agent for

<b>Parameters:</b>

| Name    | Description                                                                 |
| ------- | --------------------------------------------------------------------------- |
| `agent` | The agent to register the tools with.<br /><br />**Type:** ConversableAgent |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### register\_for\_llm

```python theme={null}
register_for_llm(self, agent: ConversableAgent) -> 
```

Register the tools in the set with an LLM agent.<br />

<b>Parameters:</b>

| Name    | Description                                                                     |
| ------- | ------------------------------------------------------------------------------- |
| `agent` | The LLM agent to register the tools with.<br /><br />**Type:** ConversableAgent |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### remove\_tool

```python theme={null}
remove_tool(self, tool_name: str) -> None
```

Remove a tool from the set by name.<br />

<b>Parameters:</b>

| Name        | Description                                              |
| ----------- | -------------------------------------------------------- |
| `tool_name` | The name of the tool to remove.<br /><br />**Type:** str |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### set\_tool

```python theme={null}
set_tool(self, tool: Tool) -> None
```

Set a tool in the set.<br />

<b>Parameters:</b>

| Name   | Description                                                                          |
| ------ | ------------------------------------------------------------------------------------ |
| `tool` | The tool to set.<br /><br />**Type:** [Tool](/docs/api-reference/autogen/tools/Tool) |

<br />
