Skip to main content

Agents

Status: πŸ§ͺ Beta

Agents are the core building block of Agent Teams. Each agent is a GitHub Copilot chat participant with a defined role, skills, routing rules, and optional context packs.


Creating an Agent​

Open the dashboard and navigate to Agent Manager β†’ Create Agent, or use the Quick Actions card on the home page.

The Agent Manager page header also provides a Design a new agent with AI button that opens @agent-designer directly in Copilot Chat β€” useful when you want AI to draft the spec first.

The wizard guides you through 6 steps:

Step 0 β€” Identity​

FieldDescription
NameDisplay name shown in Copilot Chat
Rolerouter, orchestrator, worker, or aggregator (see Roles)
DescriptionWhat the agent does β€” shown in the chat participant list
DomainPrimary domain (e.g. frontend, backend, testing)
SubdomainOptional specialization within the domain (hidden for router and orchestrator)

Step 1 β€” Scope​

Note: This step is hidden for router agents β€” routers receive all @router messages and do not need scope filters.

Defines when this agent is activated by the @router.

FieldDescription
Expertise areasTopics the agent is proficient in (tag input)
IntentsAction verbs the agent responds to (e.g. write, review, fix)
TopicsSubject keywords that trigger routing (e.g. react, database)
File glob patternsFile paths that activate this agent, with a priority level per pattern
Exclude patternsFile paths to explicitly exclude from routing

Step 2 β€” Workflow & Tools​

FieldDescription
Workflow stepsOrdered list of steps the agent follows when handling a task
ToolsCapabilities the agent can use. VS Code built-in tools (read, edit, search, execute, browser, agent, web, todo, vscode, complete-subtask) are shown as a checkbox grid. Custom or extension tools are added as free-text rows below. Each tool has an optional when condition
MCP Servers(Collapsible) MCP servers required by this agent. On sync they are merged (by id) into .vscode/mcp.json (Copilot) or .mcp.json (Claude). New entries are added; existing ones are never overwritten
Claude Code Sub-agent MCP Servers(Visible when claude_code target is active) MCP servers scoped to this sub-agent only β€” they connect when the sub-agent starts and disconnect when it finishes. Distinct from the MCP Servers section above, which syncs to the workspace config file

Legacy tool names: Agent specs that reference the old compound names (search/codebase, edit/editFiles) are automatically normalized to their current short equivalents (search, edit) during sync β€” no manual update to existing YAML files is required.

Step 3 β€” Skills​

Note: This step is hidden for router agents β€” routers use dispatch tools (agent-teams-handoff, agent-teams-dispatch-parallel) rather than domain skills.

Browse and add skills from two sources:

  • Project skills β€” skills defined in your local skills.registry.yml
  • Community registry β€” install skills from the shared registry directly from this step

Each skill card shows its title, category, security level, and recommended roles. Select the skills relevant to this agent's purpose.

Step 4 β€” Rules​

Note: Permissions and Constraints are hidden for router agents β€” their behavior is governed entirely by the dispatch tools.

SectionDescription
PermissionsWhat the agent is allowed to do
Constraints β€” AlwaysRules the agent must always follow
Constraints β€” NeverActions the agent must never take
Constraints β€” EscalateSituations where the agent should hand off to a human
Handoffs β€” Receives fromWhich agents can delegate to this one
Handoffs β€” Delegates toWhich agents this one can hand off to
Handoffs β€” Escalates toWhich agents or roles to escalate to when stuck
EngramToggle Autonomous task context to enable direct dispatch. Available for all roles β€” the hint text updates to describe the behaviour for the current role. Workers recall task context from Engram at session start and call complete_subtask automatically when done. Per-agent opt-in: an agent that declares engram in its mcpServers list receives Engram memory features even when no global Engram MCP server is configured for the workspace β€” enabling self-contained agents that bootstrap on a fresh machine

Step 5 β€” Output & Context​

Note: Max items and Never include are hidden for router agents β€” routers produce a dispatch action, not a structured text response.

FieldDescription
Output templateResponse format template
Output modeshort or detailed
Max itemsMaximum number of items to include in a list response
Never includeFields to omit from the agent's output
Context packsContext packs to embed in the agent spec (feeds the composition engine)
Sync targetsWhich AI tools to sync to: Claude Code, Codex, GitHub Copilot
Claude Code Settings(Visible when claude_code target is active) Model, Max Turns, Effort, Permission Mode, Disallowed Tools, and Background task toggle β€” all optional and scoped to the Claude Code sub-agent

