Conversational Multi-Agent Patterns: Agent-to-Agent Chat
Agent-to-agent chat is how AutoGen popularized multi-agent systems: specialists take turns on a shared conversation until a stop condition ends the run.
In Microsoft Agent Framework 1.0 those patterns live primarily as orchestration builders on the workflow stack (sequential, concurrent, Magentic, and related samples) rather than a separate Team runtime forever.
Summary
Structure specialists with distinct instructions and tools, choose sequential vs concurrent vs manager-led orchestration, stream events, and enforce round caps so chat cannot thrash.
Recipe
- List real roles (writer, reviewer, researcher) and write one-sentence goals for each.
- Create one chat client shared or per-role model tier as needed.
- Build each
Agentwith uniquename,instructions, and least-privilegetools. - Pick an orchestration shape: sequential turns, concurrent fan-out, or Magentic manager-led.
- Set hard limits (
max_round_count/ stall limits where available; always budget tokens and wall time in the host). - Run with
stream=Trueand log each participant message with author name. - Define success: final approved artifact, structured consensus, or escalated human review.
- Only then add graph edges if you need typed joins, checkpoints, or formal HITL request/response.
Working Example
Sequential writer → reviewer conversation (Python shape - verify imports at build):
import asyncio
from typing import cast
from agent_framework import Agent, Message
from agent_framework.openai import OpenAIChatClient
from agent_framework.orchestrations import SequentialBuilder
async def main() -> None:
client = OpenAIChatClient(model="gpt-4o") # verify model id at build
writer = Agent(
client=client,
name="writer",
instructions="Write one punchy marketing sentence. No preamble.",
)
reviewer = Agent(
client=client,
name="reviewer",
instructions="Critique the previous message in two short bullets.",
)
workflow = SequentialBuilder(participants=[writer, reviewer]).build()
task = "Tagline for Microsoft Agent Framework 1.0."
async for event in workflow.run(task, stream=True):
if event.type == "output":
for msg in cast(list[Message], event.data):
who = msg.author_name or str(msg.role)
print(f"[{who}]: {msg.text}")
if __name__ == "__main__":
asyncio.run(main())Concurrent specialists when branches do not need each other's intermediate text:
from agent_framework.orchestrations import ConcurrentBuilder
workflow = ConcurrentBuilder(participants=[legal_agent, pricing_agent, tone_agent]).build()
# Each participant processes the same input; aggregate outputs in your handlerDeep Dive
What "conversation" means here
Conversational multi-agent means agents share a message history and take turns (or parallel turns) as participants. It is different from a pure data-flow graph where executor A sends a typed payload to executor B without a chat transcript.
Use conversation when:
- Critique and revision improve quality (draft → review).
- Roles genuinely disagree or check each other.
- You want AutoGen-like collaboration with less custom glue.
Prefer a strict graph when:
- Steps are a fixed business process.
- You need deterministic joins, retries, or resume from checkpoint.
- Compliance requires an explicit path, not emergent chat.
Pattern catalog
| Pattern | Behavior | Strength | Risk |
|---|---|---|---|
| Sequential | Participants run in order on a shared thread | Simple handoffs, easy traces | Long chains increase latency and cost |
| Concurrent | Participants process in parallel | Faster multi-perspective answers | Aggregation and conflict resolution needed |
| Magentic-style | Manager plans and drives specialists | Complex research/coding teams | More moving parts; needs stall/reset caps |
| Agent-as-tool | Coordinator calls specialist agents as tools | Hierarchy without full chat | Nested loops can hide cost |
Designing turn quality
- Role prompts: state output format ("two bullets", "JSON only") so the next agent has clean input.
- Stop conditions: max rounds, stall detection, manager reset limits, and host-level timeouts.
- Shared vs private tools: never give every participant the production deploy tool.
- Transcript hygiene: summarize long tool dumps before they re-enter the shared chat.
Mapping from AutoGen mental models
| AutoGen idea | Agent Framework direction |
|---|---|
RoundRobinGroupChat | Sequential-style orchestration over participants |
| Nested teams | Nested workflows / WorkflowExecutor rather than broadcast teams |
| MagenticOneGroupChat | MagenticBuilder with manager agent and round/stall caps |
| Termination conditions | Builder limits + your host budgets + output checks |
Exact class names and parameters can evolve; treat official samples as source of truth at build.
Gotchas
- Identical specialists - two agents with the same prompt add cost without diversity.
- Unbounded rounds - chat without max rounds is a burn rate bug.
- Transcript bloat - dumping full tool JSON into shared history exhausts context.
- Parallel tool races - concurrent patterns need explicit aggregation rules.
- Assuming AutoGen Team APIs - expect workflow/orchestration APIs, not a perfect clone of every AutoGen class.
- Missing author names - without
nameon agents, logs become unreadable multi-agent soup. - Using chat for ETL - deterministic pipelines belong in graph workflows with checkpoints.
Alternatives
| Approach | When it wins | When it loses |
|---|---|---|
| Sequential multi-agent chat | Draft/review, simple pipelines of roles | Strict compliance graphs, heavy fan-out |
| Concurrent multi-agent | Independent analyses to merge | Steps that must see each other mid-run |
| Single agent with tools | One skill domain, lower cost | Conflicting privileges or deep specialization |
Graph WorkflowBuilder | Typed edges, HITL, checkpoints | Quick collaborative brainstorming |
| Agent-as-tool hierarchy | Coordinator UX with specialist calls | Peer debate that needs shared turn-taking |
FAQs
Is agent-to-agent chat the same as the A2A protocol?
No. Agent-to-agent chat here is in-process multi-agent conversation. A2A is a cross-runtime protocol for remote agents. They can complement each other but are not the same layer.
How many agents should a first chat include?
Two is enough to learn handoffs. Add a third only when you can name a distinct role, tool set, or trust boundary.
Do participants share tools automatically?
No. Attach tools per agent. Sharing every tool recreates a single over-privileged agent in costume.
How do I stop a conversation cleanly?
Use orchestration limits where provided, plus host timeouts, token budgets, and a success check on the final artifact.
Can I mix models across participants?
Yes in principle by giving agents different clients or model settings. Keep evaluation coverage for the weakest model in the ring.
When should I switch from SequentialBuilder to WorkflowBuilder?
When you need conditional edges, fan-out/join semantics, request/response human gates, or checkpoint resume beyond simple turn order.
What is Magentic orchestration for?
Manager-led multi-agent work on complex tasks with planning, stall handling, and specialist participants - heavier than a two-step sequential review.
How should I log multi-agent chat in production?
Log orchestration event type, participant name, turn index, tool calls, token usage, and stop reason. Phase labels beat raw dumps alone.
Can humans join the conversation?
Yes via human-in-the-loop patterns (workflow request/response or Magentic plan review). Do not fake HITL only inside the model prompt.
Does sequential chat preserve order guarantees?
Sequential builders run participants in defined order. Concurrent builders do not promise a single interleaved narrative without your aggregator.
How does this relate to CrewAI crews?
Similar role specialization idea, different runtime and enterprise integration story. Compare orchestration needs and ops stack, not only role metaphors.
Should every enterprise agent system be multi-agent chat?
No. Many problems need one bounded agent or a deterministic workflow. Multi-agent chat is for genuine collaboration or separation of duties.
Related
- Microsoft Agent Framework Basics - first two-agent example
- Graph-Based Workflows in Microsoft Agent Framework - graph alternative
- From AutoGen and Semantic Kernel to Microsoft Agent Framework 1.0 - merger context
- Migrating an Existing AutoGen Project to Microsoft Agent Framework - Team → orchestration
- Microsoft Agent Framework Best Practices - production practices
- Multi-Agent Handoff: Specialist Agents Passing Work to Each Other - pattern-level handoff design
Stack versions: Pins from the category manifest (verify at build): OpenRouter (~315+ models, July 2026 pricing/fees); LangGraph 1.0+; CrewAI 1.14+; Microsoft Agent Framework 1.0; Vercel AI SDK 6; Pydantic AI (latest); LlamaIndex (latest); OpenAI Agents SDK (latest + MCP); MCP (Linux Foundation governance); A2A (HTTP+SSE+JSON-RPC 2.0); Solana
@solana/web3.js+@solana/spl-token.