How to Build a Free Coding Agent with Qwen3-Coder and Qwen Code
Qwen3-Coder is free to use through Qwen Chat and the Qwen Code CLI, and its Apache 2.0 weights mean you can build a working coding agent without paying per token to a closed provider.
Most coding agents cost $20 or more a month before you write a line of code. Alibaba’s route is different: give away the model and the harness, then charge for API volume at the top end. For solo developers and small teams, the free path is genuinely usable.
What do you need to get started?
- Node.js 18 or newer for the Qwen Code CLI.
- A free Qwen Chat account, or a DashScope API key for heavier use.
- An existing project directory to point it at.
Install the CLI, authenticate with your key, then run it from the project root. Setup is a couple of commands, not a project.
How do you install and run Qwen Code?
npm install -g @qwen-code/qwen-code
cd ~/projects/my-service
qwen
Once it starts, Qwen3-Coder reads files, edits them, and runs commands in the usual agent loop. The 1M-token context is the standout feature at this price: you can ask it about a module you have never opened and it will pull the right files rather than asking you to paste them.
What is free and what is not?
| Route | Cost | Limits |
|---|---|---|
| Qwen Chat | Free | Rate limited, browser only |
| DashScope API | Per token | Cheap but not zero |
| Self-host 30B | Free weights | Needs a 48GB+ GPU |
| Self-host 480B | Free weights | Multi-GPU node |
The free tier is rate limited. On a busy day you will hit the ceiling, which is the natural point to move to the API. Because the weights are open, there is no lock-in: if the pricing changes you can serve the model yourself.
How does it compare with Claude or GPT coding agents?
Out of the box it is rougher. Multi-file refactors need clearer instructions, and it will occasionally edit more than you asked. The trade is cost and control. For greenfield scripts, SQL work, and everyday edits, the gap is small. For gnarly architectural changes in a mature monorepo, the closed models still lead.
What does it handle well?
- Python, TypeScript, SQL, and Go for everyday edits.
- Explaining unfamiliar code with the whole repo in context.
- Boilerplate and test stubs where volume matters more than polish.
- Air-gapped or regulated environments via self-hosting.
Weak spots are niche languages and anything needing a polished IDE experience. It is a CLI and API model, not a slick product.
Who should use the free route?
Students, solo developers, and teams evaluating whether an open-weight agent is viable. Anyone already paying a closed provider should test this on a real task before switching; save a week of your actual work and compare, rather than trusting a benchmark.
Key Takeaways
- Qwen Code CLI plus Qwen3-Coder gives you a working agent for free.
- Free tier is rate limited; DashScope API is the next step up.
- 1M-token context handles whole-repo questions at no license cost.
- Rougher than closed agents on complex multi-file refactors.
