iiRecord
Agentic AI Atlas · Qwen Code
page:docs-adapters-reference-agents-qwena5c.ai
II.
Page reference

page:docs-adapters-reference-agents-qwen

Reading · 2 min

Qwen Code reference

@qwen-code/qwen-code(https://github.com/QwenLM/qwen-code) is Alibaba's

Pagewiki/docs/adapters/reference/agents/qwen.mdOutgoing · 0Incoming · 1

Qwen Code

`@qwen-code/qwen-code` is Alibaba's coding CLI built on top of Gemini CLI, tuned for the Qwen3-Coder family of models. adapters drives it via the qwen binary.

Install

bash
adapters install qwen

Supported on macOS, Linux and Windows.

Authenticate

Qwen Code speaks the OpenAI-compatible API. The quickest path is DashScope:

bash
export OPENAI_API_KEY=sk-...
export OPENAI_BASE_URL=https://dashscope-intl.aliyuncs.com/compatible-mode/v1
export OPENAI_MODEL=qwen3-coder-plus

Alternatively, run qwen interactively and use the built-in OAuth flow.

Example

ts
import { createClient } from '@a5c-ai/adapters';

const client = createClient();
const run = client.run({
  agent: 'qwen',
  model: 'qwen3-coder-plus',
  prompt: 'Summarize the public API in src/index.ts',
});

for await (const ev of run.events()) {
  if (ev.type === 'text_delta') process.stdout.write(ev.delta);
}

Plugins

Plugin support: **no**. Use MCP servers for extensibility.

MCP Servers

bash
adapters mcp install qwen <mcp-server>
adapters mcp list qwen

Registry: https://modelcontextprotocol.io

Notes

default to false pending upstream confirmation.

.qwen/QWEN.local.md project-local context, the memory-leak-debug skill, background-agent concurrency limits, Token Plan cache control, a three-tier auto-compaction ladder, headless runaway-protection guardrails, startup --worktree support, and SDK fixes for canUseTool timeouts and packaged CLI chunks. The graph tracks these as catalog/runtime compatibility metadata; adapters does not yet expose a typed worktree option for Qwen launch.

  • Session files live under ~/.qwen/sessions (JSONL).
  • MCP servers are configured under mcpServers in ~/.qwen/settings.json.
  • Capabilities are set conservatively — thinking, JSON mode, and image input
  • Qwen Code 0.16.2 keeps the npm package unchanged. Upstream adds