Build with local AI on Windows

Create responsive AI experiences that can keep data on the device, remain available without a network connection, and reduce dependence on per-request cloud inference. Use Windows AI APIs, Microsoft Foundry on Windows, or Windows ML to match the local AI path to your app.

Explore AI Dev GalleryView local AI documentation
Why local AI

Bring inference closer to your app and its data

Local inference can complement cloud AI when an experience benefits from device data, immediate interaction, or continued operation without a reliable connection.
Privacy and data locality Keep supported workloads on the device Process app data locally when your scenario and selected capability support on-device inference. Learn about local AI Responsiveness Respond without a network round trip Use local inference for interactions that benefit from low latency and immediate feedback. Compare local and cloud AI Offline availability Keep key experiences available Design supported local AI features to continue working when connectivity is limited or unavailable. Get started with Foundry Local Flexible architecture Choose where each request runs Use local inference where it fits and connect to cloud services when a workload needs cloud scale or capabilities. Choose a Windows AI solution
Start building

Choose the local AI path that fits your app

Start with AI Dev Gallery to explore working samples. Then choose a Windows-managed API, a local model through Microsoft Foundry on Windows, or Windows ML for your own model.
Ready-to-use capabilities Windows AI APIs Add Windows-provided AI capabilities when your app needs a supported API without managing the model lifecycle directly. Windows AI APIs documentation Local generative AI Microsoft Foundry on Windows Use Foundry Local to find, download, and integrate supported open-source models for local inference in your Windows app. Microsoft Foundry on Windows documentation Bring your own model Windows ML Run custom or open-source models through the Windows ML runtime across supported Windows hardware. Windows ML documentation Working examples AI Dev Gallery Explore interactive local AI samples, test capabilities on your hardware, and inspect the source code. Explore AI Dev Gallery
Local AI for agents

Power agents with a local model on Windows

Run a ready-to-use local LLM with Foundry Local or bring your own ONNX model with Windows ML, then connect that local inference path to your agent experience.
Ready-to-use local LLMs Start with Foundry Local Use the Foundry Local SDK and CLI to evaluate and integrate a supported language model for local inference.
  • Get started with Foundry Local
  • Explore ready-to-use local LLMs
  • Bring your own model Use Windows ML for custom inference Find, convert, optimize, and accelerate an ONNX model across supported NPUs, GPUs, and CPUs with Windows ML.
  • Get started with Windows ML
  • Find or train models
  • Accelerate local inference
  • Ready to build agents that take action?

    Continue to the separate Windows agent guidance for identity, isolation, containment, governance, and policy controls.

    Explore secure agent development
    Continue learning

    Move from overview to implementation

    Use maintained documentation to choose an inference path, evaluate working samples, prepare models, and deploy local AI across Windows hardware.
    Choose an inference path Compare Windows AI APIs, Foundry Local, and Windows ML, then decide where local and cloud inference fit your app.
  • Microsoft Foundry on Windows
  • Windows AI APIs
  • Foundry Local
  • Windows ML
  • Choose your Windows AI solution
  • Tools, samples, and scenarios Evaluate local AI on your hardware and inspect working code.
  • AI Dev Gallery
  • AI code samples and tutorials
  • Foundry Toolkit for VS Code
  • Models, acceleration, and distribution Prepare ONNX models for Windows ML, accelerate them across available hardware, and choose how model files reach your users.
  • Find or train models
  • Accelerate AI models
  • Distribute models
  • Windows ML CLI