Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Mistral AI

Scalekit connector
Open markdown

The Mistral AI connector lets your AI agent act in each user's Mistral AI account. Each user connects their own Mistral AI 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
13 · 16 · 313 read16 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 Mistral AI connection

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

    Each user opens the link once and enters their Mistral 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
  • mistral_get_agentGet the full configuration of one Mistral agent, optionally at a specific version.Read-only

    Get Agent

    Get the full configuration of one Mistral agent, optionally at a specific version. Returns the agent's id, name, description, model, instructions, tools, completion_args, handoffs, metadata, version, versions and timestamps. Use this to inspect an agent before running or updating it. Use mistral_list_agents to find agent IDs.

    Inputs

    agent_idstringrequired
    ID of the agent, from mistral_list_agents. Example: ag_0195b2f2a6f97c3bb6b1c0f5e1a2d3c4.
    agent_versioninteger
    Version number or alias to get. Leave empty for the current version. Example: 2.
  • mistral_get_batch_jobGet the status and progress of one Mistral batch job, optionally with its results inline.Read-only

    Get Batch Job

    Get the status and progress of one Mistral batch job, optionally with its results inline. Returns the job's id, status, endpoint, model, request counts, errors, output_file and error_file IDs, timestamps, and outputs when inline is true. Use this to poll a job until it finishes. Download large results with mistral_get_file_signed_url on the output_file ID.

    Inputs

    job_idstringrequired
    ID of the batch job, from mistral_list_batch_jobs or mistral_create_batch_job. Example: 9c1e3b2a-5d4f-4e6a-8b7c-1d2e3f4a5b6c.
    inlineboolean
    true returns the job's results inside the response (outputs) instead of only as an output file. Useful for small jobs created with inline requests.
  • mistral_get_conversationGet the settings of one stored Mistral conversation.Read-only

    Get Conversation

    Get the settings of one stored Mistral conversation. Returns the conversation's id, name, description, model or agent_id, instructions, tools, completion_args, metadata and timestamps, but not its messages. Use this to see how a conversation is configured. Use mistral_get_conversation_history for every entry or mistral_list_conversation_messages for the messages only.

    Inputs

    conversation_idstringrequired
    ID of the conversation. Example: conv_0195b2f2a6f97c3bb6b1c0f5e1a2d3c4.
  • mistral_get_conversation_historyGet every entry of a stored Mistral conversation in the order it was added: input and output messages, function calls and results, tool executions and agent handoffs.Read-only

    Get Conversation History

    Get every entry of a stored Mistral conversation in the order it was added: input and output messages, function calls and results, tool executions and agent handoffs. Returns the conversation_id and its entries, each with id, type, role or tool details, content and timestamps. Use this to find an entry id for mistral_restart_conversation or to audit tool use. Use mistral_list_conversation_messages when you only need the messages.

    Inputs

    conversation_idstringrequired
    ID of the conversation. Example: conv_0195b2f2a6f97c3bb6b1c0f5e1a2d3c4.
  • mistral_get_fileGet the metadata of one file in your Mistral workspace.Read-only

    Get File

    Get the metadata of one file in your Mistral workspace. Returns the file's id, filename, bytes, purpose, sample_type, source, num_lines, mimetype, created_at and expires_at; not its contents. Use this to check a file before using it. Use mistral_get_file_signed_url to download the contents.

    Inputs

    file_idstringrequired
    ID of the file, from mistral_list_files or a batch job's output_file. Example: 6a5bd9f5-0d4e-4bd0-a6f2-2d2c3b1e7c11.
  • mistral_get_file_signed_urlCreate a temporary download link for a file in your Mistral workspace.Read-only

    Get File Signed URL

    Create a temporary download link for a file in your Mistral workspace. Returns url, a signed link that downloads the file contents without an API key until it expires. Use this to fetch batch results or other file contents. Use mistral_get_file for metadata only.

    Inputs

    file_idstringrequired
    ID of the file to download, for example a batch job's output_file. Example: 6a5bd9f5-0d4e-4bd0-a6f2-2d2c3b1e7c11.
    expiryinteger
    Hours until the URL stops working, from 1 to 168. Mistral's default is 24. Example: 24.
  • mistral_get_modelGet the details of one Mistral model by id or alias.Read-only

    Get Model

    Get the details of one Mistral model by id or alias. Returns the model's id, name, aliases, description, max_context_length, default temperature, deprecation date and capabilities; fine-tuned models also show their root model and job. Use this to check what a specific model supports. Use mistral_list_models to browse all models.

    Inputs

    model_idstringrequired
    ID or alias of the model, as returned by mistral_list_models. Example: mistral-large-latest.
  • mistral_list_agentsList the Mistral agents you can access, one page at a time, optionally filtered by name, search text or source.Read-only

    List Agents

    List the Mistral agents you can access, one page at a time, optionally filtered by name, search text or source. Returns agents with id, name, description, model, version, instructions, tools and timestamps, plus next_page_token when more pages exist. Use this to find an agent_id. Use mistral_get_agent for one agent's full configuration.

    Inputs

    namestring
    Only return agents with exactly this name. Example: Contract reviewer.
    page_sizeinteger
    Agents per page. Mistral's default is 20. Example: 20.
    page_tokenstring
    Cursor for the next page: the next_page_token from the previous response. Leave empty for the first page.
    searchstring
    Only return agents whose name or ID contains this text. Example: contract.
    sourcesarray
    Only return agents created in these places: api, playground or agent_builder_v1. Example: ["api"].