mistralai-workflows-plugins-mistralai 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. mistralai_workflows_plugins_mistralai-2.0.0/.gitignore +32 -0
  2. mistralai_workflows_plugins_mistralai-2.0.0/LICENSE +190 -0
  3. mistralai_workflows_plugins_mistralai-2.0.0/Makefile +22 -0
  4. mistralai_workflows_plugins_mistralai-2.0.0/PKG-INFO +98 -0
  5. mistralai_workflows_plugins_mistralai-2.0.0/README.md +71 -0
  6. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/__init__.py +7 -0
  7. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/__init__.py +154 -0
  8. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/activities.py +165 -0
  9. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/agent.py +59 -0
  10. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/lechat.py +892 -0
  11. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/mcp.py +202 -0
  12. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/models.py +26 -0
  13. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/py.typed +0 -0
  14. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/runner.py +63 -0
  15. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/session/__init__.py +24 -0
  16. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/session/local_session.py +305 -0
  17. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/session/remote_session.py +265 -0
  18. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/session/session.py +32 -0
  19. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/tool.py +224 -0
  20. mistralai_workflows_plugins_mistralai-2.0.0/mistralai_workflows/plugins/mistralai/utils.py +236 -0
  21. mistralai_workflows_plugins_mistralai-2.0.0/pyproject.toml +105 -0
  22. mistralai_workflows_plugins_mistralai-2.0.0/tasks.py +69 -0
  23. mistralai_workflows_plugins_mistralai-2.0.0/tests/activities/__init__.py +0 -0
  24. mistralai_workflows_plugins_mistralai-2.0.0/tests/activities/test_chat_parse.py +64 -0
  25. mistralai_workflows_plugins_mistralai-2.0.0/tests/activities/test_embeddings.py +39 -0
  26. mistralai_workflows_plugins_mistralai-2.0.0/tests/activities/test_ocr.py +41 -0
  27. mistralai_workflows_plugins_mistralai-2.0.0/tests/agents/__init__.py +0 -0
  28. mistralai_workflows_plugins_mistralai-2.0.0/tests/agents/cassettes/TestAgentIntegration.test_agent_with_handoff.yaml +184 -0
  29. mistralai_workflows_plugins_mistralai-2.0.0/tests/agents/cassettes/TestAgentIntegration.test_simple_agent_run.yaml +86 -0
  30. mistralai_workflows_plugins_mistralai-2.0.0/tests/agents/test_agent.py +60 -0
  31. mistralai_workflows_plugins_mistralai-2.0.0/tests/agents/test_agent_integration.py +59 -0
  32. mistralai_workflows_plugins_mistralai-2.0.0/tests/agents/test_tool.py +40 -0
  33. mistralai_workflows_plugins_mistralai-2.0.0/tests/agents/test_tool_calling_errors.py +136 -0
  34. mistralai_workflows_plugins_mistralai-2.0.0/tests/conftest.py +45 -0
  35. mistralai_workflows_plugins_mistralai-2.0.0/tests/test_assistant_message_events.py +231 -0
  36. mistralai_workflows_plugins_mistralai-2.0.0/tests/test_canvas_input_schema.py +244 -0
  37. mistralai_workflows_plugins_mistralai-2.0.0/tests/test_form_input_schema.py +978 -0
  38. mistralai_workflows_plugins_mistralai-2.0.0/tests/test_todo_list_events.py +762 -0
  39. mistralai_workflows_plugins_mistralai-2.0.0/tests/test_tool_ui_state.py +178 -0
  40. mistralai_workflows_plugins_mistralai-2.0.0/tests/workflows/test_models.py +51 -0
  41. mistralai_workflows_plugins_mistralai-2.0.0/uv.lock +1277 -0
