> ## 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 Docs

> Give agents access to Google Docs documents.

The `@guildai-services/guildai~google-docs` package gives your agents access to Google Docs documents through Guild's Google Docs 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 Docs">Click **Google Docs** and authorize with your Google account.</Step>
</Steps>

## Usage

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

export default llmAgent({
  description: "An agent that reads and writes Google Docs",
  tools: { ...googleDocsTools },
})
```

### Selecting specific tools

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

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

export default llmAgent({
  description: "An agent that summarizes documents",
  tools: {
    ...pick(googleDocsTools, [
      "google_docs_documents_get",
      "google_docs_documents_batch_update",
    ]),
  },
})
```
