Metadata-Version: 2.5
Name: mistralai-agents
Version: 1.1.0rc16
Summary: Mistral Agents SDK - build and serve agents in Python
Author-email: Mistral AI <support@mistral.ai>
License: Apache-2.0
Keywords: agents,ai,llm,mistral,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.15,>=3.12
Requires-Dist: cachetools<8,>=7.1.6
Requires-Dist: httpx>=0.28.1
Requires-Dist: mistralai-otel-observability>=0.5.0
Requires-Dist: mistralai-vibe-harness[observability,workflows]==0.1.15
Requires-Dist: mistralai-vibe-sdk<0.15,>=0.14.0
Requires-Dist: mistralai-workflows-plugins-mistralai<4.0.0,>=3.0.0a1
Requires-Dist: mistralai-workflows<4,>=3.16.0
Requires-Dist: mistralai[workflow-payload-compression]<4,>=2.8.0
Requires-Dist: packaging>=24.1
Requires-Dist: pydantic>=2.13.4
Requires-Dist: pyyaml>=6.0
Requires-Dist: structlog<26,>=25.5.0
Requires-Dist: typer>=0.15
Requires-Dist: typing-extensions>=4.16.0
Provides-Extra: bashkit
Requires-Dist: bashkit<0.20,>=0.18; extra == 'bashkit'
Provides-Extra: cli
Requires-Dist: typer>=0.15; extra == 'cli'
Provides-Extra: koyeb
Requires-Dist: koyeb-sdk<2,>=1.5.5; extra == 'koyeb'
Provides-Extra: sessions-client
Requires-Dist: httpx>=0.28.1; extra == 'sessions-client'
Requires-Dist: mistralai-vibe-harness==0.1.15; extra == 'sessions-client'
Description-Content-Type: text/markdown

# Mistral Agents SDK

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](https://console.mistral.ai/api-keys).

```bash
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

```python
import asyncio

from mistralai import agents

agent = agents.Agent(model="mistral-medium-latest")


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:

```bash
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

- [Documentation](https://docs-internal-frameworks.mistral.ai/agents-sdk/)
- [Quickstart](https://docs-internal-frameworks.mistral.ai/agents-sdk/getting-started/quickstart)
- [Feature highlights](https://docs-internal-frameworks.mistral.ai/agents-sdk/getting-started/feature-highlights)

## Feedback

Ask questions and report bugs on the [Mistral AI Discord](https://discord.gg/mistralai). For a private or account issue, contact [Mistral support](https://help.mistral.ai/en/articles/347458-how-do-i-contact-support). Never paste an API key in a report.
