mistralM

Docs

Studio

Build agents, workflows, and apps on shared components, deploy them in production, and improve them on real usage.
mistralMbackground-square-illustration

Mistral Studio is one place to build AI agents, workflows, and apps, run them in production, and improve them on real usage. You compose them from shared components, connect them to your company's data and tools, and deploy them without assembling the infrastructure yourself. Once a system runs, you can trace what it does and evaluate each change on real cases before you ship the next version (Enterprise-tier organizations).

Agents and workflows run on Mistral's cloud or on your own infrastructure, and apps run on Mistral Cloud. Secrets, permissions, and guardrails are built in.

This section is for developers: you build, deploy, and run through code you control, with the SDKs, the API, the Mistral CLI, and the coding agent you already use.

flag

To build an agent, use the Agents SDK. The Agents API guides have moved to the Deprecated section, and durable agents in Workflows are about to be deprecated. Existing Agents API users lists the API guides and what does not carry over to the SDK.

Get started

1. Create an API key

Agents, workflows, and API requests authenticate with an API key from your Studio workspace.

  • 1.

    Open the Studio consolearrowUpRight and go to API Keys (direct linkarrowUpRight).
  • 2.

    Select New key, give the key a name, and set an expiration date.
  • 3.

    Copy the key. It appears only once.
  • 4.

    Store the key in the MISTRAL_API_KEY environment variable, where the SDKs and the examples read it:
export MISTRAL_API_KEY="your-api-key"
lightbulb

Set an expiration date on every key and rotate keys regularly: create a new key, switch your code to it, then delete the old one. Delete a key as soon as you stop using it or suspect it has leaked. If an admin manages API keys for your organization, see API keys in the Admin docs.

2. Install the SDKs

The Agents SDK and the Workflows SDK are Python packages, and both need Python 3.12, 3.13, or 3.14 (>=3.12,<3.15). Create a project with uvarrowUpRight, and add both SDKs to it:

uv init --python 3.12 my-project
cd my-project
uv add mistralai-agents mistralai-workflows

3. Run your first system

Define an agent with a model and instructions, then run one turn on your machine. Save the code as hello_agent.py in your project, and run it with uv run hello_agent.py:

import asyncio

from mistralai.agents import agents

agent = agents.Agent(
    name="hello-agent",
    model="mistral-medium-latest",
    instructions="You are a friendly assistant. Answer in one sentence.",
)

async def main() -> None:
    state = await agent.run("What can you help me with?")
    match state:
        case agents.Completed(output=answer):
            print(answer)
        case agents.Failed(error=error):
            print("The run failed:", error.message)

asyncio.run(main())

If the run fails, for example because the API key is wrong, the script prints the error instead of the answer.

The wording and length of the answer change from run to run. For example:

I can help you with a wide range of tasks, including writing code, analyzing data, managing files, automating workflows, searching for information, and integrating with external tools or services.
lightbulb

To run the agent in production, package it as a project and deploy it with the agents command of the SDK, on your infrastructure or managed by Mistral, without changing the agent code. To give it tools, connectors, and skills, continue with the Agents SDK.

What you can build

Studio builds three kinds of systems. Choose by the shape of the process:

If the process

Build

Why

Depends on what it finds at each step, such as an investigation across monitoring tools, code, and ticketsAn agentAn agent reasons over its instructions, context, and tools to decide each next step.
Follows defined business rules, such as sorting support requests and routing each one to the right teamA workflowA workflow is deterministic code: Studio keeps its state and retries the steps that fail. A workflow can include agent steps.
Needs people to review results, give feedback, or approve an actionAn appAn app is an application with its own backend, authentication, and access controls, usually with an interface where people review results, give feedback, and guide the AI system.

A process can combine all three. People can also use your agents and workflows in Vibe before you build an app for them. To compare the three in detail, see Choose what to build.

Domain experts can describe a process in plain language and get a first version of the workflow, which developers then refine in code: see Build in Vibe.

What you don't have to build

