Skip to main content

Mistral Managed Agents

Build an agent in Python. Try it on your laptop, then run the same code in production with one command.

An agent is a model and its instructions, plus the tools, sandboxes, connectors, skills and subagents it can use. The same agent runs in your process, on your own server with agents serve, or on Mistral with agents deploy.

Install

You need Python 3.12, 3.13 or 3.14, and a Mistral API key from Studio.

uv init --python 3.12 my_agent && cd my_agent
uv add mistralai-agents
export MISTRAL_API_KEY="<your-key>"

With pip: pip install mistralai-agents.

Hello world

import asyncio

from mistralai import agents

agent = agents.Agent(model="mistral-large-4")


async def main() -> None:
    result = await agent.run("Say hello")
    print(result.text)


asyncio.run(main())

agent.run sends one message and returns the result when the agent has answered.

Create a project

agents init creates a project with an agent, a tool and a Dockerfile. Chat with the agent in your terminal. Then push the project to a GitHub repository and deploy it:

uvx --python 3.12 --from mistralai-agents agents init hello-agent
cd hello-agent
uv run --env-file .env agents chat
git remote add origin <repository-url>
git push -u origin HEAD
uv run --env-file .env agents deploy

These git commands assume agents init created the repository and committed the project. If it did not, the Next steps panel it prints has the commands for your case.

Learn more

Feedback

Ask questions and report bugs on the Mistral AI Discord. For a private or account issue, contact Mistral support. Never paste an API key in a report.

Metadata

Release files for mistralai-agents 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mistralai-agents 1.1.0
File Size Uploaded Provenance Actions
mistralai_agents-1.1.0.tar.gz 589.1 kB With provenance Details for mistralai_agents-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mistralai-agents 1.1.0
File Interpreter ABI Platform Actions
mistralai_agents-1.1.0-py3-none-any.whl Python 3 none any Details for mistralai_agents-1.1.0-py3-none-any.whl

Total release size: 1.3 MB

Release files / mistralai_agents-1.1.0.tar.gz

Download URL mistralai_agents-1.1.0.tar.gz
Size 589.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f041f8d3f9f8e23b01596dd423cd9e3585753449fa47db44955032a301dfbffc
BLAKE2b-256 checksum
How to use checksums
51bec266dd4d027c1348c90398d31ded11c66542112361043aedd886f58c01ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / mistralai_agents-1.1.0-py3-none-any.whl

Download URL mistralai_agents-1.1.0-py3-none-any.whl
Size 702.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9712e5b9c27f949a65cbbb8c715b03d4e8c19d82ba19a31fdb70193104fbc903
BLAKE2b-256 checksum
How to use checksums
13f88416c1f3695ea7ff627833e93bf79cf163bcdb231b66b440b5348ef16e4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for mistralai-agents 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mistralai_agents-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page