Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Persona

Scalekit connector
Open markdown

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

Tools
57
What they doRead · write · destructive
24 · 31 · 224 read31 write2 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 Persona connection

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

    Each user opens the link once and enters their Persona 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
  • persona_account_getGet one account with its fields and related objects.Read-only

    Get Account

    Get one account with its fields and related objects. Returns data (id, attributes, relationships). Get account IDs (act_...) from persona_accounts_list or persona_accounts_search.

    Inputs

    account_idstringrequired
    Account ID. Example: act_ABC123def456GHI789jkl012
  • persona_accounts_listList accounts (your end users in Persona), optionally filtered by reference ID.Read-only

    List Accounts

    List accounts (your end users in Persona), optionally filtered by reference ID. Returns data (a list of records with id, attributes, relationships). Use persona_accounts_search for complex queries.

    Inputs

    filter_reference_idstring
    Filter accounts by reference ID. Can be a single reference ID or an array of reference IDs. Example: user-1234
    page_afterstring
    Pagination cursor: return objects after this object ID (the last ID of the previous page). Example: inq_ABC123def456GHI789jkl012
    page_beforestring
    Pagination cursor: return objects before this object ID. Example: inq_ABC123def456GHI789jkl012
    page_sizeinteger
    Number of objects per page (1-100, default 10). Example: 25
  • persona_case_getGet one case with its status, assignee and attached objects.Read-only

    Get Case

    Get one case with its status, assignee and attached objects. Returns data (type, id, attributes, relationships). Get case IDs from persona_cases_list or persona_cases_search.

    Inputs

    case_idstringrequired
    Case ID. Example: case_ABC123def456GHI789jkl012
  • persona_cases_listList review cases, filtered by status, template, account, inquiry or report.Read-only

    List Cases

    List review cases, filtered by status, template, account, inquiry or report. Returns data (a list of records with type, id, attributes, relationships). Use persona_cases_search for complex queries.

    Inputs

    filter_account_idstring
    Filter cases by account ID. Example: act_ABC123def456GHI789jkl012
    filter_case_template_idstring
    Filter cases by case template ID. Example: ctmpl_ABC123def456GHI789jkl012
    filter_inquiry_idstring
    Filter cases by inquiry ID. Example: inq_ABC123def456GHI789jkl012
    filter_reference_idstring
    Filter cases by reference ID. Example: user-1234
    filter_report_idstring
    Filter cases by report ID. Example: example
    filter_statusstring
    Filter cases by status. Example: open
    page_afterstring
    Pagination cursor: return objects after this object ID (the last ID of the previous page). Example: inq_ABC123def456GHI789jkl012
    page_beforestring
    Pagination cursor: return objects before this object ID. Example: inq_ABC123def456GHI789jkl012
    page_sizeinteger
    Number of objects per page (1-100, default 10). Example: 25
  • persona_document_getGet one document with its extracted fields and files.Read-only

    Get Document

    Get one document with its extracted fields and files. Returns data (type, id, attributes, relationships). Document IDs appear in an inquiry's relationships (persona_inquiry_get).

    Inputs

    document_idstringrequired
    Document ID. Example: doc_ABC123def456GHI789jkl012
  • persona_event_getGet one event with its payload.Read-only

    Get Event

    Get one event with its payload. Returns data (id, attributes). Get event IDs from persona_events_list.

    Inputs

    event_idstringrequired
    Event ID. Example: evt_ABC123def456GHI789jkl012