A live preview of the agent configuration appears in the right sidebar throughout the wizard. Click Create when done β€” the agent spec is written to .agent-teams/agents/<id>.yml.


Managing Agents​

View All Agents​

Dashboard β†’ Agent Manager shows all loaded agents organized into three tabs β€” Router, Orchestrator, and Worker β€” each showing a live count. An empty-state message is shown per tab when no agents of that role exist.

The page header has two action buttons: Create Agent (opens the wizard) and Design a new agent with AI (opens @agent-designer in Copilot Chat).

Edit an Agent​

  1. Dashboard β†’ Agent Manager β†’ select agent β†’ Edit
  2. All 6 wizard steps are available for modification
  3. Save β€” changes are written back to the YAML spec file

Not Synced Badge​

Agents whose source spec was modified after the last successful sync show a Not synced badge (orange indicator) in the Agent Manager card. Sync the team to clear the badge.

Sync Agents to .github/agents/​

When agents are ready, sync them to generate the final markdown files used by GitHub Copilot:

  1. Dashboard home β†’ Sync Status card shows pending changes
  2. Click the Sync button to apply all changes
  3. The dashboard updates the stats card to reflect the new sync state

Preview before syncing: the Sync Status card shows a breakdown of which agents will be created, updated, or skipped before you commit.


Agent Roles​

RolePurpose
routerReceives all @router messages and delegates via agent-teams-handoff (single) or agent-teams-dispatch-parallel (multi-domain)
orchestratorCoordinates multi-step tasks across several worker agents within a domain
workerHandles a specific, focused domain task. Can optionally operate in autonomous mode (see engram.mode) to accept direct dispatch without a router or orchestrator
aggregatorCollects results from parallel orchestrators, detects conflicts, and returns a unified response

Using an Agent in Copilot Chat​

Each loaded agent registers as a dynamic chat participant:

@my-agent  What is the best way to structure this React component?

Use @router to let the extension automatically pick the most relevant agent based on your message and the current file:

@router  Help me write a unit test for this function.

The router scores agents by intent keywords, file path patterns, domain vocabulary, and role β€” then delegates to the top match.


Reference: Agent YAML Format​

The dashboard writes and reads this format automatically. You can also edit the file directly in VS Code β€” changes are picked up on the next sync or Reload Agents.

id: my-agent
name: My Agent
description: Short description of what this agent does
role: worker # router | orchestrator | worker | aggregator

skills:
- code_analysis
- file_operations

