Skip to content

πŸ’» Agent Builder β€” VS Code PathΒΆ

L100 L200 L300

Build AI agents that extend Visual Studio Code β€” turning Copilot Chat into a powerful, customizable coding assistant with domain-specific knowledge and actions.


What You'll BuildΒΆ

  • βœ… A VS Code Chat Participant (@myagent) that responds in Copilot Chat
  • βœ… A chat participant that calls an MCP Server for live data
  • βœ… Understanding of the VS Code Extension API for AI features

Path Labs (1 labs, ~45 min total)ΒΆ

Lab Title Level Cost
Lab 025 VS Code Copilot Chat Participant L200 βœ… Free

Key ConceptsΒΆ

Chat Participants (@participant)ΒΆ

Chat participants are VS Code extensions that register a handler for Copilot Chat. When a user types @myagent, your code runs and responds.

vscode.chat.createChatParticipant('myagent', async (request, context, stream, token) => {
    stream.markdown(`You asked: **${request.prompt}**`);
    // Call LLM, tools, MCP servers...
});

VS Code Language Model APIΒΆ

VS Code exposes LLMs (GitHub Copilot's models) directly to extensions β€” no API key needed for users.


PrerequisitesΒΆ

  • VS Code 1.90+
  • Node.js 20+
  • GitHub Copilot extension installed

External ResourcesΒΆ