Skip to main content
Mistral AI provides powerful language models through an OpenAI-compatible API. docker-agent includes built-in support for Mistral as an alias provider.

Setup

  1. Get an API key from console.mistral.ai.
  2. Set the environment variable:
export MISTRAL_API_KEY="your-api-key"

Configuration

agents:
  root:
    model: mistral/mistral-large-latest
    description: Assistant using Mistral
    instruction: You are a helpful assistant.

Available models

ModelDescriptionContext
mistral-large-latestMost capable Mistral model128K
mistral-medium-latestBalanced performance and cost128K
mistral-small-latestFast and cost-effective128K
codestral-latestOptimized for code generation32K
open-mistral-nemoOpen-weight model128K
ministral-8b-latestCompact 8B parameter model128K
ministral-3b-latestSmallest Mistral model128K
For the latest model list, see the Mistral documentation.

Thinking budget

Mistral models support thinking mode with effort level strings. The default effort is medium.
models:
  mistral:
    provider: mistral
    model: mistral-large-latest
    thinking_budget: high  # minimal | low | medium | high | none
To disable thinking:
models:
  mistral:
    provider: mistral
    model: mistral-large-latest
    thinking_budget: none

Auto-detection

When running docker agent run without a config file, docker-agent automatically detects available providers. If MISTRAL_API_KEY is set and higher-priority providers (OpenAI, Anthropic, Google) are not configured, Mistral is selected with mistral-small-latest as the default model.

How it works

Mistral is a built-in alias provider:
  • API type: openai_chatcompletions
  • Base URL: https://api.mistral.ai/v1
  • Token variable: MISTRAL_API_KEY

Example: code assistant

agents:
  coder:
    model: mistral/codestral-latest
    description: Expert code assistant
    instruction: |
      You are an expert programmer using Codestral.
      Write clean, efficient, well-documented code.
      Explain your reasoning when helpful.
    toolsets:
      - type: filesystem
      - type: shell
      - type: think

Build docs developers (and LLMs) love