Mistral AI plugin for Mistral Workflows - Provides native Mistral AI integration
Actively maintained. Last release 4 days ago. A safe choice.
$
pip install mistralai-workflows-plugins-mistralaiMistral 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