Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Algodocs

Scalekit connector
Open markdown

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

Tools
7
What they doRead · write · destructive
5 · 2 · 05 read2 write0 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 Algodocs connection

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

    Each user opens the link once and enters their Algodocs 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
  • algodocs_extracted_data_getGet the extraction result for one uploaded document.Read-only

    Get Extracted Data for Document

    Get the extraction result for one uploaded document. Returns a list with one record per page or split record, each with documentId, fileName, folderId, processedAt, pageNumber, totalPages, download links (mediaOriginal, mediaExcel, mediaJson, mediaXml, mediaTxt, mediaCsv) and data holding the extractor's fields. Poll until data is filled; data.error is set if the document was not recognized. Use algodocs_extracted_data_list for all documents of an extractor.

    Inputs

    document_idstringrequired
    ID of the document, returned by the upload tools (a number such as 182608). Example: 182608.
  • algodocs_extracted_data_listList extraction results for every document processed by an extractor, optionally by folder or upload date.Read-only

    List Extracted Data

    List extraction results for every document processed by an extractor, optionally by folder or upload date. Returns a list of records with documentId, fileName, folderId, timestamps, download links and data. Use algodocs_extracted_data_get for one document.

    Inputs

    extractor_idstringrequired
    ID of the extractor whose results to list, from algodocs_extractors_list. Example: 6d86215bf9cb4fc6ac1f6967.
    datestring
    Only documents uploaded after this date (YYYY-MM-DD). Example: 2026-10-01.
    folder_idstring
    Only documents in this folder, from algodocs_folders_list. Example: 078f5vn8ocoy.
    limitinteger
    Maximum records to return. Defaults to 10000. Example: 50.
  • algodocs_extractors_listList the extractors on the account (each one knows which fields to pull from a document type, such as invoices or bank statements).Read-only

    List Extractors

    List the extractors on the account (each one knows which fields to pull from a document type, such as invoices or bank statements). Returns each extractor's id and name. Use an id as extractor_id when uploading or reading extracted data.

    Inputs

    This tool takes no inputs.

  • algodocs_folders_listList the folder tree that organizes uploaded documents.Read-only

    List Folders

    List the folder tree that organizes uploaded documents. Returns each folder's id, parentId (null for the root) and name. Use an id as folder_id when uploading or to filter extracted data.

    Inputs

    This tool takes no inputs.

  • algodocs_me_getGet the Algodocs account tied to the API key.Read-only

    Get Current User

    Get the Algodocs account tied to the API key. Returns fullName and email. Use this to check the connection.

    Inputs

    This tool takes no inputs.

  • algodocs_document_upload_base64Upload a PDF or image as base64-encoded content and extract data from it with the given extractor.Write

    Upload Document as Base64

    Upload a PDF or image as base64-encoded content and extract data from it with the given extractor. Returns the new document's id, fileSize, fileMD5CheckSum and uploadedAt. Use algodocs_document_upload_url when the file is at a public URL. Poll algodocs_extracted_data_get with the id. Uses page credits.

    Inputs

    extractor_idstringrequired
    ID of the extractor that should process the document, from algodocs_extractors_list. Example: 6d86215bf9cb4fc6ac1f6967.
    file_base64stringrequired
    The file's content, base64-encoded, without a data: prefix. Example: JVBERi0xLjcKJeLjz9MK...
    filenamestringrequired
    Name to store the document under, with its extension. Example: invoice.pdf.
    folder_idstringrequired
    ID of the folder to store the document in, from algodocs_folders_list. Example: c40daa5550d9.
  • algodocs_document_upload_urlHave Algodocs fetch a PDF or image from a public URL and extract data from it with the given extractor.Write

    Upload Document from URL

    Have Algodocs fetch a PDF or image from a public URL and extract data from it with the given extractor. Returns the new document's id, fileSize, fileMD5CheckSum and uploadedAt. Processing is asynchronous: poll algodocs_extracted_data_get with the id until data is filled. Uses page credits.

    Inputs

    extractor_idstringrequired
    ID of the extractor that should process the document, from algodocs_extractors_list. Example: 6d86215bf9cb4fc6ac1f6967.
    folder_idstringrequired
    ID of the folder to store the document in, from algodocs_folders_list. Example: c40daa5550d9.
    urlstringrequired
    Public URL of the PDF or image to fetch and process. Example: https://api.algodocs.com/content/SampleInvoice.pdf.