{"id":25058,"date":"2025-11-25T07:54:48","date_gmt":"2025-11-25T15:54:48","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=25058"},"modified":"2025-11-25T07:54:48","modified_gmt":"2025-11-25T15:54:48","slug":"introducing-typespec-for-microsoft-365-copilot","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/introducing-typespec-for-microsoft-365-copilot\/","title":{"rendered":"Introducing TypeSpec for Microsoft 365 Copilot \u2013 Build declarative agents faster with more confidence"},"content":{"rendered":"<p><span data-contrast=\"auto\">We\u2019re\u00a0excited to announce that\u00a0<\/span><b><span data-contrast=\"auto\">TypeSpec for Microsoft 365 Copilot <\/span><\/b><span data-contrast=\"auto\">is now generally available!\u00a0This milestone marks the first stable release of the domain-specific language (DSL) designed to streamline how developers build and extend Microsoft 365 Copilot. Whether\u00a0you\u2019re\u00a0creating an agent to help colleagues find documents, or connecting your service as an API plugin,\u00a0<\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365-copilot\/extensibility\/overview-typespec\"><span data-contrast=\"none\">TypeSpec\u00a0for Microsoft 365 Copilot<\/span><\/a><span data-contrast=\"auto\">\u00a0makes the process simpler,\u00a0safer,\u00a0and more productive.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"3\"><span data-contrast=\"none\">A developer-centric experience \u2013 strong typing,\u00a0IntelliSense\u00a0and productivity<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">One of the biggest pain points for developers building Copilot extensibility solutions has been managing complex configuration files and schema definitions.\u00a0TypeSpec\u00a0addresses this by offering\u00a0<\/span><b><span data-contrast=\"auto\">strong type safety and a fully typed development experience<\/span><\/b><span data-contrast=\"auto\">\u00a0\u2013 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\u00a0<\/span><b><span data-contrast=\"auto\">type checking, IntelliSense and development-time validation<\/span><\/b><span data-contrast=\"auto\">\u00a0make it easier to catch mistakes early and\u00a0maintain\u00a0high-quality code.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"3\"><span data-contrast=\"none\">What is\u00a0TypeSpec\u00a0for Microsoft 365 Copilot?<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><a href=\"https:\/\/typespec.io\/\"><span data-contrast=\"none\">TypeSpec<\/span><\/a><span data-contrast=\"auto\">\u00a0is a Microsoft-crafted DSL for API-first development, letting you model APIs in a concise, human-readable format and generate artifacts such\u00a0as\u00a0OpenAPI\u00a0specs or manifest files from\u00a0a single source\u00a0of truth.\u00a0This Microsoft 365 Copilot variant takes this even further, providing\u00a0<\/span><b><span data-contrast=\"auto\">Microsoft 365-specific\u00a0decorators\u00a0and\u00a0capabilities<\/span><\/b><span data-contrast=\"auto\">\u00a0to simplify authoring of declarative agents and API plugins.\u00a0Instead of hand-coding multiple JSON or YAML files (agent manifest, plugin manifest,\u00a0OpenAPI\u00a0document, etc.), you describe your agent\u2019s instructions, capabilities and API operations using a clean\u00a0syntax\u00a0that is familiar to developers.\u00a0The\u00a0TypeSpec\u00a0compiler then\u00a0<\/span><b><span data-contrast=\"auto\">automatically produces the required manifests and configurations<\/span><\/b><span data-contrast=\"auto\">, ensuring they conform to the latest schema\u00a0requirements,\u00a0ensuring they conform to the latest schema requirements.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"3\"><span data-contrast=\"none\">Simplified agent and plugin authoring<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Using\u00a0TypeSpec\u2019s\u00a0<\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365-copilot\/extensibility\/typespec-decorators\"><b><span data-contrast=\"none\">intuitive decorators<\/span><\/b><\/a><span data-contrast=\"auto\">\u00a0and\u00a0<\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365-copilot\/extensibility\/typespec-capabilities\"><b><span data-contrast=\"none\">capabilities<\/span><\/b><\/a><b><span data-contrast=\"auto\">\u00a0<\/span><\/b><span data-contrast=\"auto\">make building declarative agents for Microsoft 365\u00a0Copilot\u00a0a\u00a0breeze.\u00a0It\u2019s\u00a0simple to get started using the Microsoft 365 Agents Toolkit!<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{}\"> <img decoding=\"async\" class=\"alignnone wp-image-25062 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-26.webp\" alt=\"Agents Toolkit - Create a new declarative agent\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-26.webp 1920w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-26-300x169.webp 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-26-1024x576.webp 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-26-768x432.webp 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-26-1536x864.webp 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/span><\/p>\n<p style=\"text-align: center;\"><i><span data-contrast=\"none\">Start with creating a new agent<\/span><\/i><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{}\"><img decoding=\"async\" class=\"alignnone wp-image-25063 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-32.webp\" alt=\"Agents Toolkit - Create a new declarative agent\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-32.webp 1920w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-32-300x169.webp 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-32-1024x576.webp 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-32-768x432.webp 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/11\/Screenshot.2025-11-25.06-35-32-1536x864.webp 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/span><\/p>\n<p style=\"text-align: center;\"><i><span data-contrast=\"none\">Select \u201cStart with\u00a0TypeSpec\u00a0for Microsoft 365 Copilot\u201d<\/span><\/i><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The following example highlights a simple agent that is\u00a0a\u00a0GitHub expert project manager.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<pre class=\"prettyprint language-ts\"><code class=\"language-ts\">import \"@typespec\/http\";\r\nimport \"@typespec\/openapi3\";\r\nimport \"@microsoft\/typespec-m365-copilot\";\r\nimport \".\/actions.tsp\";\r\n\r\nusing TypeSpec.Http;\r\nusing TypeSpec.M365.Copilot.Agents;\r\nusing TypeSpec.M365.Copilot.Actions;\r\n\r\n@agent({\r\n  name: \"GitHub Project Manager\",\r\n  description: \"Smart project management agent with GitHub integration for issue tracking\"\r\n})\r\n@instructions(\"\"\"\r\n  You are an intelligent project management assistant specialized in GitHub workflows\r\n  and development team coordination. You excel at managing GitHub repositories issues,\r\n  You can help prioritize work, track progress, and facilitate team collaboration through \r\n  GitHub's project management features. Always consider development best practices, help \r\n  maintain code quality through proper review processes, and provide actionable insights to\r\n  improve team productivity and project delivery.\r\n\"\"\")\r\nnamespace GitHubProjectManager {\r\n  op codeInterpreter is AgentCapabilities.CodeInterpreter;  \r\n  op webSearch is AgentCapabilities.WebSearch&lt;Sites = [{\r\n      url: \"https:\/\/docs.github.com\/en\/issues\";\r\n  }]&gt;;\r\n\r\n  @service\r\n  @actions(#{\r\n      nameForHuman: \"GitHub Project Management API\",\r\n      descriptionForModel: \"GitHub API integration for project management focusing on issue tracking\",\r\n      descriptionForHuman: \"Use this API to manage GitHub repository issues and track issues\"\r\n  })\r\n  @server(\"https:\/\/api.github.com\", \"GitHub API\")\r\n  namespace GitHubAPI {\r\n    @route(\"\/repos\/{owner}\/{repo}\/issues\")\r\n    @get\r\n    @action\r\n    op getIssues(\r\n      @path owner: string = \"octocat\",\r\n      @path repo: string = \"Hello-World\",\r\n      @query state?: \"open\" | \"closed\" | \"all\",\r\n      @query labels?: string,\r\n      @query assignee?: string,\r\n      @query milestone?: string,\r\n      @query since?: string\r\n    ): string;\r\n  }\r\n}<\/code><\/pre>\n<p><span data-contrast=\"auto\">It simply adds key concepts of declarative agents (instructions, conversation starters, API plugins) without any of the complexity and fragility of JSON editing.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"3\"><span data-contrast=\"none\">What are\u00a0developers saying about\u00a0TypeSpec\u00a0for Microsoft 365 Copilot<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">During our preview, we collaborated closely with a select group of developers and customers to refine\u00a0TypeSpec\u00a0for Microsoft 365 Copilot. Their feedback was instrumental in shaping the\u00a0developer\u00a0experience and\u00a0validating\u00a0our approach.\u00a0As Andrew\u00a0Connell (Microsoft MVP, Founder\u00a0Voitanos\u00a0LLC) shared: \u201cI love using\u00a0TypeSpec\u00a0for creating Declarative Agents &#8211;\u00a0it&#8217;s\u00a0a significant improvement for developer productivity! While text and JSON files\u00a0remain\u00a0a great\u00a0option\u00a0for low-code scenarios,\u00a0TypeSpec\u00a0brings 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\u00a0is\u00a0definitely\u00a0TypeSpec.\u201d<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"3\"><span data-contrast=\"none\">Why this matters \u2013 and\u00a0what\u2019s\u00a0next<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">The\u00a0general availability\u00a0of\u00a0<\/span><b><span data-contrast=\"auto\">TypeSpec\u00a0for Microsoft 365 Copilot<\/span><\/b><span data-contrast=\"auto\">\u00a0signals that the language and associated tooling have reached a stable baseline and are ready for production use!\u00a0If\u00a0you\u2019re\u00a0building custom agents or API plugins, now is the perfect time to\u00a0<\/span><b><span data-contrast=\"auto\">adopt\u00a0TypeSpec\u00a0and the\u00a0<\/span><\/b><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365\/developer\/overview-m365-agents-toolkit\"><b><span data-contrast=\"none\">Microsoft\u00a0365 Agents Toolkit<\/span><\/b><\/a><span data-contrast=\"auto\">.\u00a0You\u2019ll\u00a0be able to focus on defining the logic and capabilities of your agent, confident that the\u00a0extension\u00a0will handle the manifest generation,\u00a0OpenAPI\u00a0compliance\u00a0and secure integration into Microsoft 365\u2019s AI ecosystem.\u00a0will handle the manifest generation,\u00a0OpenAPI\u00a0compliance\u00a0and secure integration into Microsoft 365\u2019s AI ecosystem.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2><b><span data-contrast=\"auto\">Ready to get started?<\/span><\/b><span data-contrast=\"auto\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Check out the\u00a0<\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365-copilot\/extensibility\/overview-typespec\"><span data-contrast=\"none\">official documentation<\/span><\/a><span data-contrast=\"auto\">\u00a0to learn more about\u00a0TypeSpec\u00a0for Microsoft 365\u00a0Copilot\u00a0capabilities, explore the built-in decorators and agent capabilities, and dive into the\u00a0M365\u00a0Agents Toolkit for a guided development experience.\u00a0You can also get started right now\u00a0with\u00a0following the\u00a0<\/span><a href=\"https:\/\/microsoft.github.io\/copilot-camp\/pages\/extend-m365-copilot\/01-typespec-declarative-agent\/\"><span data-contrast=\"none\">Copilot Camp lab<\/span><\/a><span data-contrast=\"auto\">\u00a0on\u00a0TypeSpec\u00a0for Microsoft 365 Copilot!\u00a0We\u00a0can\u2019t\u00a0wait to see what\u00a0you\u2019ll\u00a0build with\u00a0TypeSpec\u00a0for Microsoft 365 Copilot\u00a0and\u00a0declarative agents!<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re\u00a0excited to announce that\u00a0TypeSpec for Microsoft 365 Copilot is now generally available!\u00a0This milestone marks the first stable release of the domain-specific language (DSL) designed to streamline how developers build and extend Microsoft 365 Copilot. Whether\u00a0you\u2019re\u00a0creating an agent to help colleagues find documents, or connecting your service as an API plugin,\u00a0TypeSpec\u00a0for Microsoft 365 Copilot\u00a0makes the process [&hellip;]<\/p>\n","protected":false},"author":69087,"featured_media":25069,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[390,1],"tags":[361,428],"class_list":["post-25058","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365-copilot","category-microsoft-365-developer","tag-declarative-agents","tag-typespec-for-microsoft-365-copilot"],"acf":[],"blog_post_summary":"<p>We\u2019re\u00a0excited to announce that\u00a0TypeSpec for Microsoft 365 Copilot is now generally available!\u00a0This milestone marks the first stable release of the domain-specific language (DSL) designed to streamline how developers build and extend Microsoft 365 Copilot. Whether\u00a0you\u2019re\u00a0creating an agent to help colleagues find documents, or connecting your service as an API plugin,\u00a0TypeSpec\u00a0for Microsoft 365 Copilot\u00a0makes the process [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/25058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69087"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=25058"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/25058\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25069"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=25058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=25058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=25058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}