Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to CustomGPT AI

Scalekit connector
Open markdown

The CustomGPT AI connector lets your AI agent act in each user's CustomGPT AI account. Each user connects their own CustomGPT AI 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
34 · 19 · 634 read19 write6 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 CustomGPT AI connection

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

    Each user opens the link once and enters their CustomGPT AI 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
  • customgpt_agent_getGet one agent's configuration and processing status.Read-only

    Get Agent

    Get one agent's configuration and processing status. Returns data (id, project_name, sitemap_path, is_chat_active, is_master, user_id, team_id, created_at, updated_at, deleted_at). Get the agent ID (projectId) from customgpt_agents_list.

    Inputs

    project_idintegerrequired
    The unique identifier of the agent to retrieve. Obtain agent IDs from the response of GET /api/v1/projects or POST /api/v1/projects. Example: 12345
  • customgpt_agent_settings_getGet an agent's full settings: persona instructions, response behavior, citations, deployment options and feature flags.Read-only

    Get Agent Settings

    Get an agent's full settings: persona instructions, response behavior, citations, deployment options and feature flags. Returns data (chatbot_avatar, chatbot_background_type, radius_styling, font_family, chatbot_background, chatbot_background_color, chatbot_color_scheme, default_prompt, example_questions, response_source). Get the agent ID (projectId) from customgpt_agents_list.

    Inputs

    project_idintegerrequired
    The unique identifier of the agent (formerly known as project). Example: 12345
  • customgpt_agent_stats_getGet an agent's usage statistics: conversations, queries, documents, words and crawl progress.Read-only

    Get Agent Stats

    Get an agent's usage statistics: conversations, queries, documents, words and crawl progress. Returns data (pages_found, pages_crawled, pages_indexed, crawl_credits_used, query_credits_used, total_queries, total_words_indexed, total_storage_credits_used). Get the agent ID (projectId) from customgpt_agents_list.

    Inputs

    project_idintegerrequired
    The unique identifier of the agent (formerly known as project). Example: 12345
  • customgpt_agents_listList the agents (projects) in the account, newest first, optionally filtered by name.Read-only

    List Agents

    List the agents (projects) in the account, newest first, optionally filtered by name. Returns data (current_page, data, first_page_url, from, last_page, last_page_url, next_page_url, path, per_page, prev_page_url). Use this to get the agent ID other tools need. Use customgpt_agent_get for one agent's status.

    Inputs

    namestring
    Filter the results by agent name. Example: Support conversation
    orderstring
    Sort direction for results. One of: asc, desc. Example: descone of ascdesc
    order_bystring
    Field to sort results by. One of: id, created_at. Example: idone of idcreated_at
    pageinteger
    Page number to retrieve. Page numbering starts at 1. Increment until the response's last_page value is reached to paginate through all results. Default: 1. Example: 1
  • customgpt_child_agents_listList the child agents assigned to a Multi-Agent.Read-only

    List Child Agents

    List the child agents assigned to a Multi-Agent. Returns data (children, total). Get the agent ID (projectId) from customgpt_agents_list.

    Inputs

    project_idintegerrequired
    The unique identifier of the Multi-Agent project. Example: 12345
  • customgpt_citation_getGet a citation's source title, description, URL and preview image.Read-only

    Get Citation

    Get a citation's source title, description, URL and preview image. Returns data (id, url, title, description, library_map_snapshot, image). Get citation IDs from a message's citations.

    Inputs

    citation_idintegerrequired
    The unique citation identifier. Example: 99001
    project_idintegerrequired
    The unique project identifier. Example: 12345
  • customgpt_citation_preview_getGet a preview of the source document behind a citation.Read-only

    Get Citation Preview

    Get a preview of the source document behind a citation. Use after customgpt_citation_get.

    Inputs

    page_idintegerrequired
    The unique identifier of the citation source to preview. Obtained from citation objects returned by the messages endpoint. Example: 445566
  • customgpt_conversation_messages_listList the prompts and agent responses in a conversation, with citations and timestamps.Read-only

    List Conversation Messages

    List the prompts and agent responses in a conversation, with citations and timestamps. Returns data (conversation, messages). Get the session ID from customgpt_conversations_list or customgpt_conversation_create.

    Inputs

    project_idintegerrequired
    The ID of the agent to get the messages for. Example: 12345
    session_idstringrequired
    The session ID of the converstaions to get the messages for. Example: f1b9aa61-1c3a-4b3e-9d3c-2f6a0e1c9d77
    include_insightsboolean
    When true, includes customer_intelligence data in the response. Example: true
    orderstring
    Sort direction for messages. One of: asc, desc. Example: descone of ascdesc
    pageinteger
    Page number to return. Example: 1