@@ -0,0 +1,32 @@
1
+ # python sdk
2
+ build
3
+ *.egg-info
4
+ *.egg
5
+
6
+ # Env files
7
+ .env
8
+ .env.*
9
+ !.env.example
10
+
11
+ # Python
12
+ __pycache__/
13
+ *.py[cod]
14
+ *$py.class
15
+ .pytest_cache/
16
+ .coverage
17
+ htmlcov/
18
+
19
+ # IDEs
20
+ .idea/
21
+ .vscode/
22
+ *.swp
23
+ *.swo
24
+
25
+ # docs
26
+ docs/node_modules/**
27
+ docs/.docusaurus/**
28
+ docs/pnpm-lock.yaml
29
+ .docs.temporal.io/
30
+
31
+ #test
32
+ /.test_durations
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Mistral AI
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,22 @@
1
+ # See http://go/std-makefile to get an understanding of common Makefile targets used throughout the project
2
+
3
+ .PHONY: lint format typecheck test dev installdeps
4
+
5
+ lint:
6
+ uv run invoke lint
7
+
8
+ format:
9
+ uv run invoke lint --fix
10
+
11
+ typecheck:
12
+ uv run invoke typecheck
13
+
14
+ test:
15
+ uv run invoke tests
16
+
17
+ dev:
18
+ @echo "Development environment setup"
19
+ @echo "Run 'uv sync' to install dependencies"
20
+
21
+ installdeps:
22
+ uv sync
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.4
2
+ Name: mistralai-workflows-plugins-mistralai
3
+ Version: 2.0.0
4
+ Summary: Mistral AI plugin for Mistral Workflows - Provides native Mistral AI integration
5
+ Project-URL: Homepage, https://mistral.ai
6
+ Project-URL: Documentation, https://docs-internal-frameworks.mistral.ai/workflows
7
+ Author-email: Mistral AI <support@mistral.ai>
8
+ License: Apache-2.0
9
+ License-File: LICENSE
10
+ Keywords: ai,llm,mistral,plugin,workflows
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: <3.13,>=3.12
19
+ Requires-Dist: aiocache>=0.12.3
20
+ Requires-Dist: authlib>=1.3.0
21
+ Requires-Dist: griffe>=1.0.0
22
+ Requires-Dist: mcp>=1.12.4
23
+ Requires-Dist: mistralai-workflows<2.1.0,>=2.0.0b1
24
+ Requires-Dist: mistralai>=1.8.1
25
+ Requires-Dist: structlog<26,>=24
26
+ Description-Content-Type: text/markdown
27
+
28
+ # Mistral Workflows - Mistral AI Plugin
29
+
30
+ Native Mistral AI integration for Mistral Workflows.
31
+
32
+ ## Overview
33
+
34
+ This plugin provides Mistral AI-specific activities and models for building AI workflows with the Mistral AI API.
35
+
36
+ ## Features
37
+
38
+ - **Mistral AI Activities**: Pre-built activities for chat completions, embeddings, and more
39
+ - **Streaming Support**: Native streaming for chat responses
40
+ - **Model Definitions**: Type-safe model configurations
41
+ - **Agent Runtime**: Build and run autonomous AI agents
42
+ - **Session Management**: Stateful agent sessions with context persistence
43
+ - **MCP Support**: Model Context Protocol integration for tool use
44
+ - **Tool Execution**: Built-in tool calling and execution framework
45
+
46
+ ## Installation
47
+
48
+ ```bash
49
+ pip install mistralai-workflows[mistralai]
50
+ ```
51
+
52
+ Or install directly:
53
+
54
+ ```bash
55
+ pip install mistralai-workflows-plugins-mistralai
56
+ ```
57
+
58
+ ## Quick Start
59
+
60
+ ```python
61
+ import mistralai_workflows as workflows
62
+ import mistralai_workflows.plugins.mistralai as workflows_mistralai
63
+
64
+
65
+ @workflows.workflow.define(name="chat-workflow")
66
+ class ChatWorkflow:
67
+ @workflows.workflow.entrypoint
68
+ async def run(self, prompt: str) -> str:
69
+ response = await workflows_mistralai.mistralai_chat_stream(
70
+ workflows_mistralai.ChatCompletionRequest(
71
+ model="mistral-medium-latest",
72
+ messages=[workflows_mistralai.UserMessage(content=prompt)],
73
+ )
74
+ )
75
+ return response.content
76
+ ```
77
+
78
+ ## Documentation
79
+
80
+ For full documentation, visit [docs-internal-frameworks.mistral.ai/workflows](https://docs-internal-frameworks.mistral.ai/workflows)
81
+
82
+ ## Examples
83
+
84
+ Run examples with:
85
+
86
+ ```bash
87
+ python -m mistralai_workflows.examples.assist.workflow_multi_turn_chat
88
+ python -m mistralai_workflows.examples.assist.workflow_insurance_claims
89
+ python -m mistralai_workflows.examples.assist.workflow_local_session_streaming
90
+ python -m mistralai_workflows.examples.assist.workflow_travel_agent_streaming
91
+ python -m mistralai_workflows.examples.assist.workflow_with_agent
92
+ python -m mistralai_workflows.examples.assist.workflow_extract_markdown
93
+ python -m mistralai_workflows.examples.assist.workflow_embeddings
94
+ ```
95
+
96
+ ## License
97
+
98
+ Apache License 2.0 - see [LICENSE](LICENSE) for details.
@@ -0,0 +1,71 @@
1
+ # Mistral Workflows - Mistral AI Plugin
2
+
3
+ Native Mistral AI integration for Mistral Workflows.
4
+
5
+ ## Overview
6
+
7
+ This plugin provides Mistral AI-specific activities and models for building AI workflows with the Mistral AI API.
8
+
9
+ ## Features
10
+
11
+ - **Mistral AI Activities**: Pre-built activities for chat completions, embeddings, and more
12
+ - **Streaming Support**: Native streaming for chat responses
13
+ - **Model Definitions**: Type-safe model configurations
14
+ - **Agent Runtime**: Build and run autonomous AI agents
15
+ - **Session Management**: Stateful agent sessions with context persistence
16
+ - **MCP Support**: Model Context Protocol integration for tool use
17
+ - **Tool Execution**: Built-in tool calling and execution framework
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install mistralai-workflows[mistralai]
23
+ ```
24
+
25
+ Or install directly:
26
+
27
+ ```bash
28
+ pip install mistralai-workflows-plugins-mistralai
29
+ ```
30
+
31
+ ## Quick Start
32
+
33
+ ```python
34
+ import mistralai_workflows as workflows
35
+ import mistralai_workflows.plugins.mistralai as workflows_mistralai
36
+
37
+
38
+ @workflows.workflow.define(name="chat-workflow")
39
+ class ChatWorkflow:
40
+ @workflows.workflow.entrypoint
41
+ async def run(self, prompt: str) -> str:
42
+ response = await workflows_mistralai.mistralai_chat_stream(
43
+ workflows_mistralai.ChatCompletionRequest(
44
+ model="mistral-medium-latest",
45
+ messages=[workflows_mistralai.UserMessage(content=prompt)],
46
+ )
47
+ )
48
+ return response.content
49
+ ```
50
+
51
+ ## Documentation
52
+
53
+ For full documentation, visit [docs-internal-frameworks.mistral.ai/workflows](https://docs-internal-frameworks.mistral.ai/workflows)
54
+
55
+ ## Examples
56
+
57
+ Run examples with:
58
+
59
+ ```bash
60
+ python -m mistralai_workflows.examples.assist.workflow_multi_turn_chat
61
+ python -m mistralai_workflows.examples.assist.workflow_insurance_claims
62
+ python -m mistralai_workflows.examples.assist.workflow_local_session_streaming
63
+ python -m mistralai_workflows.examples.assist.workflow_travel_agent_streaming
64
+ python -m mistralai_workflows.examples.assist.workflow_with_agent
65
+ python -m mistralai_workflows.examples.assist.workflow_extract_markdown
66
+ python -m mistralai_workflows.examples.assist.workflow_embeddings
67
+ ```
68
+
69
+ ## License
70
+
71
+ Apache License 2.0 - see [LICENSE](LICENSE) for details.
@@ -0,0 +1,7 @@
1
+ # This file helps PyLance/VS Code and mypy resolve imports for our PEP 420 namespace mistralai_workflows/plugins.
2
+ # By re-exporting from the core package, this approach works with both PyRight (VS Code) and mypy (CI).
3
+ # See: https://github.com/microsoft/pylance-release/issues/7618
4
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
5
+
6
+ from mistralai_workflows.exports import * # noqa: F403
7
+ from mistralai_workflows.exports import __all__ as __all__
@@ -0,0 +1,154 @@
1
+ from mistralai import (
2
+ AgentCreationRequest,
3
+ AssistantMessage,
4
+ ChatCompletionRequest,
5
+ ChatCompletionResponse,
6
+ ConversationRequest,
7
+ ConversationResponse,
8
+ DeltaMessage,
9
+ EmbeddingRequest,
10
+ EmbeddingResponse,
11
+ Function,
12
+ FunctionCall,
13
+ Messages,
14
+ Mistral,
15
+ OCRRequest,
16
+ OCRResponse,
17
+ ResponseFormat,
18
+ SystemMessage,
19
+ TextChunk,
20
+ Tool,
21
+ ToolCall,
22
+ ToolMessage,
23
+ UserMessage,
24
+ )
25
+ from mistralai_workflows.plugins.mistralai.activities import (
26
+ MistralEmbeddingsParams,
27
+ chat_parse_to_model,
28
+ mistralai_append_conversation,
29
+ mistralai_append_conversation_stream,
30
+ mistralai_chat_complete,
31
+ mistralai_chat_parse,
32
+ mistralai_chat_stream,
33
+ mistralai_create_agent,
34
+ mistralai_embeddings,
35
+ mistralai_ocr,
36
+ mistralai_start_conversation,
37
+ mistralai_start_conversation_stream,
38
+ mistralai_update_agent,
39
+ )
40
+ from mistralai_workflows.plugins.mistralai.agent import Agent
41
+ from mistralai_workflows.plugins.mistralai.lechat import (
42
+ ACCEPT_OPTION_VALUE,
43
+ DECLINE_OPTION_VALUE,
44
+ AcceptDeclineConfirmation,
45
+ CanvasInput,
46
+ CanvasPayload,
47
+ CanvasResource,
48
+ ChatAssistantWorkflowOutput,
49
+ ChatAssistantWorkingTask,
50
+ ChatInput,
51
+ ChatInputModel,
52
+ ConfirmationInput,
53
+ ConfirmationInputModel,
54
+ ResourceOutput,
55
+ TextOutput,
56
+ TodoList,
57
+ TodoListItem,
58
+ is_accepted,
59
+ send_assistant_message,
60
+ )
61
+ from mistralai_workflows.plugins.mistralai.mcp import (
62
+ MCPConfig,
63
+ MCPSSEConfig,
64
+ MCPStdioConfig,
65
+ collect_mcp_tools,
66
+ execute_mcp_tool,
67
+ )
68
+ from mistralai_workflows.plugins.mistralai.models import AgentUpdateRequest, ConversationAppendRequest
69
+ from mistralai_workflows.plugins.mistralai.runner import Runner
70
+ from mistralai_workflows.plugins.mistralai.session.local_session import (
71
+ LocalSession,
72
+ LocalSessionInputs,
73
+ LocalSessionOutputs,
74
+ )
75
+ from mistralai_workflows.plugins.mistralai.session.remote_session import (
76
+ RemoteSession,
77
+ RemoteSessionInputs,
78
+ RemoteSessionOutputs,
79
+ )
80
+ from mistralai_workflows.plugins.mistralai.utils import get_mistral_client
81
+
82
+ __all__ = [
83
+ "AcceptDeclineConfirmation",
84
+ "ACCEPT_OPTION_VALUE",
85
+ "DECLINE_OPTION_VALUE",
86
+ "Agent",
87
+ "AgentCreationRequest",
88
+ "AgentUpdateRequest",
89
+ "AssistantMessage",
90
+ "ChatCompletionRequest",
91
+ "ChatCompletionResponse",
92
+ "ConversationAppendRequest",
93
+ "ConversationRequest",
94
+ "ConversationResponse",
95
+ "DeltaMessage",
96
+ "EmbeddingRequest",
97
+ "EmbeddingResponse",
98
+ "Function",
99
+ "FunctionCall",
100
+ "Messages",
101
+ "Mistral",
102
+ "OCRRequest",
103
+ "OCRResponse",
104
+ "ResponseFormat",
105
+ "LocalSession",
106
+ "LocalSessionInputs",
107
+ "LocalSessionOutputs",
108
+ "RemoteSession",
109
+ "RemoteSessionInputs",
110
+ "RemoteSessionOutputs",
111
+ "Runner",
112
+ "SystemMessage",
113
+ "TextChunk",
114
+ "Tool",
115
+ "ToolCall",
116
+ "ToolMessage",
117
+ "UserMessage",
118
+ "CanvasInput",
119
+ "ChatAssistantWorkflowOutput",
120
+ "ChatAssistantWorkingTask",
121
+ "ChatInput",
122
+ "ChatInputModel",
123
+ "ConfirmationInput",
124
+ "ConfirmationInputModel",
125
+ "is_accepted",
126
+ "TextOutput",
127
+ "TodoListItem",
128
+ "TodoList",
129
+ "send_assistant_message",
130
+ "CanvasPayload",
131
+ "CanvasResource",
132
+ "ResourceOutput",
133
+ "get_mistral_client",
134
+ # Activities
135
+ "chat_parse_to_model",
136
+ "collect_mcp_tools",
137
+ "execute_mcp_tool",
138
+ "MistralEmbeddingsParams",
139
+ "mistralai_append_conversation",
140
+ "mistralai_append_conversation_stream",
141
+ "mistralai_chat_complete",
142
+ "mistralai_chat_parse",
143
+ "mistralai_chat_stream",
144
+ "mistralai_create_agent",
145
+ "mistralai_embeddings",
146
+ "mistralai_ocr",
147
+ "mistralai_start_conversation",
148
+ "mistralai_start_conversation_stream",
149
+ "mistralai_update_agent",
150
+ # MCP
151
+ "MCPConfig",
152
+ "MCPSSEConfig",
153
+ "MCPStdioConfig",
154
+ ]