Create VS Code Copilot custom agents and subagent orchestration systems. Use when building .agent.md files, designing multi-agent workflows, creating coordinator/worker patterns, setting up subagent delegation, nested subagents (subagents calling subagents), or configuring handoffs between agents in VS Code GitHub Copilot.
Create .agent.md files for GitHub Copilot in VS Code — from simple specialized agents to full multi-level agent orchestration systems.
Custom Agent — a .agent.md file with YAML frontmatter + Markdown instructions. Defines the agent's persona, tools, and behavior.
Subagent — any agent invoked by another agent via the agent tool. Gets an isolated context window; returns only its final result to the caller.
Coordinator — an agent that uses the agent tool to delegate tasks. It routes, it does not implement.
Worker — an agent that does specialized work (research, coding, review) and returns a structured result. Workers can spawn their own subagents only when the repository workflow and the agent allowlist explicitly permit it.
Nested Subagent — a worker agent that itself invokes sub-workers. Enables multi-level orchestration hierarchies (Coordinator → Worker → Sub-worker).
.github/agents/
└── my-agent.agent.md
.github/agents/
├── coordinator.agent.md # user-facing, manages workers
├── researcher.agent.md # user-invocable: false
├── implementer.agent.md # user-invocable: false
└── reviewer.agent.md # user-invocable: false
.github/agents/
├── coordinator.agent.md # top-level, delegates to workers
├── lead-researcher.agent.md # worker that spawns sub-researchers
├── sub-researcher-a.agent.md # leaf worker (read-only)
├── sub-researcher-b.agent.md # leaf worker (read-only)
└── implementer.agent.md # leaf worker (write access)
.claude/agents/ # Claude Code format (plain .md)
├── researcher.md
└── implementer.md
Define one clear responsibility. Examples: "plan features", "review security", "research codebase".
---