Skip to main content

Overview

OneCLI connects AI agents to PagerDuty with a REST API key. Agents can read incidents and their timelines, see who is on call, and acknowledge, resolve, or add notes to incidents. The gateway injects the key into requests to the PagerDuty API, so your agent never sees it. This suits SRE and on-call agents: triaging a page as it fires, pulling the timeline for a postmortem, or answering “who is on call for payments right now?” Connecting takes about a minute.

Connect PagerDuty

1

Create an API key in PagerDuty

PagerDuty has two kinds of REST API key. Pick the one that matches what the agent should reach.For a user key, give it a description such as OneCLI Key and select Create Token.
PagerDuty Create User Key dialog, explaining that API user keys are tied to your user account with the same level of access, a Description field filled with OneCLI Key, and Cancel and Create Token buttons.

Creating a user key in PagerDuty. It carries your own user's access.

Copy the key right away. PagerDuty shows it only once.
For an agent that only investigates, create a read-only General Access key. PagerDuty itself then refuses every write, whatever the agent tries.
2

Paste it in OneCLI

In the OneCLI dashboard, open Connections > PagerDuty, paste the key into API key, and pick your Region.
OneCLI connect window for PagerDuty, showing the setup guide link, the API key field with a link to PagerDuty's instructions, the Region dropdown set to US, and the Connect PagerDuty button.

The PagerDuty connect window in OneCLI.

Select Connect PagerDuty. OneCLI checks the key against the API in your region before saving it, so a wrong key, or a key from the other region, is rejected right away.
Agents can always call the documented base URL, https://api.pagerduty.com. For an EU account, the gateway sends each request to api.eu.pagerduty.com for you.

What agents can do

PagerDuty’s Events API (events.pagerduty.com), which triggers alerts with an integration’s routing key, uses a different credential and is not part of this connection.

Quick example

No Authorization header is needed. The gateway adds PagerDuty’s Token token= header:
For every endpoint and parameter, see the PagerDuty API reference.

Controlling access

Grant the connection to each agent that needs it, and choose per tool what runs freely, what needs approval, and what’s blocked. Writes in PagerDuty page real people. Create incident and Add responders wake someone up, and a maintenance window silences paging for a service, so put those behind approval. A good default for an SRE agent is to let it read everything freely and require approval for acknowledging or resolving incidents. Organization rules add guardrails on top. A blocked request never reaches PagerDuty. To disconnect, remove the connection in Connections > PagerDuty, then delete the key in PagerDuty under Integrations > API Access Keys (or User Settings for a user key).