Every system you build needs the same production services. Studio provides them once, and each project reuses them:

  • Runtime: deployments run agents and workflows on your machine while you build, on your own infrastructure, or managed by Mistral. Apps run on Mistral Cloud.
  • Company context: Connectors reach your tools and data, Libraries and Agentic Search supply your documents, and prompts and skills keep versioned instructions and know-how that agents and workflows reuse.
  • Controls: Secrets Manager stores credentials, governance sets who can use which data, tools, and models, and moderation and guardrails check what goes in and out of a model.
  • Traces and evaluations: observability shows model calls, tool calls, agent activity, and workflow runs in one view, and evaluations compare versions on real cases before a release. Both are available to Enterprise-tier organizations only.

Once an admin connects an app for the organization or shares a connector with the workspace, the next project can reuse it: an agent, a workflow, and an app can call the same connector without rebuilding the integration.

Where Studio fits

Studio is one part of the Mistral platform. If you need something else, start from the matching section:

Inference
illustrationBook

Inference

Call a model directly, with chat completions, embeddings, or batch jobs.

Vibe
illustrationBubble

Vibe

Use AI at work, in Vibe Work or Vibe Code, including the agents, conversational workflows, and apps your team publishes.

Admin
illustrationBriefcase

Admin

Manage the organization: workspaces, members, roles, API keys, and audit logs.

The Studio console shows what runs, such as executions, traces, and evaluations, and lets you create some resources without code. You can build in the console, in code, or with a coding agent, and switch between them.

The loop

Studio is organized around a recommended loop: build a system, give it context, test it, deploy it, observe it in production, and improve it, then start the next version from Build.

The Studio loop

Read the loop clockwise from Build. Govern applies to every stage.

The Studio loop: Build, then Context, Test and evaluate, Deploy, Observe, and Improve, which leads back to Build. Govern spans every
stage.

Each component is optional: use the ones your system needs at each stage. A workflow with no evaluation yet still deploys, and you can add evaluations later. Testing, observing, and improving rely on observability and evaluations, which are available to Enterprise-tier organizations only.

Understand the concepts

Before you design a system, read what happens at each stage of the loop, which components serve it, and how to choose between an agent, a workflow, and an app.

Concepts
illustrationBook

Concepts

The recommended loop for building and improving a Studio system, the components that serve each stage, and how they combine.

All components
illustrationGear

All components

Every Studio component, grouped by step of the loop, and where to start with each.

Choose what to build
illustrationStar

Choose what to build

Decide between an agent, a workflow, and an app for each part of your process, and see how they combine.

Start with a quickstart

Pick the system closest to your project and follow its quickstart. Every component has its own quickstart, by stage of the loop.

Quickstart: transcribe an audio file
Quickstart: transcribe an audio file

Quickstart: transcribe an audio file

Turn an audio file into accurate text with a single API call.

clock

2 min to complete

chevronRight
Quickstart: transcribe speech in realtime
Quickstart: transcribe speech in realtime

Quickstart: transcribe speech in realtime

Stream live audio and get a transcript with low latency.

clock

2 min to complete

chevronRight
Quickstart: create your first API key
Quickstart: create your first API key

Quickstart: create your first API key

Create a Mistral API key in Studio, store it, and check that it works, in about 5 minutes.

clock

5 min to complete

chevronRight
Quickstart: compare models in the playground
Quickstart: compare models in the playground

Quickstart: compare models in the playground

Send a prompt to a Mistral model in the Studio playground, change a parameter, and compare two models, in about 5 minutes.

clock

5 min to complete

chevronRight
Quickstart: install the Mistral CLI and create a project
Quickstart: install the Mistral CLI and create a project

Quickstart: install the Mistral CLI and create a project

Install the Mistral CLI, sign in to your workspace, and scaffold your first workflows project, in about 5 minutes.

clock

5 min to complete

chevronRight
Quickstart
Quickstart

Quickstart

Create an agent project, run its agent in your own process, chat with it, and give it a second tool.

clock

3 min to complete

chevronRight
Quickstart: build your first workflow
Quickstart: build your first workflow

