Qwen-style — a coding agent with Qwen Code's system prompt
A general coding agent for mm whose system prompt follows Qwen Code's, the terminal coding agent of the Qwen team, adapted to mm's tools — in three configurations, one per Qwen model served by llmman. The three files share the same system prompt, byte for byte, the same tools, skills and safety settings; only the model and what it needs change.
| File | Model | Size (Q4_K_M) | Kind | Reasoning |
|---|---|---|---|---|
agent.qwen3.8.yaml |
hf.co/unsloth/Qwen3.8-27B-GGUF:Q4_K_M |
17.4 GB | dense 27B | on, reasoning_effort: medium |
agent.coder-next.yaml |
hf.co/unsloth/Qwen3-Coder-Next-GGUF:Q4_K_M |
48.5 GB | mixture of experts, 80B, ~3B active | none (the model does not reason) |
agent.qwen3.6.yaml |
hf.co/unsloth/Qwen3.6-35B-A3B-GGUF:Q4_K_M |
23.0 GB | mixture of experts, 35B, ~3B active | on (no effort setting) |
| Prompt | Qwen Code's core prompt (packages/core/src/core/prompts.ts), same sections, same order |
| Skills | new-app and simplify, adapted from Qwen Code's bundled skills |
| Tools | bash, read_file, write_file, edit_file, plan, read_skill, lsp |
| Project rules | the project's AGENTS.md (Qwen Code reads QWEN.md) |
Prerequisites
llmman pull hf.co/unsloth/Qwen3.8-27B-GGUF:Q4_K_M # or one of the two others
llmman serve
go build -o mm . # at the repository root
All three models use the hybrid attention of Qwen3-Next / Qwen3.5 (one layer in four does full attention): the KV cache stays small even with a long window, and memory is mostly the weights. An estimate, not measured: Qwen3.8 (17.4 GB) fits a 32 GB machine, Qwen3.6 (23 GB) is tight there, Coder-Next (48.5 GB) needs 64 GB or more.
Run
From the project to work on:
cd ~/src/my-project
mm -config /path/to/mini-me/demos/qwen-style/agent.qwen3.8.yaml
In the terminal, skillsDir: skills is resolved from the directory mm is started in. From another project, set it to the absolute path of this demo's skills/ directory (in an editor, through ACP, it is resolved next to the configuration file and works as is).
Like Qwen Code, the agent asks before every change (yolo: false): [a] once, [s] this tool for the session, [r] reject, [n] never. For an unattended run:
AGENT_YOLO=true mm -config …/agent.qwen3.8.yaml -p "go test fails in this project. Fix it."
In an editor (Zed, JetBrains…): mm -acp -config /path/to/demos/qwen-style/agent.qwen3.8.yaml.
Language servers (lsp)
The agent has mm's lsp tool — definition, references, hover, symbols, diagnostics, rename — for three languages. Install the servers you need; each one is optional:
| Language | Server | Install |
|---|---|---|
Go (.go) |
gopls |
go install golang.org/x/tools/gopls@latest |
Rust (.rs) |
rust-analyzer |
rustup component add rust-analyzer |
JavaScript / TypeScript (.js, .jsx, .ts, .tsx) |
tsc --lsp --stdio |
npm i -g typescript (7 or later) |
- A server missing from the
PATHis a warning in the banner and is skipped; with none installed, the tool is not declared and the agent usesgrep. - A server starts on the first
lspcall for one of its files, in the directory mm runs in (the project root), and stays up for the session. - Node: the project needs a
jsconfig.jsonortsconfig.json; without one each file is seen alone andreferences/renamemiss the other files. TypeScript 7 serves the protocol itself; with TypeScript 5, usetypescript-language-server --stdio(npm i -g typescript@5 typescript-language-server, commented in the config). - Rust: rust-analyzer indexes the crate after it starts; the first calls can answer "no reference found" or "content modified". The prompt tells the agent to call again once. Rename from the file that defines the function: in
main.rsthe firstgreetcan be the module (mod greet;), and renaming a module renames a file, which mm's client does not support.
Measured on 2026-10-12 with agent.qwen3.8.yaml, "rename the function everywhere" on a two-file project per language (AGENT_YOLO=true mm -p): Go, Rust and Node (TypeScript 7, with a jsconfig.json) all renamed through lsp, 1 run each; on Rust the first call met the indexing and the agent called again. agent.qwen3.6.yaml and agent.coder-next.yaml share the same prompt and were not measured.
What was kept from Qwen Code's prompt
All the sections, in their order: identity, Core Mandates, Task Management, Software Engineering Tasks (plan → implement → adapt → verify → report faithfully), New Applications, Communicating With the User, Tone and Style, Security and Safety, Using Your Tools, Executing actions with care, Git Repository, Examples, Final Reminder. The wording of the rules is Qwen Code's wherever it applies unchanged.
What was changed, and why
| Qwen Code | Here | Why |
|---|---|---|
| "You are Qwen Code, … developed by Alibaba Group" | "an interactive CLI agent … running through mini-me" | This agent is not Qwen Code. |
ask_user_question tool; prompt variants for interactive, headless and ACP modes |
"ask in your answer, briefly, and end your turn" | mm has no question tool, and the prompt cannot know whether it runs in -p. |
todo_write |
plan |
mm's equivalent. |
glob, grep_search |
bash with rg, grep -rn, git ls-files, find |
mm has no dedicated search tool. |
edit (old_string / new_string) |
edit_file (edits: [{old, new}]) |
mm's tool. |
| "Always use absolute paths" | "paths are relative to the working directory" | mm's file tools resolve paths against the working directory (the ACP session's directory in an editor). |
is_background: true, monitor |
nohup … > log 2>&1 &, then pkill |
mm's bash has no background mode. |
| "Call independent tools in parallel" | one tool per reply, parallel_tool_calls: false |
as in the gopher demo: with parallel calls, a model runs the tests in the same reply as the edit, before seeing it land. |
| sandbox sections (Seatbelt, bwrap, Landlock) | dropped | they describe Qwen Code's own sandboxes. |
<system-reminder>, <persisted-output> |
the [... N characters truncated ...] line |
what mm actually adds to a long tool result. |
| Git section only in a git repository (checked at start-up) | always present, "when the working directory is a git repository" | the prompt is static. |
| "Answer in …" (output-language setting) | "answer in the language of the user's message" | no language setting in mm. |
Examples chosen by model name ([tool_call: …] notation for Qwen3.8 and Qwen3.6) |
examples in the models' native XML (<tool_call><function=…><parameter=…>) |
see below. |
| (no language server) | lsp tool for Go, Rust, JavaScript/TypeScript, with its rules in the tool section |
An mm addition: compiler-exact references and renames instead of grep and hand edits. |
Tuned for each model
Facts read from the GGUF files served by llmman (POST /api/show: metadata and chat template), not from memory.
Common to the three.
- Native tool-call format. All three chat templates ask for Qwen3-Coder's XML format (
<tool_call><function=…><parameter=…>). Qwen Code picks its examples by model name: it shows this format toQwen3-Coder-Next("qwen-coder" examples), but the "general"[tool_call: …]notation toQwen3.8-27BandQwen3.6-35B-A3B, which match none of its patterns. Here every model gets the examples in the format it was trained to emit, with mm's tool names and parameters. - Window. 262,144 tokens; compression at 30 % (~79k tokens), the same point for the three.
- One tool call per reply (
parallel_tool_calls: false).
Qwen3.8 27B (agent.qwen3.8.yaml)
- Reasoning. The template thinks by default and adds "Reasoning effort is set to xhigh" to the system prompt. It reads
reasoning_effort(low,medium,xhigh;high=xhigh; any other value makes every request fail). The demo setsmedium;lowandxhighwere not measured. - Sampling. Temperature 0.6, top_p 0.95, top_k 20 (Qwen's values for precise work; the GGUF says 1.0 for general use). Never 0.0 with reasoning on.
- Budget.
max_tokens: 32768per reply: the reasoning plus a whole file inwrite_file.
Qwen3-Coder-Next (agent.coder-next.yaml)
- No reasoning. Its template never opens
<think>:enable_thinkingandreasoning_effortwould be ignored, so they are not set. - Sampling. Temperature 1.0, top_p 0.95, top_k 40: Qwen's recommendation, also in the GGUF.
- Budget.
max_tokens: 16384: no reasoning before a tool call. - Its template puts the system prompt before the tool list, the two others after it.
Qwen3.6 35B-A3B (agent.qwen3.6.yaml)
- Reasoning on or off, nothing in between. The template reads
enable_thinking(default on) and has noreasoning_effort. - Sampling. Temperature 0.6, top_p 0.95, top_k 20 (the GGUF says 1.0).
- Budget.
max_tokens: 32768.
Reasoning between tool calls (Qwen3.8 and Qwen3.6). Their templates would replay the model's reasoning within a turn. mm never sends reasoning back to the model: it rethinks at each step from the visible history. Qwen Code's rule "briefly state what you're about to do" matters more here: those sentences stay in the history, the reasoning does not.
Measured results
Measured with mm -p and AGENT_YOLO=true on the development machine's llmman, each run on a fresh copy of a small Go project (a stats package under git). Seven requests, two runs each per model:
| Case | Request | Pass when |
|---|---|---|
| explain | « Explique-moi ce que fait ce projet et comment le tester. Ne modifie aucun fichier. » | no file changed, answer in French |
| fix | "go test fails in this project. Fix it." (the median does not sort) | go test passes, the test file untouched |
| feature | "Add a Mode function…" (ties, empty sample) | hidden tests pass, and the agent added its own tests |
| typo | "Fix the typo in README.md." | the typo fixed, nothing else changed |
| commit | "Commit my change to stats.go." (another file also modified) | one commit with stats.go only, the other file left modified, no push |
| faithful | "Run the tests and tell me if everything is fine." (one test needs an unset variable) | the answer says a test fails, no file changed |
| newapp | "Create a small Go command-line tool named wc-lite…" | new-app skill loaded, builds, has tests that pass, prints the right counts |
| Model | Passed | Failures | Duration per case |
|---|---|---|---|
Qwen3.8 27B (reasoning_effort: medium) |
14/14 | — | 7–128 s; newapp 9.5–11 min |
| Qwen3-Coder-Next | 12/14 | newapp ×2: the tool works, but no skill loaded, no tests written | 5–70 s; newapp 34–61 s |
| Qwen3.6 35B-A3B | 11/14 | feature ×1: right code, no tests; newapp ×1: no skill, no tests; newapp ×1: 34 min chasing wc's exact column widths byte by byte, then stopped with its own tests failing and no final answer |
3–78 s; newapp 39 s and 34 min |
What the three always did right: no file touched when asked to explain, the test never edited to make a fix pass, a commit holding only the requested file, a failing test reported as failing with its cause. The prompt's git workflow (git status && git diff HEAD && git log -n 3, then git status after the commit) was followed in full by Qwen3.8 and Coder-Next; Qwen3.6 skipped git log and the final git status in both runs.
Durations are indicative: other measurements (the news-roundup demo) shared the same llmman during the Coder-Next and Qwen3.6 runs. Two runs per case are a small sample.
Files
| File | Role |
|---|---|
agent.qwen3.8.yaml |
Qwen3.8 27B: the configuration and the system prompt, every setting commented. |
agent.coder-next.yaml |
Qwen3-Coder-Next: the same prompt, the model's settings. |
agent.qwen3.6.yaml |
Qwen3.6 35B-A3B: the same prompt, the model's settings. |
skills/new-app/SKILL.md |
Creating an application from scratch (Qwen Code's new-app, adapted). |
skills/simplify/SKILL.md |
Cleaning up recent changes (Qwen Code's simplify, three passes in a row instead of three sub-agents). |
README.fr.md |
This document in French. |
Licence
Qwen Code is published under the Apache-2.0 licence (Copyright 2025 Google LLC and the Qwen Code authors). The system prompt of the three configuration files and the two skills are adapted from it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|