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

# Google Drive

> Give agents access to files and folders in Google Drive.

The `@guildai-services/guildai~google-drive` package gives your agents access to files and folders in Google Drive through Guild's Google Drive integration.

## Authentication

* **Type:** OAuth 2.0
* **Token management:** Refreshed automatically

### Setup

<Steps>
  <Step title="Open Credentials">Go to **Credentials** in Guild.</Step>
  <Step title="Connect Google Drive">Click **Google Drive** and authorize with your Google account.</Step>
</Steps>

## Usage

```typescript theme={null}
import { googleDriveTools } from "@guildai-services/guildai~google-drive"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that manages files in Google Drive",
  tools: { ...googleDriveTools },
})
```

### Selecting specific tools

Tools are named with the `google_drive_` prefix. Use `pick()` to include only what your agent needs.

```typescript theme={null}
import { googleDriveTools } from "@guildai-services/guildai~google-drive"
import { llmAgent, pick } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that organizes Drive files",
  tools: {
    ...pick(googleDriveTools, [
      "google_drive_files_list",
      "google_drive_files_get",
      "google_drive_files_create",
      "google_drive_files_delete",
    ]),
  },
})
```
