# Pi vs Qwen Code > Qwen Code scores 72.4 (BB) on agent readiness against Pi's 68.4 (B), and leads in 3 of 7 scored categories. Pi leads on reliability and security & auth. Both do agent harness. Category scores, facts, verdicts and agent notes side by side. - Canonical: https://www.anchorterminal.com/compare/earendil-pi-vs-qwen-code - Markdown: https://www.anchorterminal.com/compare/earendil-pi-vs-qwen-code.md (~2,350 tokens) - Slim: https://www.anchorterminal.com/compare/earendil-pi-vs-qwen-code.min.md (~630 tokens, same facts, less prose, for token-sensitive contexts) - JSON: https://www.anchorterminal.com/compare/earendil-pi-vs-qwen-code.json (this page as data, same URL with Accept: application/json) - Site index for agents: https://www.anchorterminal.com/llms.txt (full text: https://www.anchorterminal.com/llms-full.txt) - API: https://www.anchorterminal.com/api/v1/index.json - Updated: 2026-10-08 Qwen Code scores 72.4 (BB) on agent readiness against Pi's 68.4 (B), and leads in 3 of 7 scored categories. Pi leads on reliability and security & auth. Both do agent harness. - Pi: grade B, 68.4/100, rank #170 of 629. Markdown https://www.anchorterminal.com/tools/earendil-pi.md · JSON https://www.anchorterminal.com/api/v1/tools/earendil-pi.json - Qwen Code: grade BB, 72.4/100, rank #88 of 629. Markdown https://www.anchorterminal.com/tools/qwen-code.md · JSON https://www.anchorterminal.com/api/v1/tools/qwen-code.json ## Which one, for what ### Pi (B) Good for: Developers and pipelines that want a small, scriptable coding agent they can extend in TypeScript and drive over JSONL or RPC, inside their own container. Ahead on: - Reliability, 75 against 69 - Security & auth, 61 against 53 Also in its favour: - No key needed to call it Watch for: No permission system or sandbox. Tool calls run with the user's rights and without an approval prompt ### Qwen Code (BB) Good for: Developers and CI jobs that want an open-source harness tied to no single model vendor, with run budgets and SDKs. Ahead on: - Schema & documentation, 91 against 84 - Agent ergonomics, 85 against 76 Also in its favour: - Agent-ready, a grade of BB or better - No incidents deducted, where Pi loses 4 points for them Watch for: The default approval mode is Auto, where an LLM classifier approves tool calls, and sandboxing and folder trust are both off by default ## Score by category | Category | Weight | Pi | Qwen Code | Edge | | --- | --- | --- | --- | --- | | Reliability | 16% (20 this run) | 75 | 69 | Pi +6 | | Performance | 10%, pending | pending | pending | not scored in this run | | Schema & documentation | 13% (16.2 this run) | 84 | 91 | Qwen Code +7 | | Agent ergonomics | 13% (16.2 this run) | 76 | 85 | Qwen Code +9 | | Security & auth | 14% (17.5 this run) | 61 | 53 | Pi +8 | | Payments & pricing | 10% (12.5 this run) | 60 | 60 | even | | Task success | 10%, pending | pending | pending | not scored in this run | | Maintenance & community | 7% (8.8 this run) | 87 | 88 | Qwen Code +1 | | Transparency & trust | 7% (8.8 this run) | 64 | 63 | Pi +1 | | Negative events | ≤15 | -4 | 0 | | | **Total** | | **68.4 · B** | **72.4 · BB** | | ## Facts side by side | Fact | Pi | Qwen Code | | --- | --- | --- | | Kind | Agent harness | Agent harness | | Vendor | Earendil | Alibaba (Qwen team) | | Hosted endpoint | no (local only) | no (local only) | | Transports | | | | Auth | None | API key | | Pricing | Free | Free | | x402 | no | no | | Licence | MIT | Apache-2.0 | | Read-only variant documented | no | no | | llms.txt | no | yes | | Last release | 2026-10-07 | 2026-10-05 | | Terms last updated | no document linked | 2026-10-01 | | Privacy policy last updated | no document linked | 2026-10-01 | | Customer content may train models | | not found in the text | | Terms restrict automated access | | not found in the text | | Terms restrict benchmarking | | not found in the text | | Terms or service can change without notice | | not found in the text | | Arbitration or class-action waiver | | not found in the text | | Popularity | 113k stars, 5.2M npm/wk | 28k stars, 105k npm/wk | ## Verdicts **Pi.** Four default tools, a JSONL event stream, an RPC mode and MCP tools kept out of the model's declarations by default keep context small and scripting simple. Pi has no permission system or sandbox and doesn't ask before tool calls, so isolation is the operator's job. Version 1.0.0 is dated 1 October 2026. **Qwen Code.** Apache-2.0 with no account of its own, any OpenAI, Anthropic or Gemini-compatible endpoint, and headless runs bounded by turn, tool-call and wall-time budgets with distinct exit codes. Out of the box, Auto mode lets an LLM classifier approve tool calls, with the sandbox and folder trust both off. Usage statistics are on by default. ## Before you call either ### Pi 1. Run Pi inside a container or VM for unattended work. It has no sandbox and doesn't ask before running shell commands 2. Use `pi --mode json` and wait for `agent_settled`. A failed response doesn't set a nonzero exit code in JSON mode 3. Split the JSONL stream on LF only. Node's `readline` also splits on U+2028 and U+2029, which are valid inside JSON strings 4. Pass `--no-approve` or `--approve` in scripts to make the project trust decision explicit 5. Set `PI_TELEMETRY=0` and `PI_SKIP_VERSION_CHECK=1`, or `PI_OFFLINE=1`, to stop the default requests to pi.dev ### Qwen Code 1. Pass `--approval-mode` on every run. The settings default is `auto`, and one docs page says headless runs default to asking, so don't rely on either 2. Add `--max-session-turns`, `--max-wall-time` and `--max-tool-calls`. All three are unlimited by default. Exit 53 is the turn limit and 55 a budget 3. `--yolo` doesn't turn on a sandbox. Add `--sandbox`, or on Linux set `tools.executionSandbox` with `network` set to `closed` 4. Set `QWEN_USAGE_STATISTICS_ENABLED=false` to stop usage statistics 5. Authenticate with `OPENAI_API_KEY`, `OPENAI_BASE_URL` and `OPENAI_MODEL` in CI. The browser sign-in is discontinued ## Questions ### Which is better for AI agents, Pi or Qwen Code? Qwen Code scores 72.4 (BB) on agent readiness against Pi's 68.4 (B), and leads in 3 of 7 scored categories. Pi leads on reliability and security & auth. ### Are Pi and Qwen Code open source? Yes. Pi is open source (MIT). Qwen Code is open source (Apache-2.0). ## For agents - This comparison as JSON: https://www.anchorterminal.com/compare/earendil-pi-vs-qwen-code.json, and with the fewest tokens: https://www.anchorterminal.com/compare/earendil-pi-vs-qwen-code.min.md - Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "earendil-pi", "b": "qwen-code"}`. From a terminal: `anchor compare earendil-pi qwen-code` - Each listing in full: https://www.anchorterminal.com/api/v1/tools/earendil-pi.json and https://www.anchorterminal.com/api/v1/tools/qwen-code.json ## Other comparisons with Pi or Qwen Code - [Aider vs Pi](https://www.anchorterminal.com/compare/aider-vs-earendil-pi.md) - [Aider vs Qwen Code](https://www.anchorterminal.com/compare/aider-vs-qwen-code.md) - [Amp vs Pi](https://www.anchorterminal.com/compare/amp-vs-earendil-pi.md) - [Amp vs Qwen Code](https://www.anchorterminal.com/compare/amp-vs-qwen-code.md) - [Claude Code vs Pi](https://www.anchorterminal.com/compare/claude-code-vs-earendil-pi.md) - [Claude Code vs Qwen Code](https://www.anchorterminal.com/compare/claude-code-vs-qwen-code.md) - [Cline vs Pi](https://www.anchorterminal.com/compare/cline-vs-earendil-pi.md) - [Cline vs Qwen Code](https://www.anchorterminal.com/compare/cline-vs-qwen-code.md) - [Cursor CLI vs Pi](https://www.anchorterminal.com/compare/cursor-cli-vs-earendil-pi.md) - [Cursor CLI vs Qwen Code](https://www.anchorterminal.com/compare/cursor-cli-vs-qwen-code.md) - [Devin vs Pi](https://www.anchorterminal.com/compare/devin-vs-earendil-pi.md) - [Devin vs Qwen Code](https://www.anchorterminal.com/compare/devin-vs-qwen-code.md) - [Pi vs Gemini CLI](https://www.anchorterminal.com/compare/earendil-pi-vs-gemini-cli.md) - [Pi vs GitHub Copilot CLI](https://www.anchorterminal.com/compare/earendil-pi-vs-github-copilot-cli.md) - [Pi vs goose](https://www.anchorterminal.com/compare/earendil-pi-vs-goose.md) - [Pi vs Kiro CLI](https://www.anchorterminal.com/compare/earendil-pi-vs-kiro-cli.md) - [Pi vs OpenAI Codex](https://www.anchorterminal.com/compare/earendil-pi-vs-openai-codex.md) - [Pi vs OpenCode](https://www.anchorterminal.com/compare/earendil-pi-vs-opencode.md) - [Pi vs OpenHands](https://www.anchorterminal.com/compare/earendil-pi-vs-openhands.md) - [Pi vs Prime Agent](https://www.anchorterminal.com/compare/earendil-pi-vs-prime-agent.md) - [Gemini CLI vs Qwen Code](https://www.anchorterminal.com/compare/gemini-cli-vs-qwen-code.md) - [GitHub Copilot CLI vs Qwen Code](https://www.anchorterminal.com/compare/github-copilot-cli-vs-qwen-code.md) - [goose vs Qwen Code](https://www.anchorterminal.com/compare/goose-vs-qwen-code.md) - [Kiro CLI vs Qwen Code](https://www.anchorterminal.com/compare/kiro-cli-vs-qwen-code.md) - [OpenAI Codex vs Qwen Code](https://www.anchorterminal.com/compare/openai-codex-vs-qwen-code.md) - [OpenCode vs Qwen Code](https://www.anchorterminal.com/compare/opencode-vs-qwen-code.md) - [OpenHands vs Qwen Code](https://www.anchorterminal.com/compare/openhands-vs-qwen-code.md) - [Prime Agent vs Qwen Code](https://www.anchorterminal.com/compare/prime-agent-vs-qwen-code.md) - [Paperclip vs Qwen Code](https://www.anchorterminal.com/compare/paperclip-vs-qwen-code.md)