GeezerVison is showing developer.microsoft.com — Add local AI to your WinUI app | Microsoft Developer
Skip to main content
Developer
Dynamics 365
GitHub
Microsoft 365
Microsoft Azure
Microsoft Edge
Microsoft Foundry
Microsoft Graph
Microsoft Identity Platform
Microsoft Teams
Power Platform
Visual Studio
Visual Studio Code
Windows
.NET
C++
Java
JavaScript
Python
TypeScript
Build APIs
Game development
Blog
Events
Documentation
Community
Changelog
Microsoft Security
Azure
Dynamics 365
Microsoft 365
Microsoft Teams
Windows 365
Microsoft AI
Azure Space
Mixed reality
Microsoft HoloLens
Microsoft Viva
Quantum computing
Sustainability
Education
Automotive
Financial services
Government
Healthcare
Manufacturing
Retail
Find a partner
Become a partner
Partner Network
Microsoft Marketplace
Software companies
Blog
Microsoft Advertising
Developer Center
Documentation
Events
Licensing
Microsoft Learn
Microsoft Research
View Sitemap
Windows Dev Center
Build Windows apps
Get developer tools
Code with AI
Run agents locally
Support
Partner Center
Don’t miss Microsoft Ignite – Connect with experts, build skills hands-on, and take a free onsite Microsoft or GitHub Certification exam.
Register now
Add local AI to your WinUI app
Add on-device text summarization to a WinUI note editor. Keep the original note editable and show an AI-generated draft below it while Foundry Local runs the selected model inside your app.
Why Foundry Local
Run a model inside your Windows app
Foundry Local handles model acquisition, compatible hardware acceleration, and inference while your app owns the user experience.
No cloud setup
Build the sample without an Azure subscription, API key, separate local server, or per-token service dependency.
Get started with Foundry Local
Local data path
The sample keeps notes and summaries on the device and doesn't fall back to a cloud model. Initial setup still downloads required components.
Review privacy details
Choose a compatible model
Start with a small CPU model, then compare model size, license, quality, and hardware support before choosing one for production.
Browse the model catalog
What you'll need
Prepare your local AI development environment
Microsoft Learn contains the current operating system, SDK, workload, model, storage, and download requirements.
A supported Windows 11 PC
Use an x64 or Arm64 device with enough memory and disk space for the model. A Copilot+ PC or dedicated NPU isn't required.
Review prerequisites
WinUI development tools
Use Visual Studio 2026 with the WinUI workload, or your preferred editor with the Windows App Development CLI.
Download Visual Studio
A Foundry Local model
Allow internet access for the initial package, model, and runtime downloads, then test the selected model against your app's content.
Browse available models
Ready to add local summarization?
Follow the maintained Microsoft Learn tutorial to create LocalNotes, prepare the model, handle cancellation and errors, and verify the feature offline.
See full tutorial