routing:
keywords:
- component
- react
- frontend
paths:
- src/components/**

context_packs:
- frontend-conventions

Fields​

FieldRequiredDescription
idβœ…Unique identifier (kebab-case)
nameβœ…Display name shown in Copilot Chat
descriptionβœ…What the agent does
roleβœ…router, orchestrator, worker, or aggregator
skillsβ€”List of skill IDs from the registry
routing.keywordsβ€”Words that trigger routing to this agent
routing.pathsβ€”Glob patterns for file-based routing
context_packsβ€”Context pack IDs to embed in responses
engram.modeβ€”default or autonomous. See Engram Autonomous Mode
mcpServersβ€”List of MCP server definitions to merge into the project MCP config on sync. See MCP Servers

Engram Autonomous Mode​

Worker agents can be configured to operate in autonomous mode when Engram is set up. This allows the worker to be dispatched directly β€” without going through a router or orchestrator β€” and manage its own task lifecycle.

id: my-worker
name: My Worker
role: worker
engram:
mode: autonomous

In this mode the worker:

  1. Recalls task context from Engram at session start:
    • If the chat contains [Handoff:{taskId}] β€” retrieves the full task details written by the dispatcher.
    • If the chat contains [Parallel:{taskId}] β€” retrieves its specific subtask instructions.
    • Otherwise, loads domain patterns only.
  2. Signals completion automatically β€” after persisting its result to Engram, calls complete_subtask to notify the aggregator.
  3. Receives the complete-subtask tool automatically β€” no manual tool configuration required.

When to use it: choose autonomous mode for workers that are dispatched directly via agent-teams-dispatch-parallel in multi-domain flows where no intermediate orchestrator is needed. For standard router β†’ orchestrator β†’ worker flows, the default mode is sufficient.

To enable it in the wizard, go to Step 4 β€” Rules and check Engram β†’ Autonomous task context (requires Engram configured).


MCP Servers​

Agents can declare the MCP servers they depend on. When a team is synced, Agent Teams merges those servers into the project MCP configuration automatically β€” so every collaborator gets the right tools without manual setup.

id: my-worker
role: worker
mcpServers:
- id: my-mcp-server
command: npx -y my-mcp-server
args:
- --port
- "3000"
env:
API_KEY: "${MY_API_KEY}"

Merge behaviour:

  • Copilot target β†’ merged into .vscode/mcp.json under the servers key
  • Claude target β†’ merged into .mcp.json at project root under the mcpServers key
  • Merge key is id β€” if a server with that id already exists in the file it is never overwritten, so project-level overrides are always preserved

MCP Server fields​

FieldRequiredDescription
idβœ…Unique server identifier used as the merge key
commandβœ…Command to start the server (e.g. npx -y my-mcp-server)
argsβ€”List of command-line arguments
envβ€”Environment variables passed to the server process

To configure MCP servers in the wizard, open Step 2 β€” Workflow & Tools and expand the MCP Servers collapsible section.


GitHub Copilot target​

When github_copilot is included in the agent's targets (the default), the sync generates a .md file in .github/agents/ that conforms to the VS Code Copilot agent format.

Frontmatter​

FieldDescription
nameDisplay name of the agent (from the spec name field)
descriptionOne-line description used in Copilot Chat
toolsAllowlist of tools the agent can call (auto-populated β€” see below)
user-invocableSet to false for workers with receivesFrom (subagents not meant to be called directly)

Tool auto-injection​

The tools frontmatter field is built automatically from three sources:

  1. Standard workflow tools β€” injected based on role so the agent can execute lean body steps:

    RoleAuto-injected
    All rolesread, search
    Worker+ edit
    Orchestrator+ todo
  2. Engram tools β€” engram/* is injected whenever the agent uses Engram (via mcpServers or tools). Additional dispatch tools are injected based on role:

    RoleAdditional tools
    Router, Orchestratoregdev6.agent-teams/agent-teams-handoff, egdev6.agent-teams/agent-teams-dispatch-parallel
    Worker with receivesFromegdev6.agent-teams/agent-teams-complete-subtask
  3. Explicit spec tools β€” any tools listed in the spec's tools field (e.g. execute, custom MCP tools) are appended after normalization.

complete-subtask belongs to workers, not orchestrators. Workers that receive dispatched sub-tasks call complete-subtask to signal fan-in back to the orchestrator. The orchestrator dispatches and waits β€” it never calls complete-subtask itself.

Memory​

Persistent memory for Copilot agents is provided by Engram MCP, configured via .vscode/mcp.json. The tools frontmatter includes engram/* automatically when Engram is active β€” no manual configuration required. The body steps follow the same condensed session pattern as Claude Code (mem_session_start at start, mem_save + mem_session_end at end).

Body structure​

The generated body uses the same lean format as the Claude Code target:

You are the <name> agent.

## Role
- <expertise or scope topics>

## Constraints ← only if defined in spec
- <always rules>
- Do not <never rules>
- Escalate when: <escalate rules>

## Approach
1. Start Engram session: call `mem_session_start`, then `mem_context` to load recent context.
2–N. <workflow steps>
N+1. Save to Engram: call `mem_save` with key from `mem_suggest_topic_key`, then `mem_session_end`.

## Delegates to ← orchestrators and routers only
- `<agent-id>`

## Output Format
- <bullets derived from output.template>

Orchestrators also get a dispatch step injected after "Assign each sub-task":

For each delegation: use `egdev6.agent-teams/agent-teams-handoff` (single agent) or
`egdev6.agent-teams/agent-teams-dispatch-parallel` (parallel) β€” do NOT respond until
all invocations complete.

And the "Delegates to" section includes dispatch instructions with both tools plus a note that workers (not the orchestrator) call complete-subtask when done.


Claude Code target​

When claude_code is included in the agent's targets, the sync generates a .md file in .claude/agents/ that conforms to the Claude Code sub-agent format.

How the generated file differs from the GitHub Copilot format​

AspectGitHub CopilotClaude Code
name frontmatterDisplay nameSlug (id field) β€” used for @agent-<name> and --agent
BodyLean system prompt: Role β†’ Constraints β†’ Approach β†’ Output FormatLean system prompt: Role β†’ Constraints β†’ Approach β†’ Output Format
Tools frontmatterAuto-injected per role + Engram + spec toolsOnly emitted if explicitly declared in tools (translated to Claude names)
Dispatch toolsagent-teams-handoff, agent-teams-dispatch-paralleldispatch_task (Claude Code SDK)
Complete fan-inagent-teams-complete-subtask (worker)complete_subtask (worker)
id fieldEmittedNot emitted (not a Claude Code field)
Engram config.vscode/mcp.json (workspace)mcpServers in agent frontmatter (sub-agent scoped)

Claude Code-specific spec fields​

These fields are only used when syncing to the claude_code target. All are optional β€” omitting them lets Claude Code inherit the session default.

FieldTypeEmitted asNotes
claude_modelinherit | sonnet | opus | haikumodelOmit or set inherit to use session model
claude_max_turnsinteger β‰₯ 1maxTurnsOmit to use Claude Code default
claude_effortlow | medium | high | maxeffortOmit to inherit from session
claude_permission_modedefault | acceptEdits | dontAsk | bypassPermissionspermissionModeOmit to use default
claude_disallowed_toolsstring[]disallowedToolsTools to deny on top of inherited set
claude_backgroundbooleanbackgroundRun sub-agent as background task
claude_mcp_serversobject[]mcpServersMCP servers scoped to this sub-agent only (see below)

claude_mcp_servers vs mcpServers: mcpServers merges servers into the workspace config file (.mcp.json). claude_mcp_servers scopes servers to this sub-agent only β€” they appear in the agent's frontmatter mcpServers field and are connected when the sub-agent starts and disconnected when it finishes.

claude_mcp_servers fields​

FieldRequiredDescription
nameβœ…Server name / key
typeβ€”stdio | http | sse | ws
commandβ€”Executable to launch
argsβ€”Command-line arguments
envβ€”Environment variables

Tool name translation​

The wizard and YAML spec use VS Code tool names. During sync to claude_code, these are automatically translated to their Claude Code equivalents:

Spec / wizard nameClaude Code tool(s) emitted
readRead
editEdit
searchGrep, Glob
executeBash
browserWebFetch
webWebSearch
agentAgent
todoTodoWrite
engram/*, egdev6.*, complete-subtask, vscode(skipped β€” MCP or extension-only tools)

If no translatable tools are present, the tools: frontmatter line is omitted entirely and the sub-agent inherits all available tools.

Memory​

Persistent memory for Claude Code agents is provided exclusively by Engram MCP. The native Claude Code memory: frontmatter field is not used β€” Engram covers the same capability with richer features (semantic search, cross-agent context, session tracking).

When Engram is active, the generated body includes condensed session steps:

  • Start: mem_session_start + mem_context
  • End: mem_save + mem_session_end

Claude Code body structure​

The body structure is identical to the GitHub Copilot target β€” same sections, same Engram condensation pattern. The only differences are tool names:

  • Dispatch: dispatch_task MCP tool (instead of agent-teams-handoff / agent-teams-dispatch-parallel)
  • Fan-in: complete_subtask (instead of agent-teams-complete-subtask) β€” called by workers, not orchestrators
  • Orchestrator dispatch step: same injection after "Assign each sub-task", with dispatch_task references

Example spec for a Claude Code worker with all optional fields shown:

id: engram-dashboard-worker
name: Engram Dashboard Worker
role: worker
description: Use proactively for React/TypeScript work in the Engram dashboard, especially stats views, observation filtering, and files under src/pages/engram-dashboard/.
claude_model: sonnet
claude_max_turns: 10
claude_effort: high
claude_permission_mode: acceptEdits
claude_disallowed_tools:
- Bash
claude_background: false
targets:
- claude_code

claude_mcp_servers example (sub-agent scoped, not merged into workspace config):

claude_mcp_servers:
- name: my-data-server
type: stdio
command: npx -y my-data-mcp
env:
API_KEY: "${MY_API_KEY}"