Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to PagerDuty

Scalekit connector
Open markdown

The PagerDuty connector lets your AI agent act in each user's PagerDuty account. Each user signs in to PagerDuty once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 71 tools.

Tools
71
What they doRead · write · destructive
35 · 26 · 1035 read26 write10 destructive
Users sign in with
OAuth app
Your own PagerDuty app

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the PagerDuty connection

    In AgentKit > Connections, create a PagerDuty connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    PagerDuty connections use your own OAuth app. Register one with PagerDuty and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the PagerDuty connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'pagerduty'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize PagerDuty:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'pagerduty_abilities_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • pagerduty_abilities_listList the account's enabled feature abilities (plan and entitlement flags).Read-only

    List Abilities

    List the account's enabled feature abilities (plan and entitlement flags). Useful for an agent to check whether a feature is available before calling a gated endpoint.

    Inputs

    This tool takes no inputs.

  • pagerduty_audit_records_listList audit trail records — who did what, when — filterable by actor, action, root resource type, and time range.Read-only

    List Audit Records

    List audit trail records — who did what, when — filterable by actor, action, root resource type, and time range. Defaults to the past 24 hours if no date range is given; the range cannot span more than 31 days.

    Inputs

    actionsstring
    Comma-separated list of actions to filter by. Options: create, update, delete.
    actor_idstring
    Only return records whose actor has this ID. Must be qualified by also providing actor_type.
    actor_typestring
    Only return records whose actor is of this type.one of user_referenceapi_key_referenceapp_reference
    cursorstring
    Pagination cursor. Provide the next_cursor value from a previous response to fetch the next page.
    limitinteger
    The maximum number of records to return.
    method_truncated_tokenstring
    Only return records whose method has this truncated token. Must be qualified by also providing method_type.
    method_typestring
    Only return records performed via this method.one of browseroauthapi_tokenidentity_providerother
    root_resource_typesstring
    Comma-separated list of resource types to filter by. Options: users, teams, schedules, escalation_policies, services, ip_allow_lists.
    sincestring
    The start of the date range to search. Defaults to now() - 24 hours if omitted.
    untilstring
    The end of the date range to search. Defaults to now() if omitted. May not be more than 31 days after since.
  • pagerduty_business_services_listList business services — capabilities or products that span multiple technical services and are owned by teams — with standard offset pagination.Read-only

    List Business Services

    List business services — capabilities or products that span multiple technical services and are owned by teams — with standard offset pagination.

    Inputs

    limitinteger
    The number of results to return per page.
    offsetinteger
    Offset to start pagination search results.
    totalboolean
    Set to true to populate the total field in the pagination response, at the cost of slower response times.
  • pagerduty_change_events_listList change events (deploys, config changes, and other events sent via the Change Events API) so they can be correlated in time with incidents.Read-only

    List Change Events

    List change events (deploys, config changes, and other events sent via the Change Events API) so they can be correlated in time with incidents. Filterable by team, integration, and date range.

    Inputs

    integration_idsstring
    Comma-separated list of integration IDs. Only change events from these integrations are returned.
    limitinteger
    The number of results to return per page.
    offsetinteger
    Offset to start pagination search results.
    sincestring
    The start of the date range to search, as a UTC ISO 8601 datetime string.
    team_idsstring
    Comma-separated list of team IDs. Only change events related to these teams are returned. Account must have the teams ability.
    totalboolean
    Set to true to populate the total field in the pagination response, at the cost of slower response times.
    untilstring
    The end of the date range to search, as a UTC ISO 8601 datetime string.
  • pagerduty_escalation_policies_listList escalation policies in PagerDuty.Read-only

    List Escalation Policies

    List escalation policies in PagerDuty. Supports filtering by query, user, team, and includes.

    Inputs

    includestring
    Additional resources to include. Options: services, teams, targets.
    limitinteger
    The number of results per page. Maximum 100.
    offsetinteger
    Offset to start pagination search results.
    querystring
    Filters the results by name.
    sort_bystring
    Used to specify a field to sort the response on. Options: name, name:asc, name:desc.
    team_idsstring
    Comma-separated list of team IDs to filter escalation policies by.
    user_idsstring
    Comma-separated list of user IDs to filter escalation policies for.
  • pagerduty_escalation_policy_getGet details of a specific PagerDuty escalation policy by its ID.Read-only

    Get Escalation Policy

    Get details of a specific PagerDuty escalation policy by its ID.

    Inputs

    idstringrequired
    The ID of the escalation policy to retrieve.
    includestring
    Additional resources to include. Options: services, teams, targets.
  • pagerduty_incident_alert_getGet detailed information about a single alert on a PagerDuty incident.Read-only

    Get Incident Alert

    Get detailed information about a single alert on a PagerDuty incident.

    Inputs

    alert_idstringrequired
    The unique PagerDuty alert ID.
    idstringrequired
    The unique PagerDuty incident ID.
  • pagerduty_incident_alerts_listList alerts for a specific PagerDuty incident.Read-only

    List Incident Alerts

    List alerts for a specific PagerDuty incident. Supports filtering by status and alert key.

    Inputs

    idstringrequired
    The unique PagerDuty incident ID.
    alert_keystring
    Filter alerts by their deduplication key.
    includestring
    Comma-separated list of resources to sideload. Options: services, first_trigger_log_entries, incidents.
    limitinteger
    Number of results per page (max 100).
    offsetinteger
    Number of records to skip for pagination.
    sort_bystring
    Field to sort results by, e.g. created_at:desc.
    statusesstring
    Comma-separated list of statuses to filter by. Options: triggered, resolved.