Simon Willison’s Weblog: Build AI agents with the Mistral Agents API

Source URL: https://simonwillison.net/2025/May/27/mistral-agents-api/
Source: Simon Willison’s Weblog
Title: Build AI agents with the Mistral Agents API

Feedly Summary: Build AI agents with the Mistral Agents API
Big upgrade to Mistral’s API this morning: they’ve announced a new “Agents API". Mistral have been using the term "agents" for a while now. Here’s how they describe them:

AI agents are autonomous systems powered by large language models (LLMs) that, given high-level instructions, can plan, use tools, carry out steps of processing, and take actions to achieve specific goals.

What that actually means is a system prompt plus a bundle of tools running in a loop.
Their new API looks similar to OpenAI’s Responses API (March 2025), in that it now manages conversation state server-side for you, allowing you to send new messages to a thread without having to maintain that local conversation history yourself and transfer it every time.
Mistral’s announcement captures the essential features that all of the LLM vendors have started to converge on for these "agentic" systems:

Code execution, using Mistral’s new Code Interpreter mechanism. It’s Python in a server-side sandbox – OpenAI have had this for years and Anthropic launched theirs last week.
Image generation – Mistral are using Black Forest Lab FLUX1.1 [pro] Ultra.
Web search – this is an interesting variant, Mistral offer two versions: web_search is classic search, but web_search_premium "enables access to both a search engine and two news agencies: AFP and AP". Mistral don’t mention which underlying search engine they use but Brave is the only search vendor listed in the subprocessors on their Trust Center so I’m assuming it’s Brave Search. I wonder if that news agency integration is handled by Brave or Mistral themselves?
Document library is Mistral’s version of hosted RAG over "user-uploaded documents". Their documentation doesn’t mention if it’s vector-based or FTS or which embedding model it uses, which is a disappointing omission.
Model Context Protocol support: you can now include details of MCP servers in your API calls and Mistral will call them when it needs to. It’s pretty amazing to see the same new feature roll out across OpenAI (May 21st), Anthropic (May 22nd) and now Mistral (May 27th) within eight days of each other!

They also implement "agent handoffs":

Once agents are created, define which agents can hand off tasks to others. For example, a finance agent might delegate tasks to a web search agent or a calculator agent based on the conversation’s needs.
Handoffs enable a seamless chain of actions. A single request can trigger tasks across multiple agents, each handling specific parts of the request.

This pattern always sounds impressive on paper but I’m yet to be convinced that it’s worth using frequently. OpenAI have a similar mechanism in their OpenAI Agents SDK.
Tags: ai-agents, openai, sandboxing, llm-tool-use, ai, llms, mistral, generative-ai, apis, python, model-context-protocol

AI Summary and Description: Yes

**Summary:** Mistral has launched a new “Agents API” that allows the creation of AI agents powered by large language models (LLMs). These agents can autonomously plan and execute tasks based on high-level instructions. The API facilitates a server-side management of conversational context and introduces various functionalities including code execution, image generation, and web search capabilities. This development is part of a trend among LLM vendors toward “agentic” systems.

**Detailed Description:**
The new “Agents API” from Mistral introduces several key functionalities that enhance the capabilities of AI agents, designed to be increasingly autonomous and efficient. The introduction of the API signifies a competitive development in the landscape of LLMs and their operational features.

– **Autonomous AI Agents:**
– Mistral’s AI agents leverage large language models to operate autonomously based on high-level directives.
– They can execute tasks, manage tool usage, and follow up on actions to achieve specified outcomes.

– **API Features:**
– **Conversation State Management:** Similar to OpenAI’s Responses API, Mistral’s API handles conversation state management server-side, streamlining the interaction process and alleviating the need for local history management.

– **Core Functionalities:**
– **Code Execution:** Mistral introduces a new Python code interpreter in a server-side sandbox environment, aligning with functionalities provided by competitors such as OpenAI and Anthropic.
– **Image Generation:** Utilizing the Black Forest Lab FLUX1.1, the API supports image generation as an integrated feature.
– **Web Search Capabilities:** Mistral offers nuanced web search options, including a “premium” version that enhances access to news agencies AFP and AP. The integration of search services potentially involves Brave, indicated by their inclusion in the Trust Center subprocessor list.

– **Document Handling:**
– Mistral’s approach to document libraries allows hosted retrieval-augmented generation (RAG) over user-uploaded documents, although specifics about technology like vector-based or full-text search are not disclosed.

– **Model Context Protocol (MCP):**
– The API includes support for Model Context Protocol servers, allowing enhanced contextual handling in API calls, a feature parallel to those offered by other leading LLM vendors.

– **Agent Handoffs:**
– The functionality permits agents to transfer tasks among themselves, enhancing efficiency in operation. For instance, a finance agent can delegate search tasks to a specialized web search agent.

Overall, Mistral’s Agents API represents a significant step forward in AI autonomy and multi-agent interactions, a vital consideration for professionals in AI, cloud, and security sectors as they assess the implications of such technologies on system design and security protocols. This trend signals ongoing innovations in operational capabilities and competitive advances among major AI service providers.