Qwen Code
A multi-provider AI coding agent that runs in your terminal.
What does this agent do, and when should you use it?
Qwen Code is an open-source AI coding agent with an interactive terminal UI and a headless automation mode. It supports OpenAI, Anthropic, Gemini, and Qwen APIs, plus third-party providers and local models through Ollama or vLLM, with runtime switching. Delivery options include VS Code, Zed, and JetBrains integrations, desktop applications for macOS, Windows, and Linux, and channels for Telegram, DingTalk, WeChat, and Feishu. Its experimental `qwen serve` mode exposes one shared agent session to multiple clients over HTTP+SSE using ACP. TypeScript, Python, and Java SDKs make it usable from developer tooling and automated workflows.
Run qwen to open an interactive terminal UI with rich rendering, @file references, and slash commands, then use /auth to configure a provider and API key. Run qwen -p "..." to submit a prompt without a UI for scripts, CI/CD, or batch processing. Qwen Code connects to OpenAI, Anthropic, Gemini, Qwen, third-party, or local model providers and offers MCP, SubAgents, Agent Teams, Auto-Memory, Auto-Skills, Hooks, Plan Mode, LSP integration, sandboxing, and Git worktrees. qwen serve shares an agent session with multiple clients over HTTP+SSE using ACP, while qwen channel connects Telegram, DingTalk, WeChat, or Feishu. In the Python SDK, query() accepts a prompt plus cwd and path_to_qwen_executable, and returns messages that can be consumed asynchronously.
- A software engineer who wants an interactive terminal agent with file references and slash commands while working in a repository.
- A development team invoking `qwen -p` from CI/CD jobs, scripts, or batch-processing workflows.
- A team that needs to switch at runtime among OpenAI, Anthropic, Gemini, Qwen, third-party, or local Ollama/vLLM model providers.
- A tooling developer integrating coding-agent calls into a Python, TypeScript, or Java application.
- An internal development environment that needs several clients to share one agent session over HTTP+SSE.
- A developer who wants to use a coding agent through VS Code, Zed, JetBrains, or supported messaging channels.
What are this agent's strengths and limitations?
- Supports OpenAI, Anthropic, Gemini, and Qwen APIs, plus third-party and Ollama/vLLM local models, with runtime provider switching.
- Covers interactive and headless terminal use, IDE plugins, desktop apps, an HTTP+SSE service, messaging channels, and three SDKs.
- Includes development-workflow features such as MCP, SubAgents, Agent Teams, Auto-Memory, Auto-Skills, Hooks, Plan Mode, LSP integration, sandboxing, and Git worktrees.
- The npm installation path requires Node.js 22+, and first use requires provider configuration and an API key.
- The multi-client shared-session mode exposed by `qwen serve` is explicitly experimental.
- The supplied material does not specify provider pricing, permission controls, default sandbox policy, or failure-recovery behavior.
How do you install or deploy this agent?
On Linux/macOS: curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash. On Windows PowerShell: irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex. Alternatively, install with npm using npm install -g @qwen-code/qwen-code@latest (Node.js 22+ required), or on macOS/Linux with brew install qwen-code. Restart the terminal after installation, then configure a provider and API key with /auth on first launch.
How do you use this agent?
Run qwen to launch the interactive terminal UI, then run /auth to configure a provider and API key. For headless execution, use qwen -p "Summarize the repository layout.". Start the experimental shared-session service with qwen serve, or connect messaging channels with qwen channel. From Python, call query("Summarize the repository layout.", {"cwd":"/path/to/project","path_to_qwen_executable":"qwen"}) and asynchronously iterate over the returned messages for the result.
How does this agent compare with similar options?
Qwen Code names Claude Code as a comparison point and states corresponding support for SubAgents, Agent Teams, MCP, Plan Mode, LSP integration, sandboxing, Git worktrees, IDE plugins, SDKs, headless mode, and session management. Its listed differentiators are open-source models and framework, multi-protocol provider support, Agent Arena, the qwen serve shared-agent service, and Telegram, DingTalk, WeChat, and Feishu channels.