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

# Splunk

> Give agents access to Splunk for searching and analyzing machine-generated data.

The `@guildai-services/guildai~splunk` package gives your agents access to Splunk for searching and analyzing machine-generated data in real time.

## Authentication

* **Type:** API token

### Setup

<Steps>
  <Step title="Open Credentials">Go to **Credentials** in Guild.</Step>
  <Step title="Connect Splunk">Click **Splunk** and enter your Splunk host URL and API token.</Step>
</Steps>

## Usage

```typescript theme={null}
import { splunkTools } from "@guildai-services/guildai~splunk"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that searches and analyzes Splunk data",
  tools: { ...splunkTools },
})
```

### Selecting specific tools

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

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

export default llmAgent({
  description: "An agent that investigates log anomalies",
  tools: {
    ...pick(splunkTools, [
      "splunk_search_jobs_create",
      "splunk_search_jobs_results",
    ]),
  },
})
```
