
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.
In this tutorial, you learn how to:
- Add the Foundry Local SDK to an existing Windows app.
- Ask before downloading a model and show setup progress.
- Keep the interface responsive while streaming a summary with a 256-token limit.
- Cancel generation without replacing the user's original text.
- Check output quality, recoverable failures, and offline inference.

Run a model inside your Windows app
Foundry Local handles model acquisition, compatible hardware acceleration, and inference while your app owns the user experience.Prepare your local AI development environment
Microsoft Learn contains the current operating system, SDK, workload, model, storage, and download requirements.


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.