Qwen Code AI Agent
An open-source AI coding agent that lives in your terminal.
Qwen Code is an open-source ai agent by QwenLM, written mainly in TypeScript, with 28,856 GitHub stars and the Apache-2.0 license. Its code was last updated Nov 1, 2026. The latest npm release is @qwen-code/qwen-code 0.27.4, published Nov 15, 2026, with 186,898 downloads last week.
<a href="https://trendshift.io/repositories/15287" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15287" alt="QwenLM%2Fqwen-code | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
The open-source AI coding agent for your terminal, editor, desktop, browser, and chat.
<a href="https://qwenlm.github.io/qwen-code-docs/zh/users/overview">中文</a> | <a href="https://qwenlm.github.io/qwen-code-docs/de/users/overview">Deutsch</a> | <a href="https://qwenlm.github.io/qwen-code-docs/fr/users/overview">français</a> | <a href="https://qwenlm.github.io/qwen-code-docs/ja/users/overview">日本語</a> | <a href="https://qwenlm.github.io/qwen-code-docs/ru/users/overview">Русский</a> | <a href="https://qwenlm.github.io/qwen-code-docs/pt-BR/users/overview">Português (Brasil)</a> | <a href="https://qwenlm.github.io/qwen-code-docs/ko/users/overview">한국어</a>
</div>
| Qwen Code 1.0 Preview |
|---|
| Qwen Code 1.0 Preview brings together the agent harness capabilities of Qoder and Qwen Code in an open-source release.<br><br>Try Qwen Code 1.0 Preview · Documentation · 中文文档. |
Why Qwen Code?
- Agentic out of the box — Auto-Memory, Skills, SubAgents, and MCP work from the first session. Agent Teams, Agent Arena, and Dynamic Workflows are built in too — experimental or opt-in, as noted in Capabilities.
- Open-source, inside and out — The framework and the Qwen models are open-source. They evolve together. No vendor lock-in.
- Multi-protocol — Supports OpenAI, Anthropic, Gemini, and Qwen APIs. Any third-party provider or local model (Ollama / vLLM). Switch at runtime.
- Beyond the terminal — IDE plugins, Desktop app, Web UI, SDKs, and chat integrations (Telegram / DingTalk / WeChat / WeCom / Feishu and more).
[!TIP] Qwen Code is actively iterating on itself — using its own agent and models to file issues, submit PRs, review code, and run tests. Powered by the community, driven by AI.
Installation
Looking for Qwen Code 1.0 Preview? Get started here. The instructions below are for the main version.
Linux / macOS:
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
Windows:
irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex
<details> <summary>NPM / Homebrew</summary>Restart your terminal after installation to ensure environment variables take effect.
NPM (requires Node.js 22+):
npm install -g @qwen-code/qwen-code@latest
Homebrew (macOS / Linux):
brew install qwen-code
</details>
Quick Start
Open a terminal in your project and start Qwen Code:
cd /path/to/your-project
qwen
Inside the session, run /auth and choose Qwen Account with Subscription to sign in with your Plus or Pro subscription, or configure a provider with an API key. Then try:
Explain this repository and show me where to start.
See the Authentication Guide and Settings Reference for detailed setup.
<details> <summary>See the terminal interface</summary>
How to Use Qwen Code
Choose the interface that fits your workflow:
| Interface | Get started |
|---|---|
| Terminal | Run qwen in your project — see Quick Start. |
| Desktop | Download Qwen Code Desktop for macOS, Windows, and Linux. |
| Web | Run qwen serve --open to open the Web UI in your browser. (experimental) |
| Editor | Set up VS Code, Zed, or JetBrains. |
| Chat | Connect Telegram, DingTalk, WeChat, WeCom, Feishu, QQ Bot, Email, or GitHub, then run qwen channel start. See the Channels overview for webhook senders and plugin adapters. |
For automation and custom integrations:
- Headless — Run
qwen -p "..."in scripts, CI/CD, or batch jobs. - SDKs — Build with TypeScript, Python, or Java.
- Daemon — Run
qwen serveto connect clients over HTTP + SSE (ACP). (experimental) Daemon guide. - Computer Use — Set up native MCP tools or Node REPL + SDK in Qwen Code, Claude Code, or Codex.
import asyncio
from qwen_code_sdk import is_sdk_result_message, query
async def main() -> None:
result = query(
"Summarize the repository layout.",
{
"cwd": "/path/to/project",
"path_to_qwen_executable": "qwen",
},
)
async for message in result:
if is_sdk_result_message(message):
print(message["result"])
asyncio.run(main())
</details>
Daemon Mode
Run Qwen Code as a long-lived service when you want browser, editor, SDK, and automation clients to share agent sessions without each starting a separate process. The daemon provides the built-in Web Shell and an HTTP + SSE API, supports multiple workspaces, and lets clients reconnect to active sessions.
Start it in the foreground and open the Web Shell:
qwen serve --open
The default address is http://127.0.0.1:4170. To run and manage it in the background instead:
qwen daemon start
qwen daemon status
qwen daemon logs -f
qwen daemon stop
By default, the daemon listens on loopback without bearer authentication; any local process that can reach it can use the full API, including code execution. On shared or untrusted hosts, set QWEN_SERVER_TOKEN and use --require-auth. See the Daemon guide for workspaces, authentication, remote access, and the API.
Capabilities
Qwen Code ships with a complete agent harness — multi-agent orchestration, persistent memory, and deep extensibility, all built in.
Agentic core
- SubAgents — delegate focused subtasks to specialized agents with their own context and toolsets, in the foreground or background.
- Agent Teams (experimental) — a leader coordinates teammates that share a task list and exchange messages, with read-only investigators and an optional single worktree writer.
- Agent Arena (experimental) — run the same task on multiple models in isolated Git worktrees, compare solutions side by side, and merge the winner.
- Dynamic Workflows (opt-in) — the model writes JavaScript workflows that orchestrate agents: parallel fan-out, verification passes, and resumable runs.
- Goals —
/goalkeeps the session working across turns until an independent verifier accepts the outcome, within a token budget. - Scheduled tasks —
/loopand cron tools re-run prompts on an interval or at a set time.
Memory, skills, and sessions
- Auto-Memory — the agent writes its own notes and recalls them across sessions; your
QWEN.mdandAGENTS.mdbriefings load automatically. - Skills & Auto-Skills — built-in skills (
/review,/batch,/bugfix…) work out of the box;/learndistills docs or code into new skills, the agent can generate skills on its own (opt-in), and/curatormaintains the library. - Session management — resume past conversations with
/resume, and browse, rename, or archive sessions.
Extensibility and control
- Hooks — run your own scripts at lifecycle events: before and after tool calls, session start and end, and more.
- MCP — connect any Model Context Protocol server to add tools, resources, and prompts.
- LSP integration (experimental, opt-in) — native language-server support: go-to-definition, references, diagnostics, and code actions.
- Computer Use & Browser Use — automate desktop applications and the browser through native MCP tools.
- Plan Mode & approval modes — plan read-only before touching files, then choose per-call confirmation, auto-edit, classifier-driven Auto Mode, or YOLO.
- Sandbox & Git worktrees — confine tool execution with built-in sandboxing and isolate wide-ranging edits in a temporary worktree.
Open and multi-platform
- Open framework and models — the framework and the Qwen models are open source and evolve together.
- Any provider — OpenAI, Anthropic, Gemini, and Qwen APIs, plus any third-party provider or local model (Ollama / vLLM). Switch at runtime.
- Every interface — IDE plugins, desktop app, Web UI, IM channels, headless mode, SDKs, and daemon mode. See How to Use Qwen Code.
Qwen Code Evaluation
On SWE-bench Verified, seven Qwen Code versions scored 76.40%–77.80% on average using the same Qwen 3.7 Max model (500 tasks, three trials per version).
Full results and evaluation configuration →
Ecosystem
-
Qwen Code Desktop — Official desktop app for macOS, Windows, and Linux
-
AionUi — A modern GUI for command-line AI tools including Qwen Code
-
Gemini CLI Desktop — A cross-platform desktop/web/mobile UI for Qwen Code
-
qwen-audio-agent — Realtime full-duplex voice frontend for Qwen Code over ACP — talk hands-free with barge-in and a local wake word
-
🦞 Qwen Code Claw — Let other agents (Claude, Codex, etc.) delegate coding tasks to Qwen Code via ACP. Paste this prompt into your agent:
Use Qwen Code as a coding agent. First, fetch and read this skill reference:
https://raw.githubusercontent.com/QwenLM/qwen-code/refs/heads/main/.qwen/skills/qwen-code-claw/SKILL.md
Then follow the instructions inside to install, authenticate, and use Qwen Code via acpx for all coding tasks.
- Aliyun Model Studio CLI — Official CLI for Aliyun's AI platform (
bailian-cli). Extends Qwen Code with image/video generation, knowledge retrieval, app orchestration, and model deployment
Privacy
See the Terms of Service and Privacy Notice, including Chrome extension and Browser Use data handling.
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Acknowledgments
This project was originally based on Google Gemini CLI v0.8.2. We gratefully acknowledge the Gemini CLI team's excellent work. Starting from Qwen Code v0.1, we stopped syncing with upstream and began independent development as a multi-protocol, multi-platform agent framework with deep integrations for Qwen models and beyond.
Qwen Code alternatives
View more →Similar ai agents in Coding Agents, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.
| Name | Stars | Licence | Last updated | Scan |
|---|---|---|---|---|
| Qwen Code (this page) QwenLM | 29k | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| AutoGPT Significant-Gravitas | 188k | None found | Nov 1, 2026 | Not scanned yet |
| Langchain langchain-ai | 149k | MIT | Nov 1, 2026 | Scanned, no flagged issues |
| Gemini CLI google-gemini | 109k | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| MetaGPT FoundationAgents | 71k | MIT | Jan 21, 2026 | Scanned, no flagged issues |
| Oh My Openagent code-yeongyu | 71k | None found | Nov 1, 2026 | Not scanned yet |