Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Unstructured

Scalekit connector
Open markdown

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

Tools
30
What they doRead · write · destructive
17 · 10 · 317 read10 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 Unstructured connection

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

    Each user opens the link once and enters their Unstructured 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
  • unstructured_account_getGet the account and workspace the API key belongs to.Read-only

    Get Account

    Get the account and workspace the API key belongs to. Returns account_id and workspace_id. Use this to confirm which workspace the connection works in.

    Inputs

    This tool takes no inputs.

  • unstructured_destination_connection_check_getGet the latest connection check for a destination connector.Read-only

    Get Destination Connection Check

    Get the latest connection check for a destination connector. Returns id, status (SCHEDULED, SUCCESS or FAILURE), reason when it failed, and timestamps. Use this after unstructured_destination_connection_check_create.

    Inputs

    destination_idstringrequired
    Destination connector ID (UUID) or key. Get it from unstructured_destinations_list. Example: 7c9e1a3b-5d7f-4b2c-8e4a-6f8b0d2c4e6a
  • unstructured_destination_getGet one destination connector by ID or key.Read-only

    Get Destination Connector

    Get one destination connector by ID or key. Returns id, key, name, type, config (secrets masked), created_at and updated_at. Use unstructured_destinations_list to find the ID.

    Inputs

    destination_idstringrequired
    Destination connector ID (UUID) or key. Get it from unstructured_destinations_list. Example: 7c9e1a3b-5d7f-4b2c-8e4a-6f8b0d2c4e6a
  • unstructured_destinations_listList the workspace's destination connectors, optionally filtered by type.Read-only

    List Destination Connectors

    List the workspace's destination connectors, optionally filtered by type. Returns an array of connectors with id, key, name, type, config (secrets masked) and created_at. Use this to find a destination ID for a workflow. Use unstructured_destination_get for one connector.

    Inputs

    destination_typestring
    Only destination connectors of this type, for example astradb, couchbase, databricks_volumes, databricks_volume_delta_tables, delta_table, elasticsearch. Example: s3one of astradbcouchbasedatabricks_volumesdatabricks_volume_delta_tablesdelta_tableelasticsearchkafka-cloudmilvusmongodbmotherduckneo4jonedrivepineconepostgresredisqdrant-cloudsnowflaketeradataweaviate-cloudibm_watsonx_s3s3azuregcs
  • unstructured_job_details_getGet a job's processing details per node.Read-only

    Get Job Details

    Get a job's processing details per node. Returns processing_status, progress, node_stats (per-node document counts), summary and warning_nodes. Use this to see where documents are in the pipeline or which step failed.

    Inputs

    job_idstringrequired
    Job ID (UUID) from unstructured_workflow_run or unstructured_jobs_list. Example: 3e5a7c9b-1d2f-4a6c-8e0b-2d4f6a8c0e1d
  • unstructured_job_failed_files_listList the documents that failed in a job, with their error messages.Read-only

    List Job Failed Files

    List the documents that failed in a job, with their error messages. Returns failed_files (each document with its error), total and next_offset. Use this to debug a run that reported failures.

    Inputs

    job_idstringrequired
    Job ID (UUID) from unstructured_workflow_run or unstructured_jobs_list. Example: 3e5a7c9b-1d2f-4a6c-8e0b-2d4f6a8c0e1d
    limitinteger
    Files per page, 1 to 1000. Example: 100
    offsetinteger
    Files to skip, for paging. Example: 0
  • unstructured_job_file_status_getGet the processing status of each file in a job, with any warnings.Read-only

    Get Job File Status

    Get the processing status of each file in a job, with any warnings. Returns files (each with its id, name, status and notices) and truncated. Use this to get file IDs for unstructured_job_output_download or to review warnings.

    Inputs

    job_idstringrequired
    Job ID (UUID) from unstructured_workflow_run or unstructured_jobs_list. Example: 3e5a7c9b-1d2f-4a6c-8e0b-2d4f6a8c0e1d
    has_warningsboolean
    true returns only files with notices, false only files without. Leave empty for every file. Example: true
  • unstructured_job_getGet a job's status.Read-only

    Get Job

    Get a job's status. Returns id, workflow_id, status, runtime, created_at, failed_file_count, input_file_ids and output_node_files. Use this to poll a run. Use unstructured_job_details_get for per-node counts and unstructured_job_failed_files_list for errors.

    Inputs

    job_idstringrequired
    Job ID (UUID) from unstructured_workflow_run or unstructured_jobs_list. Example: 3e5a7c9b-1d2f-4a6c-8e0b-2d4f6a8c0e1d