# PagerDuty

This guide walks through adding PagerDuty as an Incident Management provider in DuploCloud, configuring credentials, creating a scope, and querying PagerDuty incidents through the AI agent.

***

## Step 1 — Navigate to the Incident Management Providers

Go to **AI Admin** → **Providers** → **IT**, then click the **Incident Management** tab. This lists all incident management providers connected to your account.

![Incident Management providers list](/files/loMGX4csFMdaotX2UFU6)

***

## Step 2 — Add a New Provider

Click **+ Add**. Fill in the provider details:

* **Name** — a name to identify this provider
* **Type** — select **PagerDuty**
* **Account ID** — a label to identify this account within DuploCloud

![Add Provider form](/files/1o5dd11yY1ewuSGfBn4u)

Click **Create Provider**.

***

## Step 3 — Add Credentials

The new provider opens on the **Credentials** tab. Click **+ Add** to add a credential. Fill in the credential fields:

* **API\_KEY** — your PagerDuty API key (required for reading incidents and services)
* **service\_key** — your PagerDuty service integration key (required for agents to create or trigger incidents on a service)
* **user\_email** — the email address of the PagerDuty user the agent will act as when acknowledging or resolving incidents

> **Where to find these values:** Your API key can be created in PagerDuty under **Integrations → API Access Keys**. The service integration key is found on the **Integrations** tab of a specific PagerDuty service. The user email should match a valid PagerDuty user in your account.

> **Why service\_key and user\_email matter:** When an agent resolves, acknowledges, or creates incidents — not just reads them — PagerDuty requires both a service key to target the correct service and a user email to attribute the action. Adding these credentials allows agents to take automated remediation actions, not just report incident status.

![Add Credential form with API\_KEY](/files/AIDfLrvkm6XYTOfzmjDK)

Toggle **Sensitive** on for the API key and service key to ensure they are stored securely. Click **Create** to save the credential.

***

## Step 4 — Add a Scope

Switch to the **Scope** tab and click **+ Add**. Fill in:

* **Name** — a label for this scope
* **Credential** — select the credential you just created
* **Description** — optional context for the agent

![Add Scope form](/files/oRNDPT7hP1rTfN7PzxhL)

Click **Create**. The scope appears in the list.

***

## Step 5 — Use PagerDuty in a Ticket

Go to **AI DevOps** → **HelpDesk** → **Add Ticket**. Select **generic-agent** as the agent and choose your PagerDuty scope from the scope dropdown.

![Scope dropdown with PagerDuty1 selected](/files/UF7HU2JV4TPUymIkE6UD)

Enter your request — for example, asking the agent to list all active incidents. Click **Create Ticket**.

![Ticket ready to submit](/files/JGFeBH7BB6UBPOp6A2wz)

***

## Step 6 — Agent Queries PagerDuty

The agent connects to PagerDuty using the scope credentials and retrieves the current incidents.

![Agent processing the PagerDuty request](/files/XyuZZhe9dOzzelPbokEv)

The response includes a structured summary of all incidents — ID, title, status, urgency, service, assignee, timestamps, and a direct link to each incident. The agent also offers to take action: acknowledge, resolve, or add notes.

![PagerDuty incident results](/files/tcpTNs1BM6aANYvwvru4)

![Incident details and agent follow-up offer](/files/cZD75aCfrlKVnmJCnXzN)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.duplocloud.com/docs/getting-started/integrating-providers/pagerduty.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
