Image by Author
# Introduction
Running a top-performing AI model locally no longer requires a high-end workstation or expensive cloud setup. With lightweight tools and smaller open-source models, you can now turn even an older laptop into a practical local AI environment for coding, experimentation, and agent-style workflows.
In this tutorial, you will learn how to run Qwen3.5 locally using Ollama and connect it to OpenCode to create a simple local agentic setup. The goal is to keep everything straightforward, accessible, and beginner-friendly, so you can get a working local AI assistant without dealing with a complicated stack.
# Installing Ollama
The first step is to install Ollama, which makes it easy to run large language models locally on your machine.
If you are using Windows, you can either download Ollama directly from the official Download Ollama on Windows page and install it like any other application, or run the following command in PowerShell:
irm https://ollama.com/install.ps1 | iex
The Ollama download page also includes installation instructions for Linux and macOS, so you can follow the steps there if you are using a different operating system.
Once the installation is complete, you will be ready to start Ollama and pull your first local model.
# Starting Ollama
In most cases, Ollama starts automatically after installation, especially when you launch it for the first time. That means you may not need to do anything else before running a model locally.
If the Ollama server is not already running, you can start it manually with the following command:
# Running Qwen3.5 Locally
Once Ollama is running, the next step is to download and launch Qwen3.5 on your machine.
If you visit the Qwen3.5 model page in Ollama, you will see multiple model sizes, ranging from larger variants to smaller, more lightweight options.
For this tutorial, we will use the 4B version because it offers a good balance between performance and hardware requirements. It is a practical choice for older laptops and typically requires around 3.5 GB of random access memory (RAM).
To download and run the model from your terminal, use the following command:
The first time you run this command, Ollama will download the model files to your machine. Depending on your internet speed, this may take a few minutes.
After the download finishes, Ollama may take a moment to load the model and prepare everything needed to run it locally. Once ready, you will see an interactive terminal chat interface where you can begin prompting the model directly.
At this point, you can already use Qwen3.5 in the terminal for simple local conversations, quick tests, and lightweight coding help before connecting it to OpenCode for a more agentic workflow.
# Installing OpenCode
After setting up Ollama and Qwen3.5, the next step is to install OpenCode, a local coding agent that can work with models running on your own machine.
You can visit the OpenCode website to explore the available installation options and learn more about how it works. For this tutorial, we will use the quick install method because it is the simplest way to get started.
Run the following command in your terminal:
curl -fsSL https://opencode.ai/install | bash
This installer handles the setup process for you and installs the required dependencies, including Node.js when needed, so you do not have to configure everything manually.
# Launching OpenCode with Qwen3.5
Now that both Ollama and OpenCode are installed, you can connect OpenCode to your local Qwen3.5 model and start using it as a lightweight coding agent.
If you look at the Qwen3.5 page in Ollama, you will notice that Ollama now supports simple integrations with external AI tools and coding agents. This makes it much easier to use local models in a more practical workflow instead of only chatting with them in the terminal.
To launch OpenCode with the Qwen3.5 4B model, run the following command:
ollama launch opencode --model qwen3.5:4b
This command tells Ollama to start OpenCode using your locally available Qwen3.5 model. After it runs, you will be taken into the OpenCode interface with Qwen3.5 4B already connected and ready to use.
# Building a Simple Python Project with Qwen3.5
Once OpenCode is running with Qwen3.5, you can start giving it simple prompts to build software directly from your terminal.
For this tutorial, we asked it to create a small Python game project from scratch using the following prompt:
Create a new Python project and build a modern Guess the Word game with clean code, simple gameplay, score tracking, and an easy-to-use terminal interface.
After a few minutes, OpenCode generated the project structure, wrote the code, and handled the setup needed to get the game running.
We also asked it to install any required dependencies and test the project, which made the workflow feel much closer to working with a lightweight local coding agent than a simple chatbot.
The final result was a fully working Python game that ran smoothly in the terminal. The gameplay was simple, the code structure was clean, and the score tracking worked as expected.
For example, when you enter a correct character, the game immediately reveals the matching letter in the hidden word, showing that the logic works properly right out of the box.
# Final Thoughts
I was genuinely impressed by how easy it is to get a local agentic setup running on an older laptop with Ollama, Qwen3.5, and OpenCode. For a lightweight, low-cost setup, it works surprisingly well and makes local AI feel much more practical than many people expect.
That said, it is not all smooth sailing.
Because this setup relies on a smaller and quantized model, the results are not always strong enough for more complex coding tasks. In my experience, it can handle simple projects, basic scripting, research help, and general-purpose tasks quite well, but it starts to struggle when the software engineering work becomes more demanding or multi-step.
One issue I ran into repeatedly was that the model would sometimes stop halfway through a task. When that happened, I had to manually type continue to get it to keep going and finish the job. That is manageable for experimentation, but it does make the workflow less reliable when you want consistent output for larger coding tasks.
Abid Ali Awan (@1abidaliawan) is a certified data scientist professional who loves building machine learning models. Currently, he is focusing on content creation and writing technical blogs on machine learning and data science technologies. Abid holds a Master’s degree in technology management and a bachelor’s degree in telecommunication engineering. His vision is to build an AI product using a graph neural network for students struggling with mental illness.
