LoopAI-103

Before you start

Short explainers for ideas this lesson builds on. Watch these first if they're new to you.

0 of 1 watched · about 2 min

Go deeper

Unlocks when you've watched the lesson.

0 of 1 watched · about 2 min
Read this lesson

Three bakers, one brief

In a baking contest, three bakers get the same brief at the same moment, and each works alone at their own bench. Concurrent orchestration works that way: several agents take the same task at the same time, independently, and their results are gathered at the end. It's fast, and it looks at a problem from several angles at once. Usually you combine the answers, but you don't have to: each agent might update its own system instead. The agents don't see each other's work while they run.

When it fits, and when it doesn't

Use it when the work can happen in parallel and different specialists add something different: brainstorming, several experts reasoning about the same question, voting for a consensus, or anything where waiting in line would take too long. Avoid it when agents need to build on each other's results in order, when you need the same result every time, when your model quota can't handle many calls at once, when agents might clash over the same data, or when there's no good way to combine conflicting answers.

In code

In code, create a chat client, then your agents: say, a researcher, a marketer, and a legal reviewer, each with its own instructions. Import ConcurrentBuilder from agent_framework dot orchestrations, pass the agents as participants, and build the workflow. Run it with the task, for example a new electric bike launch, and all three work at once. Call get_outputs on the result, and you get one response with a message from each agent, labeled with its name. If you want one combined answer instead, add your own aggregator, for example a summarizer that merges the three into a short brief.

Facts from Microsoft's documentation: Workflow orchestrations in Agent Framework; Concurrent orchestration (CC BY 4.0), rewritten in Loop's own words and examples. Narration, animation, and quiz by Loop. Microsoft, Azure, and Microsoft Foundry are trademarks of Microsoft. Loop is independent and not affiliated with or endorsed by Microsoft.