February 19th, 2026
celebratelikeheart9 reactions

Custom Agents in Visual Studio: Built in and Build-Your-Own agents

Agents in Visual Studio now go beyond a single general-purpose assistant. We’re shipping a set of curated preset agents that tap into deep IDE capabilities; debugging, profiling, testing alongside a framework for building your own custom agents tailored to how your team works.

Built in agents

Each preset agent is designed around a specific developer workflow and integrates with Visual Studio’s native tooling in ways that a generic assistant can’t.

  • Debugger – Goes beyond “read the error message.” Uses your call stacks, variable state, and diagnostic tools to walk through error diagnosis systematically across your solution.
  • Profiler – Connects to Visual Studio’s profiling infrastructure to identify bottlenecks and suggest targeted optimizations grounded in your codebase, not generic advice.
  • Test – (when solution is loaded) Generates unit tests tuned to your project’s framework and patterns, not boilerplate that your CI will reject.
  • Modernize (.NET and C++ only) -Framework and dependency upgrades with awareness of your actual project graph. Flags breaking changes, generates migration code, and follows your existing patterns.

Access them through the agent picker in the chat panel or using ‘@’ in chat.

Bring your own: custom agents (preview)

The presets cover workflows we think matter most, but your team knows your workflow better than we do. Custom agents let you build your own using the same foundation—workspace awareness, code understanding, tools accessed by your prompts, your preferred model, and your tools.

Where it gets powerful is MCP. You can connect custom agents to external knowledge sources internal documentation, design systems, APIs, and databases so the agent isn’t limited to what’s in your repo.

A few patterns we’re seeing from teams:

  • Code review that checks PRs against your actual conventions, connected via MCP to your style guide or ADR repository
  • Design system enforcement connected to your Figma files or component libraries to catch UI drift before it ships
  • Planning helps you think through a feature or task before any code is written. Gathers requirements, asks clarifying questions, and builds out a plan that you can hand off

The awesome-copilot repo has community-contributed agent configurations you can use as starting points.

Get started

Custom agents are defined as .agent.md files in your repository’s .github/agents/ folder:

your-repo/
└── .github/
    └── agents/
        └── code-reviewer.agent.md

A few things to note:

  • This is a preview feature; the format of these files may change over to support different capabilities
  • If you don’t specify a model, the agent uses whatever is selected in the model picker
  • Tool names vary across GitHub Copilot platforms- check the tools available in Visual Studio specifically to make sure your agent works as expected
  • Configurations from the awesome-copilot repo are a great starting point, but verify tool names before using them in VS

Tell us what you’re building

Share your configurations in the awesome-copilot repo or file feedback here.

Author

Rhea Patel
Product Manager

7 comments

Discussion is closed. Login to edit/delete existing comments.

Sort by :
  • Jins Peter · Edited

    I got the custom agents loaded after installing of VS 18.4 on 14th March 2026. But now I cant find the same, Only built in agents are listed,

    Is there any kind of feature switch?

  • NilTor geethin

    So, when will we be able to manage models (hide unnecessary model displays)?

    And when can we add custom models (OpenAI-compatible)?

    Additionally, when will it be more convenient to add file (or directory) context, for example, by directly dragging and dropping files into the chat?

  • Subramaniyan Annamalai

    How to enable this preview feature in Visual Studio 2026?

    • Kelly FamMicrosoft employee · Edited

      This was enabled in 18.4 Insiders 2. All you have to do is add an “.agent.md” file in your workspace’s .github/agents folder as the blog mentioned. Happy coding!

      • Unais Ek

        Great! I hope Visual studio will soon get most of the copilot features in VS code, like skills, prompts, custom-instructions etc.

  • Alex Lambert

    Is there now also a mcp for running tests as there is for build? That would be a huge improvement as currently it always uses the run command mcp action which I am not confident (anymore) to allow for the session as it also can decide to run git commands so you loose your work. So I always have to approve each test command one by one.

    • Abhitej John BandiMicrosoft employee

      As of 18.4, running tests is available as a built-in tool. It leverages VS test explorer’s functionality and context.