Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to ngrok

Scalekit connector
Open markdown

The ngrok connector lets your AI agent act in each user's ngrok account. Each user connects their own ngrok access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 59 tools.

Tools
59
What they doRead · write · destructive
29 · 19 · 1129 read19 write11 destructive
Users sign in with

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

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

  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 = 'ngrok'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize ngrok:', 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: 'ngrok_agent_ingresses_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their ngrok credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • ngrok_agent_ingress_getGet one agent ingress by ID.Read-only

    Get Agent Ingress

    Get one agent ingress by ID. Returns the agent ingress with domain, ns_targets, region domains and certificate status. Use this when you know the ID. Use ngrok_agent_ingresses_list to find it.

    Inputs

    idstringrequired
    a resource identifier. Example: agin_2nGsUw4HfJ1vXq3bZt9eL8CkYdR.
  • ngrok_agent_ingresses_listList agent ingresses in the ngrok account, newest first, optionally filtered.Read-only

    List Agent Ingresses

    List agent ingresses in the ngrok account, newest first, optionally filtered. filter is a CEL expression over obj, e.g. obj.metadata.contains('prod'). Returns a page of agent ingresses with next_page_uri; pass the last ID as before_id for the next page. Use this to browse agent ingresses. Use ngrok_agent_ingress_get for one by ID.

    Inputs

    before_idstring
    Expects a resource ID as its input. Returns earlier entries in the result set, sorted by ID. Example: ep_2nGs6EdcBNoD0eNMQnVJBUyXN4l.
    filterstring
    A CEL expression to filter the list results. Supports logical and comparison operators to match on fields such as id, metadata, created_at, and more. See ngrok API Filtering for syntax and field details: https://ngrok.com/docs/api/api-filtering. Filterable fields: id, created_at, description, metadata, domain. Example: obj.metadata.contains('sk-test')
    limitstring
    Constrains the number of results in the dataset. See the API Overview (https://ngrok.com/docs/api/index#pagination) for details. Example: 25.
  • ngrok_api_key_getGet one api key by ID.Read-only

    Get API Key

    Get one api key by ID. Returns the API key with description, metadata and owner (the token itself is not returned). Use this when you know the ID. Use ngrok_api_keys_list to find it.

    Inputs

    idstringrequired
    a resource identifier. Example: ak_2nGsHlBhZxvM4ZfyEtUsUoVZ0bC.
  • ngrok_api_keys_listList API keys in the ngrok account, newest first, optionally filtered.Read-only

    List API Keys

    List API keys in the ngrok account, newest first, optionally filtered. filter is a CEL expression over obj, e.g. obj.metadata.contains('prod'). Returns a page of API keys with next_page_uri; pass the last ID as before_id for the next page. Use this to browse API keys. Use ngrok_api_key_get for one by ID.

    Inputs

    before_idstring
    Expects a resource ID as its input. Returns earlier entries in the result set, sorted by ID. Example: ep_2nGs6EdcBNoD0eNMQnVJBUyXN4l.
    filterstring
    A CEL expression to filter the list results. Supports logical and comparison operators to match on fields such as id, metadata, created_at, and more. See ngrok API Filtering for syntax and field details: https://ngrok.com/docs/api/api-filtering. Filterable fields: id, description, metadata, owner_id, created_at. Example: obj.metadata.contains('sk-test')
    limitstring
    Constrains the number of results in the dataset. See the API Overview (https://ngrok.com/docs/api/index#pagination) for details. Example: 25.
  • ngrok_credential_getGet one credential by ID.Read-only

    Get Credential

    Get one credential by ID. Returns the credential with description, metadata, acl and owner (the token itself is not returned). Use this when you know the ID. Use ngrok_credentials_list to find it.

    Inputs

    idstringrequired
    a resource identifier. Example: cr_2nGsF5K8pTUNlzkHCa0BQ1jwpqm.
  • ngrok_credentials_listList credentials in the ngrok account, newest first, optionally filtered.Read-only

    List Credentials

    List credentials in the ngrok account, newest first, optionally filtered. filter is a CEL expression over obj, e.g. obj.metadata.contains('prod'). Returns a page of credentials with next_page_uri; pass the last ID as before_id for the next page. Use this to browse credentials. Use ngrok_credential_get for one by ID.

    Inputs

    before_idstring
    Expects a resource ID as its input. Returns earlier entries in the result set, sorted by ID. Example: ep_2nGs6EdcBNoD0eNMQnVJBUyXN4l.
    filterstring
    A CEL expression to filter the list results. Supports logical and comparison operators to match on fields such as id, metadata, created_at, and more. See ngrok API Filtering for syntax and field details: https://ngrok.com/docs/api/api-filtering. Filterable fields: id, description, metadata, owner_id, acl, created_at. Example: obj.metadata.contains('sk-test')
    limitstring
    Constrains the number of results in the dataset. See the API Overview (https://ngrok.com/docs/api/index#pagination) for details. Example: 25.
  • ngrok_endpoint_getGet one endpoint by ID.Read-only

    Get Endpoint

    Get one endpoint by ID. Returns the endpoint with url, type (agent or cloud), proto, traffic_policy, bindings, tunnel or edge reference and timestamps. Use this when you know the ID. Use ngrok_endpoints_list to find it.

    Inputs

    idstringrequired
    a resource identifier. Example: ep_2nGs6EdcBNoD0eNMQnVJBUyXN4l.
  • ngrok_endpoints_listList endpoints in the ngrok account, newest first, optionally filtered.Read-only

    List Endpoints

    List endpoints in the ngrok account, newest first, optionally filtered. filter is a CEL expression over obj, e.g. obj.metadata.contains('prod'). Returns a page of endpoints with next_page_uri; pass the last ID as before_id for the next page. Use this to browse endpoints. Use ngrok_endpoint_get for one by ID. Agent endpoints started by the ngrok agent appear here too.

    Inputs

    before_idstring
    Expects a resource ID as its input. Returns earlier entries in the result set, sorted by ID. Example: ep_2nGs6EdcBNoD0eNMQnVJBUyXN4l.
    filterstring
    A CEL expression to filter the list results. Supports logical and comparison operators to match on fields such as id, metadata, created_at, and more. See ngrok API Filtering for syntax and field details: https://ngrok.com/docs/api/api-filtering. Filterable fields: id, url, type, pooling_enabled, region, scheme, description, metadata, name, created_at, principal.id, bindings. Example: obj.metadata.contains('sk-test')
    limitstring
    Constrains the number of results in the dataset. See the API Overview (https://ngrok.com/docs/api/index#pagination) for details. Example: 25.