Hands-On: Coding to the Windows Copilot Runtime (Premium)

9 long months after it announced the Windows Copilot Runtime, Microsoft finally made some preview APIs available to developers. Here's a brief look at the experience and how to get started with these new capabilities.

I wrote about the history of this project earlier today in No (Local) AI Developer Left Behind? (Premium), mostly because I had hoped to experiment with these capabilities long before now. But with the release of the Windows App SDK 1.7 Experimental 3 last week, it's finally possible.
Requirements
The Windows Copilot Runtime (WCR) APIs require a Copilot+ PC. It's not clear from the documentation whether this works only on Snapdragon X-based Copilot+ PCs for now, or if you can use an Intel Lunar Lake or AMD Zen 5-based PC as well. (The documentation is inconsistent and makes both claims in different places.) But if it's limited to Snapdragon X, that will change eventually.

Either way, the PC you code on must be enrolled in the Windows 11 Insider Preview Program and running the latest Dev channel build (26120.3073 at the time of this writing). Technically, this build is available in the Build channel now as well. The reason? The APIs access four of the small language models (SMLs) that come preinstalled on these PCs, and you can only get the latest versions--and related user features like Recall and Click to Do--via the Insider Program. This, too, will change in time.

(If you attempt to access an AI for which the underlying model is not present, Windows will prompt you to check Windows Update and it will then download that for you.)
Available APIs
While the APIs available in Windows App SDK 1.7 Experimental 3 are incomplete, it's a pretty solid list. They include:

Microsoft.Graphics.Imaging. Image APIs related to image extraction, object selection in images, image scaling, and the like.
Microsoft.Windows.AI.ContentModeration. As part of Microsoft's Responsible AI initiative, these APIs will attempt to filter out potentially harmful content from being prompted to or created.
Microsoft.Windows.AI.Generative. These are the core on-device generative AI APIs for both text and image creation.
Microsoft.Windows.SemanticSearch. These APIs provide the same semantic search capabilities that Microsoft is starting to test now in Windows 11 Search and File Explorer in the Dev channel. It pattern matches document and image files.
Microsoft.Windows.Vision. These APIs provide text and image object recognition capabilities in images.
Microsoft.Windows.Workloads. The on-device AI functions provided here run within a new Workloads container that I think is conceptually similar to the Windows Services host process (svhost).

I will focus on the generative text APIs since that's something I'm interested in providing one day in .NETpad.
The dev environment
You can use the current, stable version of Visual Studio 2022. But you will need to add Windows App SDK 1.7 Experimental 3 support to your project (and run it all on...

Gain unlimited access to Premium articles.

With technology shaping our everyday lives, how could we not dig deeper?

Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.

Tagged with

Share post

Thurrott