Examples
Examples are complete programs that do a real job: run them as they are, then adapt them. Cookbooks are shorter, each one pattern you can copy into your own program.
Highlights
A minimal Mistral Vibe in about 350 lines. Type a task in your repository; the agent edits files, runs read-only commands and asks before any other, and takes a line you type mid-run to change course. A browser tab shows the same session and answers its approvals too.

Sixty agents test jq 1.6, each in its own Docker sandbox, and talk only through a message board. A second member tries to reproduce each bug a member finds, and a coordinator agent runs the rounds until every part of jq is covered. In our 60-member run, the coordinator's report lists 217 findings that a second member reproduced.

A bank's monitoring flags a payment. An agent reads the alert, the account history, the KYC profile, sanctions lists and adverse media on its own, then waits for an analyst before it opens a case file. The analyst then asks follow-ups in the same session.
Examples
| Example | What it does |
|---|---|
| Mini Vibe | A coding agent in your terminal and a browser tab, with approvals and steering |
| QA swarm | 60 agents test jq 1.6 in Docker sandboxes, try to reproduce each other's bugs on one message board, and a coordinator decides when to stop |
| Mission | A planner and its builder subagents build jq from its manual over milestones, each scored on jq's own tests |
| Suspicious payment review | An agent reviews a monitoring alert and waits for an analyst before it opens a case file |
| Majordome | A personal assistant on Telegram or in your terminal that checks your mail and calendar on its own, and writes only on your tap |
| PR reviewer as a GitHub Action | A typed review on each pull request; the PR's tests run in a separate workflow, without secrets |
| Private repository cleanup agent | A coding agent that works in one private GitHub repository and opens a pull request |
| Slack feedback triage bot | A Slack thread kept as one session, with Linear through its MCP server |
| Telegram weather bot | A deployed agent behind a Telegram bot |
| Used car finder | One call per listing, structured output, and checks in code |
Cookbooks
| Cookbook | The pattern |
|---|---|
| Validate structured output | A hook that checks the final answer and makes the agent correct it |
| Several clients on one session | Live views of one session that race to answer one approval |
| One approval policy for every subagent | A policy on the lead's session that answers for its subagents |
| Private data guard | A stateful hook that refuses web search once the agent reads private data |
| Stop an agent that repeats itself | A stateful hook that blocks a tool after two calls in a turn, and ends the turn if the model keeps calling it |
| Live progress | A hook that pushes each finished step to a progress bar in your app |
| One shared key for a connector | A connector that uses one API key stored for the workspace |
| Stop and answer a turn by id | A dependency upgrade in a notebook: a stopped wait, the same turn back from a re-run cell, and the edit approved from another kernel with only its ids |
| Slack bot: one session per thread | A bot that binds each thread's session by id and resumes from a stored cursor after a restart |
| Issue triage swarm | 300 agents, one per open issue, summarize their issues on one message board and flag the duplicates |
Run an example
Each example is a program you can run as it is. Install the SDK once, then follow the Run line at the top of each page.
You need:
-
The Agents SDK, installed as the Quickstart explains.
-
A Mistral API key in
MISTRAL_API_KEY:export MISTRAL_API_KEY=...
A one-file example, such as the several clients cookbook, shows its whole program on its page. Put the code blocks titled with the file name the Run line gives in one file, in order, then run it:
python several_clients.pyThe test on a page runs with a scripted model, so it needs no API key. Put it in a file beside the
program, and run it with pytest and pytest-asyncio installed:
pytest -o asyncio_mode=auto test_several_clients.pyA project example, such as Mini Vibe or the Slack feedback triage bot, has several files and its own
pyproject.toml. Its page lists the files and gives the commands to run it, from the folder its
Run line names.