Skip to main content

Mistral AI plugin for Mistral Workflows - Provides native Mistral AI integration

Project description

Mistral Workflows - Mistral AI Plugin

Native Mistral AI integration for Mistral Workflows.

Overview

This plugin provides Mistral AI-specific activities and models for building AI workflows with the Mistral AI API.

Features

  • Mistral AI Activities: Pre-built activities for chat completions, embeddings, and more
  • Streaming Support: Native streaming for chat responses
  • Model Definitions: Type-safe model configurations
  • Agent Runtime: Build and run autonomous AI agents
  • Session Management: Stateful agent sessions with context persistence
  • MCP Support: Model Context Protocol integration for tool use
  • Tool Execution: Built-in tool calling and execution framework
  • Le Chat UI: Conversational UI components for Le Chat (canvas, assistant messages, UI components)

Installation

pip install mistralai-workflows[mistralai]

Or install directly:

pip install mistralai-workflows-plugins-mistralai

Quick Start

import mistralai.workflows as workflows
import mistralai.workflows.plugins.mistralai as workflows_mistralai


@workflows.workflow.define(name="chat-workflow")
class ChatWorkflow:
    @workflows.workflow.entrypoint
    async def run(self, prompt: str) -> str:
        response = await workflows_mistralai.mistralai_chat_stream(
            workflows_mistralai.ChatCompletionRequest(
                model="mistral-medium-latest",
                messages=[workflows_mistralai.UserMessage(content=prompt)],
            )
        )
        return response.content

Documentation

For full documentation, visit docs.mistral.ai/workflows/getting-started/introduction

Examples

Run examples with:

python -m mistralai_workflow_tests.examples.assist.workflow_multi_turn_chat
python -m mistralai_workflow_tests.examples.assist.workflow_insurance_claims
python -m mistralai_workflow_tests.examples.assist.workflow_local_session_streaming
python -m mistralai_workflow_tests.examples.assist.workflow_travel_agent_streaming
python -m mistralai_workflow_tests.examples.assist.workflow_with_agent
python -m mistralai_workflow_tests.examples.assist.workflow_extract_markdown
python -m mistralai_workflow_tests.examples.assist.workflow_embeddings

License

Apache License 2.0 - see LICENSE for details.

Project details


Release history Release notifications | RSS feed

This version

3.6.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mistralai_workflows_plugins_mistralai-3.6.0.tar.gz (153.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file mistralai_workflows_plugins_mistralai-3.6.0.tar.gz.

File metadata

File hashes

Hashes for mistralai_workflows_plugins_mistralai-3.6.0.tar.gz
Algorithm Hash digest
SHA256 9f02d4b51b219b11c20556cb9a3cf98e6ed1e04ad1956063d5cbbeeef8d140c4
MD5 1d0b34e983551cf284f71257ee746f03
BLAKE2b-256 9fad5a7280d4ae85cbcbb3e8d5c1405b1359aa8adb424bca2d9c4b8998cf3213

See more details on using hashes here.

Provenance

The following attestation bundles were made for mistralai_workflows_plugins_mistralai-3.6.0.tar.gz:

Publisher: workflow-sdk-release.yaml on mistralai/dashboard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mistralai_workflows_plugins_mistralai-3.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mistralai_workflows_plugins_mistralai-3.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b2aadc6b4d1c505114e3bdf94b8f78c1a76f94ae32223a0b442384a4df6e641
MD5 790e8b249e969d1cdfdf6fbc668c2908
BLAKE2b-256 03ba1fc87cf3928a8ff89ce81ca5b550e7cd37fb610d7dba2b57c74d5d2b0fb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mistralai_workflows_plugins_mistralai-3.6.0-py3-none-any.whl:

Publisher: workflow-sdk-release.yaml on mistralai/dashboard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page