Build declarative agents with Visual Studio Code and Microsoft 365 Agents Toolkit

Completed

Microsoft 365 Agents Toolkit enables developers to build declarative agents with more control and scalability than in Copilot Studio. When is this development path the right choice compared to other extensibility options? This unit helps you evaluate whether building a declarative agent with Microsoft 365 Agents Toolkit is the best fit for your scenario, based on your goals, technical requirements, and available development resources.

Benefits of building declarative agents with Microsoft 365 Agents Toolkit and Visual Studio Code

Microsoft 365 Agents Toolkit is an evolution of Teams Toolkit. It enables developers to build pro-code declarative agents that can be surfaced in Microsoft 365 Copilot Chat or embedded in Teams. These agents are ideal for complex workflows, custom integrations, and branded user experiences.

Consider building a declarative agent with Microsoft 365 Agents Toolkit if:

  • You have pro-code developers building and maintaining the solution.
  • You want to manage your project using source control and CI/CD pipelines.
  • You want to experiment, fork, and iterate on agent capabilities in a developer-friendly environment.

For integration and extensibility:

  • You want to integrate with any API using OpenAPI specs or custom REST endpoints.
  • You need to bundle the agent with other Teams app components. (such as tabs, messaging extensions.)
  • You need to build agents that support adaptive cards and rich UI rendering.
  • You want early access to advanced features. (such as code interpreter, semantic search.)

Limitations of building declarative agents with Microsoft 365 Agents Toolkit

There are trade-offs to consider when choosing this development path:

  • No Power Platform connector support: Unlike Copilot Studio, Microsoft 365 Agents Toolkit doesn’t support drag-and-drop connectors for quick integration.
  • No no-code UI: Agent configuration requires manual JSON editing; there’s no toggle-based UI.
  • Limited reuse in low-code tools: Agents built in Microsoft 365 Agents Toolkit can’t be reused in Copilot Studio or its agent builder.
  • Steeper learning curve: Designed for professional developers, which may be less accessible to business users or IT admins.

Requirements for building declarative agents with Microsoft 365 Agents Toolkit

To build agents with Microsoft 365 Agents Toolkit and Visual Studio Code, you’ll need:

  • A Microsoft 365 tenant.
  • Visual Studio Code with the Microsoft 365 Agents Toolkit extension.
  • Familiarity with JSON.

Optional:

  • Access to internal APIs or services the agent will integrate with.
  • GitHub or Azure DevOps for source control and CI/CD.

Scenario spotlight: Expense support agent

Let’s revisit our scenario. Your organization wants to improve the employee experience around travel and expense management. One common challenge is that employees need real-time updates on reimbursement status and help submitting expense reports.

As part of the company’s broader travel and expense initiative, the IT team uses Microsoft 365 Agents Toolkit and Visual Studio Code to build an expense support agent. This agent:

  • Retrieves real-time reimbursement status from the company’s finance system.
  • Helps users submit new expense reports using adaptive cards.
  • Provides a branded, multi-turn conversational experience in Copilot Chat.

This solution gives developers high control over the agent’s behavior, data access, and user interface—making it ideal for complex, high-impact scenarios.

Analysis

Microsoft 365 Agents Toolkit is the best fit because the solution needs to be:

  • Highly customizable and integrated with internal systems.
  • Capable of displaying structured responses and interactive UI.
  • Built and maintained by professional developers.
  • Designed for deployment in Microsoft 365 Copilot Chat or Microsoft Teams.

Why are other options suboptimal?

  • Copilot connectors: Useful for surfacing static content, but not suitable for building interactive, conversational agents or triggering actions.
  • Copilot Studio: Great for low-code scenarios, but lacks the pro-code flexibility, adaptive card support, and developer tooling needed for this level of customization.