Workflows/Build a local AI agent with Qwen3-Coder-Next
Agents / WORKFLOW
Build a local AI agent with Qwen3-Coder-Next
Connect Qwen3-Coder-Next to Cline for a local AI agent that can work with files in your workspace. The example compares two product briefs, shows its file tools in action, and saves a cited result for you to inspect.
EstimatedSource checked 9/29/2026
LOCAL
Freshness 37 out of 100. Repository age: 258 days old, Jan 30, 2026. Measures age, not quality.37/ 100Freshness258 days oldRepository age · Jan 30, 2026
Popularity 79 out of 100. 588,526 downloads in 30 days; 1,696 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.79/ 100Popularity588.5K downloads / 30d1.7K lifetime likes · Checked Oct 15, 2026
What do these scores mean?+
Two ways to compare models. Neither score measures answer quality, benchmark performance, or whether a model fits your machine.
Freshness · release age
A new release starts at 100. The score halves every 180 days: 100 × 2^(−age in days / 180). When the release date is unavailable, a repository date is a fallback—not proof of when the model was released. Missing dates stay unscored.
Downloads over the past 30 days carry 80% of the score; lifetime likes carry 20%. Both use a logarithmic scale, capped at 10 million downloads and 100,000 likes. If likes are unavailable, downloads carry all the weight. Missing download statistics stay unscored.
Scores as of Oct 15, 2026. Statistics checked Oct 15, 2026. Statistics are marked for refresh after 72 hours.Full scoring method →
Before you begin
Hardware
Estimated for the supplied small task at 32K context. GPU rows need a supported Ollama backend. The 80B model does not fit entirely in a 32 GB card.
Machine
Qwen3-Coder-Next 80B · Q4
Qwen3-Coder-Next 80B · Uncensored Q4
NVIDIA · 32 GB VRAM + 64 GB RAM
Runs with CPU offload; close other apps
Runs with CPU offload; close other apps
NVIDIA · 80 GB VRAM + 128 GB RAM
Comfortable full-GPU starting estimate
Comfortable full-GPU starting estimate
AMD · 24 GB VRAM + 64 GB RAM
CPU offload; supported ROCm/Vulkan driver required
CPU offload; supported ROCm/Vulkan driver required
Intel · 24 GB VRAM + 64 GB RAM
CPU offload; supported Vulkan backend required
CPU offload; supported Vulkan backend required
Apple Silicon · 64 GB unified memory
Tight at 32K; close other apps and check pressure
Tight at 32K; close other apps and check pressure
Apple Silicon · 96 GB unified memory
Recommended unified-memory starting point
Recommended unified-memory starting point
CPU only · 64 GB system RAM
Tight and slow; 128 GB RAM is more comfortable
Tight and slow; 128 GB RAM is more comfortable
Context window
Context includes client instructions, tool calls, files and replies—not just your prompt. Keep the first example small.
Machine
Qwen3-Coder-Next 80B · Q4
Qwen3-Coder-Next 80B · Uncensored Q4
32 GB GPU + 64 GB RAM / 64 GB Mac
Start at 32,768 tokens; Compact Prompt and small files
Start at 32,768 tokens; Compact Prompt and small files
80 GB GPU + 128 GB RAM / 96 GB Mac
Start at 32,768; optional 65,536 after memory check
Start at 32,768; optional 65,536 after memory check
CPU · 128 GB RAM
Start at 32,768; expect slower tool iterations
Start at 32,768; expect slower tool iterations
The optional 64K preset is separate. Match Cline to the selected preset and verify the actual allocation with ollama ps. For larger repositories, limit scope or use more memory.
LOCAL AI AGENTSOURCE-LINKED SETUP
Build a local AI agent with Qwen3-Coder-Next
Set up a local AI agent with Qwen3-Coder-Next and Cline. In the example, the agent reads two local files, writes a cited comparison, and handles a follow-up after you update the source facts. The model, documents and inference stay on your computer.
Choose a package Run its commands Check the result
01
BEFORE YOU BEGIN
Choose your package
Select the weights you want. The instructions, downloads and settings change with your choice.
Save your machine in My Hardware to get an automatic starting choice. You can always choose any package yourself.
CURRENT SETUP
Qwen3-Coder-Next 80B · Q4 · official
Start at 32,768 tokens for this small Cline task with Compact Prompt. The 52 GB package can offload on a 32 GB GPU with 64 GB RAM; close other apps. 96 GB Mac or 80 GB VRAM is a more comfortable estimate. Longer context uses more memory; general agent workloads may need 64K or more.
Freshness 37 out of 100. Repository age: 258 days old, Jan 30, 2026. Measures age, not quality.37/ 100Freshness258 days oldRepository age · Jan 30, 2026
Popularity 79 out of 100. 588,526 downloads in 30 days; 1,696 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.79/ 100Popularity588.5K downloads / 30d1.7K lifetime likes · Checked Oct 15, 2026
What do these scores mean?+
Two ways to compare models. Neither score measures answer quality, benchmark performance, or whether a model fits your machine.
Freshness · release age
A new release starts at 100. The score halves every 180 days: 100 × 2^(−age in days / 180). When the release date is unavailable, a repository date is a fallback—not proof of when the model was released. Missing dates stay unscored.
Downloads over the past 30 days carry 80% of the score; lifetime likes carry 20%. Both use a logarithmic scale, capped at 10 million downloads and 100,000 likes. If likes are unavailable, downloads carry all the weight. Missing download statistics stay unscored.
Choose where you want to run it. The instructions below update to match your selection.
CHOOSE YOUR SETUPWindows
Native Ollama + Cline route. GPU acceleration depends on the exact driver/backend; CPU offload remains available.
01
Install Ollama for Windows
Download the native Ollama installer, run it, and launch the tray app. Keep it running. Open a new PowerShell window for this guide. Install the current NVIDIA driver, supported AMD ROCm/Vulkan driver, or Intel Vulkan driver for your exact card. CPU inference is also available. These instructions do not require WSL. If it is already installed and running, skip installation.
Install Visual Studio Code for Windows, then open the linked Cline extension and choose Install. No Python, Node.js or paid model-provider key is needed for this document task. The next step supplies the project folder to open in VS Code.
Download the ZIP below and extract it with File Explorer → Extract All. Move the extracted yourunai-agent-official-q4 folder into your home folder. Open this folder in VS Code using File → Open Folder. The starter contains docs/alpha.md, docs/beta.md, and the 32K/64K model presets.
In PowerShell, run these commands from the extracted folder. They download the exact selected package once and create its 32K preset using the supplied Modelfile. In VS Code you can use Terminal → New Terminal for the remaining commands. Keep at least 75 GB disk space for this full 80B Q4 package and runtime.
Open Cline Settings. Set provider to Ollama, Base URL to http://localhost:11434 and exact model ID to yourunai-coder-agent-official-q4-32k. Select this model for both Plan and Act if separate settings are enabled. In Features enable Use Compact Prompt. Set Cline's Ollama context size to 32768 if the field is shown; it must agree with the saved preset. Leave Auto Approve and YOLO off for this first run. Approve workspace reads and intended edits individually; browser access, MCP and unrelated shell commands are unnecessary. Keep this task confined to the open demo folder.
In Cline, choose Act and paste: “Use your file-reading tools to read docs/alpha.md and docs/beta.md. Create output/brief.md with a comparison table for price, retention, support target and exports, followed by a recommendation for a buyer who needs JSON export and an audit log. Cite each factual row with [alpha.md] or [beta.md]. Use only these files. Do not browse, install software, run shell commands, edit inputs or read outside this workspace. Show me the finished file.” Approve both read operations and only the proposed output/brief.md write. Cline is the single agent; file reading and writing are its tools.
07
Inspect the actual tool actions and saved brief
Expand Cline's activity entries and confirm it read both files, then wrote output/brief.md. Open that file in VS Code and compare it with the originals: Alpha $199/90 days/30 hours/CSV; Beta $349/180 days/12 hours/CSV+JSON plus audit log. Check the recommendation favors Beta for the stated requirements and every claim has the right filename. A fluent response in chat without the saved file and read actions is not success. In VS Code, click output/brief.md in Explorer and use Open Preview to read it beside the source documents.
08
Repeat a real follow-up task
Edit docs/beta.md yourself: change the annual price from $349 to $399. Start a fresh Cline task using the same prompt and approve the input reads and output rewrite again. Confirm output/brief.md now says $399 and all unchanged facts remain correct. This checks that the agent works from current files rather than recycling its previous reply.
09
Expand context only when the project needs it
The 32K preset is for this deliberately small example with Compact Prompt, not an entire repository. General coding and agent work may need 64K or more. If memory is comfortable, this optional PowerShell block creates a separate 65536-token preset. Select yourunai-coder-agent-official-q4-64k in Cline, match its context setting to 65536, start a new task and check ollama ps. If latency or memory pressure rises, switch back to the 32K preset and narrow the task. The starter already includes Modelfile-64k; no file editing is needed.
Click Cancel in Cline to stop a running task. In PowerShell, the command below unloads only this preset; saved files remain in the demo folder. Next time, open Ollama, reopen that folder in VS Code and choose the same local preset in Cline. The first request loads it again. Start a fresh Cline task for a new goal instead of carrying unrelated files through one long conversation.
ollama stop yourunai-coder-agent-official-q4-32k
03
SUCCESS CHECK · Qwen3-Coder-Next 80B · Q4
A useful brief backed by real file reads
Cline activity shows both input reads and an output write. output/brief.md accurately compares the four fields and cites the sources. After the price changes, a new task updates the brief correctly.
Source-checked instructions and estimated hardware requirements; this exact application/model task has not been physically executed by YouRunAI. The uncensored package is a Huihui community derivative; its behavior and tool reliability can differ from the official package.
Keep the Ollama app/service running, confirm ollama list shows the named 32K preset, and use provider Ollama with http://localhost:11434. Refresh the model list and select the same preset for Plan and Act.
Cline loops or emits tool instructions as plain text
Cancel the task. Enable Compact Prompt, use the official Q4 package first, confirm context is 32768 with ollama ps and start a fresh task restricted to the supplied files. Do not repeatedly approve unrelated actions. A community variant may be less reliable at tools.
Memory pressure or slow replies
Close other loaded models and large apps. Q4 still downloads 52 GB; a 32 GB GPU uses CPU/RAM offload. Return from the optional 64K preset to 32K, start a fresh small task and inspect the processor split. 96 GB unified memory or a larger GPU gives more headroom.
AMD or Intel uses only the CPU
Check the exact GPU/OS on Ollama’s hardware support page, install its documented driver and restart the running Ollama app/service. Verify the CPU/GPU split with ollama ps while Cline is responding.
The brief invents a fact or lacks a source
Compare the output with the two source files, name the incorrect field and ask for a targeted correction using those files. Require actual read entries and a corrected saved artifact; a chat-only apology does not fix the document.
REFERENCE LIBRARY
Sources and files
Original instructions, model files, and compatibility notes behind this setup.