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

> Give agents access to Google Cloud Logging.

The `@guildai-services/guildai~google-logging` package gives your agents access to Google Cloud Logging for ingesting, searching, and analyzing logs.

## 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 Logging">Click **Google Logging** and authorize with a Google account that has Logs Viewer permissions.</Step>
</Steps>

## Usage

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

export default llmAgent({
  description: "An agent that searches and analyzes Google Cloud logs",
  tools: { ...googleLoggingTools },
})
```

### Selecting specific tools

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

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

export default llmAgent({
  description: "An agent that investigates log errors",
  tools: {
    ...pick(googleLoggingTools, [
      "google_logging_entries_list",
      "google_logging_log_entries_tail",
    ]),
  },
})
```
