Multi-Agent Workflows

Multi-Agent Workflows

So far, everything we've done has been a single-agent workflow — one chat, one agent, doing one thing at a time. But Copilot actually supports running multiple agents at the same time, which opens up some pretty powerful possibilities.

Running Multiple Chat Windows

The simplest version of this is just opening multiple chat windows side by side. Click the dropdown arrow next to the plus button at the top of the chat and select "Open new chat window." You can do this multiple times and arrange the windows however you like.

Each window is independent — different mode, different model, different context — but they're all scoped to the same project. So you could have one window planning out a new feature while another window is in Agent mode adding tests. Both running at the same time.

Two Copilot chat windows open side-by-side

Just keep in mind: two agents touching the same code base simultaneously can get complicated. It's manageable with two windows, but be careful going beyond that.

Subagents

There's also a more automated approach: subagents. This is a built-in tool (available in Agent and Plan mode) that lets Copilot spin up and orchestrate its own little team of agents internally.

For example, you could ask Copilot to use the #run-subagent tool to run three agents in parallel — one reviewing the code for security issues, one for performance, and one for readability.

Available in “Agent” and “Plan” modes

Here's how it works under the hood:

  1. The main agent spawns one or more subagents and sends each one a prompt with instructions

  2. Each subagent runs in its own isolated context window — it only knows what the main agent tells it in its prompt

  3. The subagents go off, do their research, read files, work through the problem

  4. Each one returns a result (text or a file) back to the main agent

  5. The main agent gets just the final output — all the messy intermediate thinking stays in the subagent and gets discarded

If you're running subagents in parallel, the main agent waits for all of them to finish before moving on — so the total time is determined by the slowest one.

Subagents are powerful because they let Copilot do a lot of work in parallel without bloating the main context window. The two main patterns are:

  • Manual: you open multiple chat windows and orchestrate them yourself — good for a couple of independent tasks

  • Automated: you ask Copilot to use subagents and it handles the orchestration — good when you want Copilot to coordinate everything toward a single goal

Next Steps

Next up: Model Context Protocol. We'll look at how to extend Copilot's toolbox by connecting it to external services.

https://wiki.at.bitovi.com/wiki/spaces/AIEnabledDevelopment/pages/2179956794