<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Orchestration | The .NET Blog</title><link>https://thedotnetblog.com/fr/tags/orchestration/</link><description>Articles, tutorials and insights from the .NET community.</description><generator>Hugo</generator><language>fr</language><managingEditor>@thedotnetblog (The .NET Blog)</managingEditor><webMaster>@thedotnetblog</webMaster><lastBuildDate>Mon, 01 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://thedotnetblog.com/fr/tags/orchestration/index.xml" rel="self" type="application/rss+xml"/><item><title>Le Modèle Handoff : Quand Un Agent Ne Suffit Pas</title><link>https://thedotnetblog.com/fr/news/emiliano-montesdeoca/maf-handoff-orchestration-pattern-tour/</link><pubDate>Mon, 01 Jun 2026 00:00:00 +0000</pubDate><author>Emiliano Montesdeoca</author><guid>https://thedotnetblog.com/fr/news/emiliano-montesdeoca/maf-handoff-orchestration-pattern-tour/</guid><description>Le modèle d'orchestration Handoff de Microsoft Agent Framework permet aux agents de décider qui gère le prochain tour — sans perdre le contexte de la conversation ni enfreindre les règles de topologie.</description><content:encoded>&lt;p&gt;À un moment donné, tout système multi-agents dépasse un simple routeur. Le premier signe apparaît généralement quand un agent spécialiste doit poser une question de suivi, ou réalise en milieu de tour qu&amp;rsquo;un autre agent devrait continuer. Un pipeline fixe échoue là. Un routeur à passage unique échoue là.&lt;/p&gt;
&lt;p&gt;C&amp;rsquo;est exactement le problème que le modèle d&amp;rsquo;orchestration Handoff dans Microsoft Agent Framework est conçu pour résoudre.&lt;/p&gt;
&lt;h2 id="comment-fonctionne-handoff"&gt;Comment Fonctionne Handoff&lt;/h2&gt;
&lt;p&gt;Le développeur déclare un graphe : voici les agents, voici les arêtes entre eux. Le framework fait le reste — il synthétise un outil handoff par arête sortante et l&amp;rsquo;injecte dans chaque agent. Quand un agent décide de passer le contrôle, il appelle l&amp;rsquo;outil. Le framework applique la topologie.&lt;/p&gt;
&lt;p&gt;Trois choses rendent cela différent du fait d&amp;rsquo;avoir simplement des agents qui s&amp;rsquo;appellent mutuellement :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Une transcription partagée&lt;/strong&gt; — l&amp;rsquo;agent récepteur voit l&amp;rsquo;intégralité de l&amp;rsquo;historique de conversation. Pas de recommencement à zéro.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Application de la topologie&lt;/strong&gt; — un agent ne peut faire handoff qu&amp;rsquo;à des cibles déclarées. Vous détectez les bugs de routage au moment de l&amp;rsquo;authoring, pas en production.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Terminaison naturelle&lt;/strong&gt; — quand l&amp;rsquo;agent actif termine son tour sans appeler un outil handoff, le workflow cède à l&amp;rsquo;utilisateur. Pas de polling, pas de conditions de sortie explicites.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="un-exemple-minimal"&gt;Un Exemple Minimal&lt;/h2&gt;
&lt;p&gt;En .NET, construire un workflow handoff ressemble à ceci :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.Agents.AI&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.Agents.AI.Workflows&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;AIAgent&lt;/span&gt; &lt;span class="n"&gt;triage&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chatClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AsAIAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Route to the right specialist.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Triage&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;AIAgent&lt;/span&gt; &lt;span class="n"&gt;billing&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chatClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AsAIAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Handle billing questions.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Billing&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;AIAgent&lt;/span&gt; &lt;span class="n"&gt;tech&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chatClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AsAIAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Handle technical support.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Tech&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;workflow&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;HandoffWorkflow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;triage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;billing&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tech&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;billing&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;triage&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tech&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;triage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;billing&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Triage peut envoyer à l&amp;rsquo;un ou l&amp;rsquo;autre spécialiste. Les deux spécialistes peuvent renvoyer vers triage. Le graphe est compatible avec l&amp;rsquo;acyclique mais prend en charge les arêtes arrière quand vous en avez besoin (&amp;ldquo;j&amp;rsquo;ai besoin de plus d&amp;rsquo;informations&amp;rdquo; → retour à la recherche).&lt;/p&gt;
&lt;h2 id="quand-utiliser-handoff-et-quand-ne-pas-le-faire"&gt;Quand Utiliser Handoff (et Quand Ne Pas Le Faire)&lt;/h2&gt;
&lt;p&gt;Handoff est un bon choix quand :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;La propriété peut changer en cours de conversation&lt;/strong&gt; — un agent peut réaliser qu&amp;rsquo;il est le mauvais spécialiste&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Les arêtes arrière comptent&lt;/strong&gt; — vous pourriez avoir besoin de revisiter une étape antérieure sans repartir à zéro&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Les décisions de routage sont floues&lt;/strong&gt; — la décision de faire un handoff est contextuelle et mieux prise par le modèle que par des prédicats typés&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ce n&amp;rsquo;est &lt;em&gt;pas&lt;/em&gt; le bon choix quand :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Votre pipeline est fixe et séquentiel — utilisez le workflow &lt;code&gt;Sequential&lt;/code&gt; pour cela&lt;/li&gt;
&lt;li&gt;Chaque étape est indépendante — des agents partageant une transcription où seul l&amp;rsquo;un d&amp;rsquo;eux en avait besoin n&amp;rsquo;est que du bruit&lt;/li&gt;
&lt;li&gt;Vous avez besoin de garanties strictes de traitement — le non-déterminisme du routage piloté par modèle n&amp;rsquo;est pas ce que vous voulez&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="arêtes-arrière-et-humain-dans-la-boucle"&gt;Arêtes Arrière et Humain-dans-la-Boucle&lt;/h2&gt;
&lt;p&gt;L&amp;rsquo;une des formes les plus intéressantes qu&amp;rsquo;Handoff permet est les vraies arêtes arrière. Un agent peut décider &amp;ldquo;je n&amp;rsquo;ai pas assez d&amp;rsquo;informations&amp;rdquo; et revenir à une étape de recherche, pas avec une boucle codée en dur, mais parce que le modèle décide que c&amp;rsquo;est la bonne décision.&lt;/p&gt;
&lt;p&gt;Les interactions humain-dans-la-boucle se composent également naturellement. Quand un spécialiste a besoin d&amp;rsquo;une entrée de l&amp;rsquo;utilisateur, le workflow cède à l&amp;rsquo;utilisateur via la boucle de tour par défaut, recueille la réponse et reprend avec le contexte complet. L&amp;rsquo;agent n&amp;rsquo;a jamais perdu la conversation.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Handoff est l&amp;rsquo;un de ces modèles qui semble simple mais permet beaucoup une fois intégré : routage décentralisé, contexte partagé, topologie appliquée, terminaison naturelle. C&amp;rsquo;est la prochaine étape appropriée quand vos agents commencent à dire &amp;ldquo;en fait, quelqu&amp;rsquo;un d&amp;rsquo;autre devrait gérer ça.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Lisez le guide complet dans le post original : &lt;a href="https://devblogs.microsoft.com/agent-framework/a-tour-of-handoff-orchestration-pattern/"&gt;A Tour of the Handoff Orchestration Pattern&lt;/a&gt;&lt;/p&gt;</content:encoded></item></channel></rss>