← All Minis/Agent War Room
AI / Agents · ~10-min ramp

Agent War Room

A planner agent decomposes a goal and delegates to specialist agents — researcher, analyst, writer, reviewer — then merges their work into one deliverable. This is the orchestration pattern behind Microsoft Agent Framework and Foundry Agent Service.

Foundry Agent Framework Multi-Agent Python
RESEARCHER R ANALYST A W WRITER REVIEWER PLANNER

🧩 What is multi-agent orchestration?

Real work is rarely one prompt. It's research → analysis → drafting → review. Instead of asking a single model to do everything, multi-agent orchestration uses a planner (orchestrator) that decomposes a goal into subtasks and hands each to the specialist agent best suited for it. Each specialist has its own instructions and tools; the planner then synthesizes their outputs into a final deliverable.

This is the dominant agentic pattern of 2026. Copilot Studio multi-agent systems are generally available, and Microsoft Foundry Agent Service ships the Agent Framework, hosted agents, and the A2A (agent-to-agent) protocol for agents that call each other across boundaries.

The decompose → delegate → run → synthesize loop

01DecomposePlanner breaks the goal into typed subtasks.
02DelegateEach subtask goes to the right specialist.
03RunSpecialists work — concurrently or in sequence.
04SynthesizePlanner merges results into one deliverable.

The live demo lets you set a mission, pick concurrent or sequential mode, and watch the planner delegate in real time.

🎯 Use cases

🚀
Launch planningResearch the market, size the opportunity, draft the announcement, and QA it — as a team.
📈
Business reviewsPull metrics, explain variance, write the executive summary, and fact-check the numbers.
🔎
InvestigationsGather signals, find root-cause drivers, summarize findings, and validate conclusions.
🧾
Document pipelinesExtract, analyze, draft, and review across long or messy source material.
💬
Customer operationsTriage, research history, propose a resolution, and check it before it goes out.
🧪
Research & synthesisFan out to many sources in parallel, then fan in to one coherent answer.

⚖️ Pros, cons & limitations

✓ Pros

  • Specialists with focused instructions beat one do-everything prompt.
  • Concurrent fan-out/fan-in is fast; sequential hand-offs add rigor.
  • Each agent can have its own tools, model, and Entra identity.
  • Maps naturally onto how human teams actually work.
  • Foundry adds tracing, evals, and managed scaling.

✕ Cons / trade-offs

  • More moving parts than a single agent — more to debug.
  • Multiple model calls mean higher token cost and latency.
  • Planner quality gates everything; a weak plan cascades.
  • Synthesis can lose detail if subtasks overlap or conflict.

△ Limitations

  • Some Foundry capabilities (hosted agents, A2A) are in preview.
  • Needs guardrails for prompt-injection across agents (XPIA).
  • Not every task benefits — simple asks are cheaper single-agent.
  • Requires evals to catch regressions as you iterate.

📦 Get the code

Three ways to go from this page to a working multi-agent system. Start with the prompt for speed, or follow the inline build to understand the orchestration.

Paste this into GitHub Copilot Chat (agent mode) in VS Code, or any capable coding model. It's a complete spec for the planner + specialists, plus the Foundry deploy path.

agent-war-room.prompt.txt
You are a senior AI engineer and an expert in multi-agent orchestration with the
Microsoft Agent Framework and Microsoft Foundry Agent Service.

Build me a working multi-agent system: a PLANNER agent that decomposes a goal,
delegates subtasks to SPECIALIST agents, and synthesizes their outputs into one
deliverable. It must run locally first, then deploy as Hosted agents on Foundry.

REQUIREMENTS

1. Stack
   - Python, Microsoft Agent Framework (agent-framework) for orchestration.
   - Models from the Foundry model catalog via the Responses API.
   - Keep agent logic framework-clean so it can be packaged as a Foundry Hosted agent.

2. Agents
   - Planner (orchestrator): decomposes the goal into typed subtasks, assigns each to the
     right specialist, then merges results into a final deliverable.
   - Specialists, each with its own instructions and tools:
       * Researcher  -> tool: web_search
       * Analyst     -> tool: code_interpreter
       * Writer      -> drafts the final content
       * Reviewer    -> checks accuracy, tone, compliance; can request one revision
   - Make the roster configurable (add/remove agents without code changes).

3. Orchestration
   - Concurrent mode: fan-out subtasks in parallel, fan-in results (asyncio.gather).
   - Sequential mode: hand-off chain where each agent builds on the previous output.
   - Stream progress: which agent is working, the subtask, and the partial result.

4. Foundry deployment
   - Package as a Hosted agent (container or zip), managed endpoint, per-agent Entra
     identity, autoscaling, session state.
   - Enable end-to-end tracing (Application Insights).
   - Add a small eval set; show how to run Foundry evals and the agent optimizer.
   - Publish to Microsoft 365 Copilot / Teams; expose over A2A for agent-to-agent calls.

