Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Ragie

Scalekit connector
Open markdown

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

Tools
32
What they doRead · write · destructive
18 · 11 · 318 read11 write3 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 Ragie connection

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

    Each user opens the link once and enters their Ragie 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
  • ragie_connection_getFetch one connection by id.Read-only

    Get Connection

    Fetch one connection by id. Returns id, name, type, source, enabled flag, disabled_by_system reason, page_limit, sync_filter, last_synced_at, syncing flag and partition. Use ragie_connection_get for one connection's settings. Use ragie_connection_stats_get for document and page counts. Requires a connection id from ragie_connections_list.

    Inputs

    connection_idstringrequired
    ID of the connection. Get it from ragie_connections_list.
  • ragie_connection_source_types_listList the data-source types Ragie can connect to.Read-only

    List Connection Source Types

    List the data-source types Ragie can connect to. Returns a list of source types, each with source_type, display_name, icon_url and docs_url. Use ragie_connection_source_types_list to see which integrations are supported. Use ragie_connections_list for connections you already have.

    Inputs

    This tool takes no inputs.

  • ragie_connection_stats_getFetch document and page counts for a connection.Read-only

    Get Connection Stats

    Fetch document and page counts for a connection. Returns document_count and page_count. Use ragie_connection_stats_get to see how much content a connection has synced. Use ragie_connection_get for its settings. Requires a connection id from ragie_connections_list.

    Inputs

    connection_idstringrequired
    ID of the connection. Get it from ragie_connections_list.
  • ragie_connections_listList the data-source connections (such as Google Drive, Notion or Slack) in your Ragie account.Read-only

    List Connections

    List the data-source connections (such as Google Drive, Notion or Slack) in your Ragie account. Returns connections with id, name, type, source, enabled flag, last_synced_at, syncing flag and partition, plus a pagination object. Use ragie_connections_list to find a connection id. Use ragie_connection_get for one connection's details.

    Inputs

    cursorstring
    Opaque pagination cursor. Pass the next_cursor value from the previous response to fetch the next page; omit for the first page.
    filterstring
    Metadata filter as a JSON string, matched against connection metadata. Example: {"team": {"$eq": "sales"}}.
    page_sizeinteger
    Number of items per page, from 1 to 100. Defaults to 10.default 10
    partitionstring
    Partition to scope the request to. If omitted, the request is scoped to the default partition.
  • ragie_document_chunk_getFetch a single chunk of a document by chunk id.Read-only

    Get Document Chunk

    Fetch a single chunk of a document by chunk id. Returns the chunk id, index, text, metadata, links and any modality data such as word-level timestamps for audio. Use ragie_document_chunk_get when you have a chunk id from ragie_retrieve. Use ragie_document_chunks_list to page through all chunks. Requires both a document id and a chunk id.

    Inputs

    chunk_idstringrequired
    ID of the chunk. Get it from ragie_retrieve or ragie_document_chunks_list.
    document_idstringrequired
    ID of the document. Get it from ragie_documents_list or from the response of a create tool.
    partitionstring
    Partition to scope this request to. Omit to use the account default (the default partition for accounts created after 2025-01-09; older accounts without strict partition scoping search all partitions). Partition names are lowercase alphanumeric and may include _ and -.
  • ragie_document_chunks_listList the chunks of one document, optionally limited to a range of chunk indexes.Read-only

    List Document Chunks

    List the chunks of one document, optionally limited to a range of chunk indexes. Returns chunks with id, index, text, metadata and links, plus a pagination object with next_cursor and total_count. Use ragie_document_chunks_list to read a known document's content in order. Use ragie_retrieve to search across all documents. Requires a document id; the document must be at least indexed.

    Inputs

    document_idstringrequired
    ID of the document. Get it from ragie_documents_list or from the response of a create tool.
    cursorstring
    Opaque pagination cursor. Pass the next_cursor value from the previous response to fetch the next page; omit for the first page.
    end_indexinteger
    Inclusive index of the last chunk to list. If only start_index is given, at most one chunk (matching start_index) is returned. Omit both to list all chunks.
    page_sizeinteger
    Number of items per page, from 1 to 100. Defaults to 10.default 10
    partitionstring
    Partition to scope this request to. Omit to use the account default (the default partition for accounts created after 2025-01-09; older accounts without strict partition scoping search all partitions). Partition names are lowercase alphanumeric and may include _ and -.
    start_indexinteger
    Inclusive index of the first chunk to list. If only end_index is given, at most one chunk (matching end_index) is returned. Omit both to list all chunks.
  • ragie_document_getFetch one document by id.Read-only

    Get Document

    Fetch one document by id. Returns the document id, name, status, metadata, partition, errors, chunk_count, external_id, page_count and created and updated timestamps. Use ragie_document_get to check a document's processing status. Use ragie_document_summary_get for its summary. Requires a document id from ragie_documents_list or a create tool.

    Inputs

    document_idstringrequired
    ID of the document. Get it from ragie_documents_list or from the response of a create tool.
    partitionstring
    Partition to scope this request to. Omit to use the account default (the default partition for accounts created after 2025-01-09; older accounts without strict partition scoping search all partitions). Partition names are lowercase alphanumeric and may include _ and -.
  • ragie_document_summary_getFetch the generated summary of a document.Read-only

    Get Document Summary

    Fetch the generated summary of a document. Returns document_id and summary text. Use ragie_document_summary_get for a quick overview. Use ragie_document_chunks_list for the full content. The summary is available only once the document status is summary_indexed or ready.

    Inputs

    document_idstringrequired
    ID of the document. Get it from ragie_documents_list or from the response of a create tool.
    partitionstring
    Partition to scope this request to. Omit to use the account default (the default partition for accounts created after 2025-01-09; older accounts without strict partition scoping search all partitions). Partition names are lowercase alphanumeric and may include _ and -.