Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to GitHub

Scalekit connector
Open markdown

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

Tools
217
What they doRead · write · destructive
106 · 76 · 35106 read76 write35 destructive
Users sign in with
OAuth app
Scalekit's or your own

What you can do

  • Read repositories: fetch repo metadata, files, commits, branches, and tags
  • Manage issues: create, update, close, and comment on issues
  • Work with pull requests: open PRs, post reviews, and merge changes
  • Search code: search across repositories by keyword, language, or file path
  • Trigger workflows: dispatch GitHub Actions workflow runs

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 GitHub connection

    In AgentKit > Connections, create a GitHub connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for GitHub, so you don't need to register an OAuth app. To show your own app on the consent screen, use your own credentials instead.

    Use your own OAuth app

    Register your Scalekit environment with the GitHub connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

    1. Set up auth redirects

      • In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find GitHub and click Create.

      • Click Use your own credentials and copy the redirect URI. It looks like https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.

        Copy redirect URI from Scalekit dashboard

      • Go to GitHub Developer Settings and open your OAuth app.

      • Under General, paste the copied URI into the Authorization callback URL field and click Save application.

        Add callback URL in GitHub OAuth app settings

    2. Get client credentials

      In GitHub Developer Settings, open your OAuth app:

      • Client ID — listed on the app’s main settings page
      • Client Secret — click Generate a new client secret if you don’t have one
    3. Add credentials in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections and open the connection you created.

      • Enter your credentials:

        • Client ID (from your GitHub OAuth app)
        • Client Secret (from your GitHub OAuth app)

        Add credentials for GitHub in Scalekit dashboard

      • Click Save.

  4. 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 = 'github'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize GitHub:', 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: 'github_gists_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
  • github_artifact_getGet a single workflow run artifact's metadata by its ID.Read-only

    Get Artifact

    Get a single workflow run artifact's metadata by its ID.

    Inputs

    artifact_idnumberrequired
    The unique identifier of the artifact
    ownerstringrequired
    The account owner of the repository
    repostringrequired
    The name of the repository
  • github_artifacts_listList artifacts produced by workflow runs in a repository.Read-only

    List Repository Artifacts

    List artifacts produced by workflow runs in a repository.

    Inputs

    ownerstringrequired
    The account owner of the repository
    repostringrequired
    The name of the repository
    namestring
    Filter artifacts by exact match on their name
    pagenumber
    Page number of the results to fetch
    per_pagenumber
    The number of results per page (max 100)
  • github_branch_getGet details of a specific branch in a GitHub repository.Read-only

    Get Branch

    Get details of a specific branch in a GitHub repository. Returns the branch name, latest commit SHA, and protection status.

    Inputs

    branchstringrequired
    The name of the branch to retrieve
    ownerstringrequired
    The account owner of the repository
    repostringrequired
    The name of the repository
  • github_branch_protection_getGet the branch protection settings currently configured for a branch.Read-only

    Get Branch Protection

    Get the branch protection settings currently configured for a branch.

    Inputs

    branchstringrequired
    The name of the branch
    ownerstringrequired
    The account owner of the repository
    repostringrequired
    The name of the repository
  • github_branches_listList all branches in a GitHub repository.Read-only

    List Branches

    List all branches in a GitHub repository. Returns branch names, commit SHAs, and protection status. Supports pagination.

    Inputs

    ownerstringrequired
    The account owner of the repository
    repostringrequired
    The name of the repository
    pageinteger
    Page number of results to return (default 1)
    per_pageinteger
    Number of results per page (max 100, default 30)
    protectedboolean
    Filter to only protected branches
  • github_check_run_getGet a single check run using its id.Read-only

    Get Check Run

    Get a single check run using its id. OAuth app tokens and personal access tokens (classic) need the repo scope for private repositories.

    Inputs

    check_run_idnumberrequired
    The unique identifier of the check run
    ownerstringrequired
    The account owner of the repository
    repostringrequired
    The name of the repository
  • github_check_runs_list_for_refList check runs for a commit ref.Read-only

    List Check Runs for a Git Reference

    List check runs for a commit ref. The ref can be a SHA, branch name, or tag name.

    Inputs

    ownerstringrequired
    The account owner of the repository
    refstringrequired
    The commit reference. Can be a commit SHA, branch name (heads/BRANCH_NAME), or tag name (tags/TAG_NAME)
    repostringrequired
    The name of the repository
    check_namestring
    Returns check runs with the specified name
    pagenumber
    Page number of results to fetch
    per_pagenumber
    Number of results per page (max 100)
    statusstring
    Returns check runs with the specified statusone of queuedin_progresscompleted
  • github_code_scanning_alerts_listList code scanning alerts for a repository.Read-only

    List Code Scanning Alerts for a Repository

    List code scanning alerts for a repository. To use this endpoint, you must have read access to the repository, and for private/internal repositories your token needs the security_events scope (public_repo is sufficient for public repositories).

    Inputs

    ownerstringrequired
    The account owner of the repository
    repostringrequired
    The name of the repository
    afterstring
    A cursor, as given in the Link response header. Only search for results after this cursor.
    assigneesstring
    Comma-separated list of user handles to filter by, or '*' for alerts with at least one assignee, or 'none' for unassigned alerts
    beforestring
    A cursor, as given in the Link response header. Only search for results before this cursor.
    directionstring
    The direction to sort the results byone of ascdesc
    pagenumber
    Page number of results to fetch
    per_pagenumber
    Number of results per page (max 100)
    prnumber
    Only list alerts for this pull request number
    refstring
    The Git reference for the results, e.g. refs/heads/main or simply main. Use refs/pull/<number>/merge for a pull request.
    severitystring
    Only list alerts with this severityone of criticalhighmediumlowwarningnoteerror
    sortstring
    The property by which to sort the resultsone of createdupdated
    statestring
    Only list alerts with this stateone of opencloseddismissedfixed
    tool_guidstring
    Only list alerts from the code scanning tool with this GUID. Cannot be used together with tool_name.
    tool_namestring
    Only list alerts from this code scanning tool. Cannot be used together with tool_guid.

Workflows

Proxy API call
const result = await actions.request({
connectionName: 'github',
identifier: 'user_123',
path: '/user',
method: 'GET',
});
console.log(result);
Execute a tool
const result = await actions.executeTool({
connector: 'github',
identifier: 'user_123',
toolName: 'github_branch_create',
toolInput: {},
});
console.log(result);