Implement generative AI and agentic solutions 2.2 Build agents by using Foundry

In Microsoft Agent Framework, a copywriter agent and a reviewer agent refine marketing…

Study guide skill: Implement orchestrated multi-agent solutions

Question B6-022

In Microsoft Agent Framework, a copywriter agent and a reviewer agent refine marketing copy in a group chat orchestration with a round-robin manager. The conversation keeps going far longer than needed, and costs rise. What should you configure?

Select one answer.

  • A Switch to a concurrent orchestration so that both agents work in parallel
  • B Switch to a handoff orchestration so that the agents transfer control to each other
  • C Give each agent a private history so that it can't see the other agent's messages
  • D A termination condition or a maximum iteration count on the group chat manager ✓ Correct answer

Answer: D

Group chat bounds the conversation with the manager's settings, such as MaximumIterationCount on the round-robin manager or a termination condition, which controls the number of turns before it ends. Handoff transfers control directly between agents instead of using a central orchestrator, and concurrent orchestration runs agents in parallel, so neither keeps the iterative review. Group chat relies on shared context, so private histories would break the refinement.

Deep dive

How it works

In Microsoft Agent Framework's group chat orchestration, a central orchestrator (the manager) decides who speaks next. The round-robin manager selects each agent in turn. Because the copywriter and reviewer keep improving each other's work, the loop needs an explicit bound. That's configured on the manager:

  • Maximum iteration count. In C#, RoundRobinGroupChatManager takes MaximumIterationCount (the sample sets 5, commented "Maximum number of turns"). In Go, the round-robin manager stops after the configured maximum number of participant turns.
  • Termination condition. In Python, GroupChatBuilder accepts a termination_condition, for example stopping after a set number of messages. You can also write a custom manager with your own stop logic.

Either one caps the turns, and the cost with them.

The pattern relies on two group chat traits Microsoft lists: iterative refinement, where agents review and build on each other's responses over several rounds, and shared context, where all agents see the full conversation history.

The other options, and when you'd use them

  • Concurrent orchestration: Agents execute in parallel. There's no back-and-forth review.
  • Handoff orchestration: Agents transfer control to each other directly, instead of through an orchestrator. It doesn't add a turn limit, and it replaces group chat's orchestrator.
  • Private histories: Group chat's shared context, where all agents see the full history, is what makes the refinement work. Hiding the other agent's messages breaks it.

Exam tip

Group chat running too long = set MaximumIterationCount or a termination condition on the manager.

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Generative AI & agents questions · AI-103 study guide

Thanks for your feedback!