November 25th, 2025
heart1 reaction

Introducing TypeSpec for Microsoft 365 Copilot – Build declarative agents faster with more confidence

Sébastien Levert
Principal Product Manager

We’re excited to announce that TypeSpec for Microsoft 365 Copilot is now generally available! This milestone marks the first stable release of the domain-specific language (DSL) designed to streamline how developers build and extend Microsoft 365 Copilot. Whether you’re creating an agent to help colleagues find documents, or connecting your service as an API plugin, TypeSpec for Microsoft 365 Copilot makes the process simpler, safer, and more productive. 

A developer-centric experience – strong typing, IntelliSense and productivity 

One of the biggest pain points for developers building Copilot extensibility solutions has been managing complex configuration files and schema definitions. TypeSpec addresses this by offering strong type safety and a fully typed development experience – type errors are surfaced at compile time rather than being discovered during runtime. The language integrates with Visual Studio Code and Visual Studio, providing rich IntelliSense and inline documentation. This means less time spent debugging manifest errors and more time focused on delivering value. Features like built-in type checking, IntelliSense and development-time validation make it easier to catch mistakes early and maintain high-quality code. 

What is TypeSpec for Microsoft 365 Copilot? 

TypeSpec is a Microsoft-crafted DSL for API-first development, letting you model APIs in a concise, human-readable format and generate artifacts such as OpenAPI specs or manifest files from a single source of truth. This Microsoft 365 Copilot variant takes this even further, providing Microsoft 365-specific decorators and capabilities to simplify authoring of declarative agents and API plugins. Instead of hand-coding multiple JSON or YAML files (agent manifest, plugin manifest, OpenAPI document, etc.), you describe your agent’s instructions, capabilities and API operations using a clean syntax that is familiar to developers. The TypeSpec compiler then automatically produces the required manifests and configurations, ensuring they conform to the latest schema requirements, ensuring they conform to the latest schema requirements. 

Simplified agent and plugin authoring 

Using TypeSpec’s intuitive decorators and capabilities make building declarative agents for Microsoft 365 Copilot a breeze. It’s simple to get started using the Microsoft 365 Agents Toolkit! 

Agents Toolkit - Create a new declarative agent

Start with creating a new agent 

Agents Toolkit - Create a new declarative agent

Select “Start with TypeSpec for Microsoft 365 Copilot” 

The following example highlights a simple agent that is a GitHub expert project manager. 

import "@typespec/http";
import "@typespec/openapi3";
import "@microsoft/typespec-m365-copilot";
import "./actions.tsp";

using TypeSpec.Http;
using TypeSpec.M365.Copilot.Agents;
using TypeSpec.M365.Copilot.Actions;

@agent({
  name: "GitHub Project Manager",
  description: "Smart project management agent with GitHub integration for issue tracking"
})
@instructions("""
  You are an intelligent project management assistant specialized in GitHub workflows
  and development team coordination. You excel at managing GitHub repositories issues,
  You can help prioritize work, track progress, and facilitate team collaboration through 
  GitHub's project management features. Always consider development best practices, help 
  maintain code quality through proper review processes, and provide actionable insights to
  improve team productivity and project delivery.
""")
namespace GitHubProjectManager {
  op codeInterpreter is AgentCapabilities.CodeInterpreter;  
  op webSearch is AgentCapabilities.WebSearch<Sites = [{
      url: "https://docs.github.com/en/issues";
  }]>;

  @service
  @actions(#{
      nameForHuman: "GitHub Project Management API",
      descriptionForModel: "GitHub API integration for project management focusing on issue tracking",
      descriptionForHuman: "Use this API to manage GitHub repository issues and track issues"
  })
  @server("https://api.github.com", "GitHub API")
  namespace GitHubAPI {
    @route("/repos/{owner}/{repo}/issues")
    @get
    @action
    op getIssues(
      @path owner: string = "octocat",
      @path repo: string = "Hello-World",
      @query state?: "open" | "closed" | "all",
      @query labels?: string,
      @query assignee?: string,
      @query milestone?: string,
      @query since?: string
    ): string;
  }
}

It simply adds key concepts of declarative agents (instructions, conversation starters, API plugins) without any of the complexity and fragility of JSON editing. 

What are developers saying about TypeSpec for Microsoft 365 Copilot 

During our preview, we collaborated closely with a select group of developers and customers to refine TypeSpec for Microsoft 365 Copilot. Their feedback was instrumental in shaping the developer experience and validating our approach. As Andrew Connell (Microsoft MVP, Founder Voitanos LLC) shared: “I love using TypeSpec for creating Declarative Agents – it’s a significant improvement for developer productivity! While text and JSON files remain a great option for low-code scenarios, TypeSpec brings IntelliSense, type checking, and reusability that developers really appreciate. In my Copilot extensibility workshops, I show both approaches, but for developers specifically, my preference and recommendation is definitely TypeSpec.” 

Why this matters – and what’s next 

The general availability of TypeSpec for Microsoft 365 Copilot signals that the language and associated tooling have reached a stable baseline and are ready for production use! If you’re building custom agents or API plugins, now is the perfect time to adopt TypeSpec and the Microsoft 365 Agents Toolkit. You’ll be able to focus on defining the logic and capabilities of your agent, confident that the extension will handle the manifest generation, OpenAPI compliance and secure integration into Microsoft 365’s AI ecosystem. will handle the manifest generation, OpenAPI compliance and secure integration into Microsoft 365’s AI ecosystem. 

Ready to get started? 

Check out the official documentation to learn more about TypeSpec for Microsoft 365 Copilot capabilities, explore the built-in decorators and agent capabilities, and dive into the M365 Agents Toolkit for a guided development experience. You can also get started right now with following the Copilot Camp lab on TypeSpec for Microsoft 365 Copilot! We can’t wait to see what you’ll build with TypeSpec for Microsoft 365 Copilot and declarative agents! 

Author

Sébastien Levert
Principal Product Manager

Sebastien is a Principal Product Manager on the Microsoft 365 Copilot Extensibility team helping full-stack developers building declarative agents!

0 comments