Quickstart: build your first workflow

Scaffold a workflows project, run a worker on your machine, and get the result of your first execution, in about 15 minutes.

clock

15 min to complete

chevronRight
Quickstart: build your first app
Quickstart: build your first app

Quickstart: build your first app

Create, run, and deploy an app with the Mistral CLI.

clock

1 min to complete

chevronRight
Build and deploy an agent end to end
Build and deploy an agent end to end

Build and deploy an agent end to end

Go from a first Agents SDK agent to a deployed, observed, and improving agent, one Studio quickstart at a time.

clock

1 min to complete

chevronRight
Quickstart: add a connector
Quickstart: add a connector

Quickstart: add a connector

Register a public MCP server as a connector, connect it, list its tools, and call one, in about 10 minutes.

clock

10 min to complete

chevronRight
Quickstart: create a library and ask it a question
Quickstart: create a library and ask it a question

Quickstart: create a library and ask it a question

Create a library, add a document, and get an answer grounded in it, in about 10 minutes.

clock

10 min to complete

chevronRight
Quickstart: create and query an index
Quickstart: create and query an index

Quickstart: create and query an index

Create a search index, ingest documents, and run a first query.

clock

3 min to complete

chevronRight
Quickstart: build a RAG pipeline
Quickstart: build a RAG pipeline

Quickstart: build a RAG pipeline

Index two text files in a Mistral Search Index with the Search Toolkit, then search them, in about 10 minutes.

clock

10 min to complete

chevronRight
Quickstart: create and use a prompt
Quickstart: create and use a prompt

Quickstart: create and use a prompt

Store a prompt in Studio, use it from your code through an alias, then change your application's behavior by promoting a new version, without redeploying.

clock

2 min to complete

chevronRight
Create a prompt in Studio
Create a prompt in Studio

Create a prompt in Studio

Save a prompt template in Studio and choose whether to keep it private or share it with your workspace in ~5 minutes.

clock

5 min to complete

chevronRight
Create a skill in Studio
Create a skill in Studio

Create a skill in Studio

Package reusable instructions and files into a skill from Studio in ~10 minutes.

clock

10 min to complete

chevronRight
Quickstart: run your first evaluation
Quickstart: run your first evaluation

Quickstart: run your first evaluation

Evaluate a prompt on a small dataset with the Evaluation SDK, then read the scores in your terminal and in Studio.

clock

2 min to complete

chevronRight
Quickstart: deploy a workflow to Mistral
Quickstart: deploy a workflow to Mistral

Quickstart: deploy a workflow to Mistral

Scaffold a Workflows project with the Mistral CLI, push it to GitHub, and let Mistral Cloud build and run the worker for you.

clock

4 min to complete

chevronRight
Quickstart: send your first trace
Quickstart: send your first trace

Quickstart: send your first trace

Instrument a Python script with the Mistral SDK, send a first trace to Studio, and find it in the Trace Explorer.

clock

1 min to complete

chevronRight
Quickstart: score your first span with online evaluations
Quickstart: score your first span with online evaluations

Quickstart: score your first span with online evaluations

Score your first span end to end with curl.

clock

2 min to complete

chevronRight
Quickstart: moderate an input
Quickstart: moderate an input

Quickstart: moderate an input

Classify one input with the moderation API, then block unsafe inputs with a guardrail.

clock

2 min to complete

chevronRight
Quickstart: generate speech
Quickstart: generate speech

Quickstart: generate speech

Convert text into natural speech and play it back with one API call.

clock

1 min to complete

chevronRight
Quickstart: build a voice agent
Quickstart: build a voice agent

Quickstart: build a voice agent

Run a voice conversation with an agent from your terminal in a few steps.

clock

2 min to complete

chevronRight

Build with a coding agent

A coding agent, such as Vibe, Claude Code, or Codex, can build Studio systems for you. The Mistral CLI gives it commands to sign in, pick the workspace, and scaffold and run apps and workflows, and the Mistral MCP server exposes your workspace as tools.