Back to All
Developer Blog

Build and run 100% local AI agents – Snapdragon X Elite demo video

Sign up for Developer monthly newsletter-image

Sign up for Developer monthly newsletter

Join thousands of developers around the globe who receive latest news and updates from our monthly curated newsletter.

Sign up

We’ve posted recently about running AI inference locally on devices powered by Snapdragon X Series processors. And now Paul Couvert has published a step-by-step video on how you can create and run an AI agent 100% locally on a laptop running Windows on Snapdragon. The AI agent is designed to automate an ordinary, manual procedure.

Paul points out the same advantages we’ve been emphasizing for running AI locally, including:

  • No need to be connected to the internet; you can work entirely off line.
  • No need to be a software developer.
  • Complete privacy for your data, prompts and results.
  • You can do this with open-source software; no need to pay a proprietary provider like OpenAI or Anthropic for an API key.

 

Build and Run an AI Agent locally on your Laptop (for free)

Below, we summarize the steps in the demo video to show how easy it is to try this on your own.

1. Setting up local chat with an LLM

First, you’ll configure your laptop or PC so you can chat locally with an LLM.

Paul walks through downloading and installing LM Studio, a cost-free tool for working with models. LM Studio offers an installer for Windows on Snapdragon.

You’ll then select and load an LLM to run locally in LM Studio; Paul recommends the Google Gemma 3 12B, a new model that is powerful for its size, from Bartkowski. LM Studio offers multiple quantizations (options and sizes) for the model, and Paul uses Q4_0 because it’s optimized for laptops powered by Snapdragon. The model is 8+ GB in size.

Selecting Google Gemma 3 12B in LM Studio
Figure 1: Selecting Google Gemma 3 12B in LM Studio

Once you’ve installed the model, you’ll have an LLM you can chat with locally.

2. The manual procedure to be automated

You can design and create AI agents that save you time by automatically executing manual procedures. For this demo, the manual task is similar to scraping websites and online documents for specific text and placing the text in a file. The steps are:

  1. Go to the Models section of Hugging Face
  2. Filter AI models by type of license
  3. Sort the resulting models by Most Likes
  4. Extract the names of the 5 most popular models
  5. Copy the names and paste them into a new .txt file

Come for support, stay for the community

Get support from experts, connect with like-minded developers, and access exclusive virtual events.

Selecting model names in Hugging Face
Figure 2: Selecting model names in Hugging Face

You’ll build an AI agent to automate the procedure and help you discover similar use cases.

3. Getting the open-source software

Besides LM Studio and the Google Gemma model, you’ll download and install other open-source, free-of-charge components:

If you prefer, you may use other tools with similar functions.

4. Creating and executing the prompt

To generate the AI agent you want, you’ll have to give LM Studio and the Gemma 3 model a prompt. In this case, the prompt consists of three parts:

  • Natural language instructions – The text explains to the model that you want to use Smolagents to build an AI model that will build AI agents. You want the result to explain step by step how you can run the AI agent on Windows 11 in a uv Python environment. You mention that VS Code and Python are already installed, and that you want to run locally using LM Studio.
  • Sample script
  • LiteLLM documentation – From this bit of documentation, the model will learn how to connect the AI agent to LM Studio and run locally, without relying on proprietary APIs.

You copy the entire prompt, paste it into the “Type a message...” box in LM Studio, then select the Gemma 3 model downloaded earlier and click Send. At this point, the model loads and executes the prompt entirely locally. You can even disconnect from the network without interrupting execution.

The video shows the Windows Task Manager and the distribution of work across the local CPU, GPU and NPU. Paul points out that the laptop powered by Snapdragon can perform compute-intensive AI inference against a full model while simultaneously recording and encoding video.

Within a minute, the Assistant field in LM Studio begins scrolling with the results from the model:

AI inference results in LM Studio
Figure 3: AI inference results in LM Studio

When LM Studio is finished, you’ll have not only step-by-step instructions for creating the AI agent but also the Python script for the agent. Copy the entire script in preparation for the next step.

5. Running the script for the AI agent in Visual Studio Code

Switch to Visual Studio Code (VS Code) and paste the Python script into a new file (in the demo, app.py) in a VS Code folder (here, BLOGAGENT).

To power the AI agent, you must connect it to LM Studio. In the VS Code editor, modify a couple of values (model_id and api_base) in the Python script. Then, from the Terminal pane, launch the Python script (here, you run python app.py).

Over in LM Studio, the Developer Log shows debug messages from the AI agent:

Developer Log entries in LM Studio
Figure 4: Developer Log entries in LM Studio

In VS Code, the Terminal pane displays the progress:

User output in Visual Studio Code
Figure 5: User output in Visual Studio Code

When the Python script finishes, it saves the new file with the results in the BLOGAGENT folder:

Output file with names of top AI models
Figure 6: Output file with names of top AI models

Your turn

That’s how you can run an AI agent 100% locally thanks to LM Studio, Visual Studio Code, Python and Smolagents from Hugging Face. The video proves that devices powered by Snapdragon X and Snapdragon X Elite processors can easily perform 100% local AI inference even in airplane mode. They ensure strong privacy and run cost-free, open-source software.

Ready to try AI inference on your own laptop? Most of what you need to know is in this post, but you can follow along to the demo video from Paul Couvert (17 minutes).

You’ll find links above to all the software you need.

 

 

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries.

About the Author
Devang Aggarwal
Devang AggarwalProduct Manager, Senior
Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

Stay connected

Get the latest Qualcomm and industry information delivered to your inbox.

Subscribe
Manage your subscription

© Qualcomm Technologies, Inc. and/or its affiliated companies.

Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.