5. Quality
   - Real async orchestration, structured logging, graceful failure if a specialist errors.
   - A README explaining the decompose -> delegate -> run -> synthesize flow with the
     example: "Plan the launch of our new AI feature."

Generate the full project: agents, orchestrator, requirements.txt, a run script, the
Foundry packaging + deploy steps, a tracing config, and an eval set. Then tell me how to
run it locally and verify it on Foundry. Ask me anything you need; otherwise build it.
Tip: In VS Code, open Copilot Chat, switch to Agent mode, paste the prompt, then run the generated script with a goal like "Plan the launch of our new AI feature."

Prefer to understand the orchestration? Here's the core in ~40 lines, then how to run it.

1. Planner + specialists — war_room.py

A planner decomposes the goal; specialists run concurrently; the planner synthesizes. (Uses the Microsoft Agent Framework against a Foundry/Azure OpenAI endpoint.)

war_room.py
import asyncio
from agent_framework.azure import AzureOpenAIChatClient
from azure.identity import AzureCliCredential

client = AzureOpenAIChatClient(credential=AzureCliCredential())

# --- Specialist roster: name -> instructions ---------------------------
SPECIALISTS = {
    "researcher": "Gather facts and sources for the subtask. Be concise.",
    "analyst":    "Analyze data, quantify impact, and flag risks.",
    "writer":     "Draft clear, on-brand content from the inputs.",
    "reviewer":   "Check accuracy, tone, and compliance. Approve or request one fix.",
}

def specialist(name: str):
    return client.create_agent(name=name, instructions=SPECIALISTS[name])

async def run_specialist(name: str, goal: str, task: str) -> str:
    agent = specialist(name)
    reply = await agent.run(f"GOAL: {goal}\nYOUR SUBTASK: {task}")
    return reply.text

async def war_room(goal: str, mode: str = "concurrent") -> str:
    planner = client.create_agent(
        name="planner",
        instructions="Decompose the goal into one subtask per specialist, "
                     "then merge their results into a single deliverable.",
    )
    # 1) Decompose: ask the planner for a subtask per specialist
    plan = await planner.run(
        f"GOAL: {goal}\nSpecialists: {', '.join(SPECIALISTS)}.\n"
        "Return one short subtask per specialist, 'name: task' per line."
    )
    tasks = dict(
        line.split(":", 1) for line in plan.text.splitlines() if ":" in line
    )
    tasks = {k.strip().lower(): v.strip() for k, v in tasks.items()
             if k.strip().lower() in SPECIALISTS}

    # 2) Delegate + run (concurrent fan-out / fan-in, or sequential)
    results = {}
    if mode == "concurrent":
        outs = await asyncio.gather(
            *(run_specialist(n, goal, t) for n, t in tasks.items())
        )
        results = dict(zip(tasks, outs))
    else:  # sequential hand-off chain
        carry = ""
        for n, t in tasks.items():
            results[n] = await run_specialist(n, goal, f"{t}\nContext so far: {carry}")
            carry += f"\n[{n}] {results[n]}"

    # 3) Synthesize
    summary = "\n".join(f"[{n}] {o}" for n, o in results.items())
    final = await planner.run(f"GOAL: {goal}\nSpecialist outputs:\n{summary}\n"
                              "Write the final deliverable.")
    return final.text

if __name__ == "__main__":
    print(asyncio.run(war_room("Plan the launch of our new AI feature.")))

2. Dependencies — requirements.txt

requirements.txt
agent-framework
azure-identity

3. Run it

  1. Create a venv and install: pip install -r requirements.txt.
  2. Sign in for local creds: az login (uses AzureCliCredential).
  3. Set your Foundry / Azure OpenAI endpoint & deployment as env vars (per the Agent Framework docs).
  4. Run: python war_room.py — watch the planner delegate and synthesize.
  5. Try sequential mode: call war_room(goal, mode="sequential") to chain hand-offs.
  6. Add a specialist by adding one line to SPECIALISTS — no other code changes.

4. Take it to Foundry

  • Package war_room.py as a Hosted agent (container or zip) for a managed endpoint, per-agent Entra identity, and autoscaling.
  • Turn on tracing (Application Insights) to see every model call and hand-off.
  • Add an eval set and run Foundry evals to score quality and catch regressions; use the agent optimizer to tune instructions.
  • Publish to Microsoft 365 Copilot / Teams, or expose over A2A for agent-to-agent calls.
Heads up: Hosted agents and A2A are in preview, and Agent Framework APIs evolve. The snippet shows the orchestration shape — confirm client/credential details against the current Microsoft Agent Framework and Foundry Agent Service docs.

A ready-to-clone GitHub repository for Agent War Room is on the way.

Coming soon: a public repo with the full multi-agent project, evals, and Foundry deploy. For now, use the advanced prompt or the inline build above.

🎮 See it before you build it

The interactive holographic demo animates the full decompose → delegate → run → synthesize loop. Set a mission, choose concurrent or sequential, and watch the planner command the room.

Launch the live demo