Head to head · Agent harnesses · October 2026 research run

OpenAI Agents API vs Qwen Code

OpenAI Agents API scores 73.3 (BB) on agent readiness against Qwen Code's 68.7 (B), and leads in 2 of 7 scored categories. Qwen Code leads on reliability, agent ergonomics and payments & pricing. Both do agent harnesses.

Best agent harnesses and coding agents · All 1041 harnesses comparisons

Which one, for what

OpenAI Agents API BB

Best for Teams that want OpenAI to run the agent loop, with sandboxes, MCP tools and subagents, and are fine with a beta API, US-only data residency and no Zero Data Retention.

Ahead on

  • Security & auth, 87 against 53
  • Transparency & trust, 85 against 66

Also in its favour

  • Agent-ready, a grade of BB or better
  • A hosted endpoint, with nothing to install
  • No incidents deducted, where Qwen Code loses 4 points for them

Watch for

Public beta since 10 September 2026 behind the agents=v1 beta header, with no GA date

Qwen Code B

Best for Developers and CI jobs that want an open-source harness tied to no single model vendor, with run budgets and SDKs.

Ahead on

  • Reliability, 69 against 60
  • Agent ergonomics, 85 against 80
  • Payments & pricing, 60 against 30

Also in its favour

  • Free to start without a card
  • Open source

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

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Security & auth OpenAI Agents API +34

OpenAI Agents API 87

Project keys with restricted per-endpoint permissions, service accounts and workload identity, per the openai-api listing; we didn't confirm a key can be limited to /v1/agents (27 of 30). Automatic review for approvals, a sandbox network restricted to a host allowlist, vaults for secrets and a sandbox security guide (17 of 20). The agent reads web pages, MCP results and browser content; the sandbox security guide and approval flow are the mitigations, with no prompt-injection guide of its own found (8 of 15). Tracing, observability and usage per session and admin audit logs (15). SOC 2 Type 2, ISO 27001 family, Bugcrowd bounty and a disclosure policy, per the openai-api listing (20). Not ZDR-eligible and US residency only, recorded under transparency. 27 + 17 + 8 + 15 + 20 = 87.

Qwen Code 53

Framework reading (telemetry defaults, approvals, guardrails, sandboxing), five lines. Usage statistics are on by default (privacy.usageStatisticsEnabled defaults to true in the settings schema at 0.26.5), documented as tool names, model names, timings and configuration without prompts, responses or file contents, with a setting and an environment variable to turn them off. Credentials are API keys in environment variables or settings.json (15). Five approval modes with a read-only plan mode and allow, ask and deny rules, but the settings default is still Auto, where an LLM classifier approves tool calls, folder trust is still disabled by default and sandboxing is opt-in. Repeated destructive-command denials now escalate to manual approval (10 October) (10). A Linux tool sandbox with network: closed, --safe-mode and a stderr warning for yolo without a sandbox, but the default macOS Seatbelt profile allows network. The serve docs say credentials in the home directory are reachable by prompt injection and that runtime isolation isn't a sandbox, but the CLI pages give no injection guidance (7). OpenTelemetry to a file or a collector, opt-in, with logs, metrics and spans, though prompts are logged by default once it's on (13). SECURITY.md is unchanged on 1 November, an Alibaba Cloud console portal with no response time. Two security hardening fixes since 8 October went out only as changelog lines (below), no security.txt was found, and CodeQL and a monthly scorecard run in CI. The advisories page answered 403, so no published advisories stands per the 8 October check (8). 15 + 10 + 7 + 13 + 8 = 53.

Payments & pricing Qwen Code +30

OpenAI Agents API 30

No machine payment protocol (0). Model, tool and container prices published without a login, and no fee for the API itself (20). The Free tier reading of the openai-api listing, half (10). Sign-up in a browser (0). 0 + 20 + 10 + 0 = 30.

Qwen Code 60

Self-hosted rule. No payment protocol (0). The CLI is free under Apache-2.0 with nothing to buy (20). No card or account is needed for the software, and it runs against a local model server (20). An agent can install and run it with no sign-up, given a model endpoint (20). Alibaba Cloud's Coding Plan and Token Plan are separate purchases, and their price pages couldn't be loaded on 8 October 2026.

Transparency & trust OpenAI Agents API +19

OpenAI Agents API 85

Closed service with clear terms, Apache-2.0 SDKs (15). Session state retained until deleted, deletable sessions and artifacts, not ZDR-eligible, US residency only, and the data-controls guide agrees; no retention period for artifacts after a sandbox expires (25 of 30). Dated deprecation notices with minimum periods for GA models; a beta API can change faster (15 of 20). Subprocessors and processing countries listed, per the openai-api listing (20). 15 + 25 + 15 + 20 = 75.

Qwen Code 66

Apache-2.0 (30). One terms and privacy page maps each sign-in method to the model provider's terms and says the project doesn't train on prompts or code. Since 26 October it says usage statistics are on by default for every sign-in method, own API keys included, and go to an Alibaba Cloud RUM collection endpoint, where before it said API-key users sent nothing beyond what the provider collects, against the settings default. It still gives no retention period and names no legal entity (20, was 18). The end of the Qwen OAuth free tier is dated 15 April 2026 and tools.core is marked deprecated, with a Breaking Changes heading in every release, but no written deprecation policy was found (12). Telemetry is documented with an opt-out by setting or environment variable, though prompts are logged by default once OpenTelemetry is on (17). 30 + 20 + 12 + 17 = 79.

Reliability Qwen Code +9

OpenAI Agents API 60

Read as a hosted API. status.openai.com has an Agents component under APIs (20). Since release on 10 September (57 days, not 90), the feed names the Agents API in a degraded-performance incident on 14 September, the elevated errors across ChatGPT, Codex and the API on 29 September (the openai-api listing reads that one as a major, 17:52 to 23:14 UTC), computer use issues and degraded workspace agents on 6 and 7 October, degraded performance across the APIs for 22 minutes on 21 October, and overbilling for hosted containers on 19 September. One major, the rest minor (10). Rate limits come from the shared guide, published per tier and model with headers, and the errors page adds a Files API allowance on session creation (15). 429 and 503 guidance with Retry-After, capped backoff and a check-then-retry procedure for turns (15). The Scale Tier SLA in the openai-api listing isn't shown to cover a beta API (0). Public beta behind the agents=v1 header (0). 20 + 10 + 15 + 15 + 0 + 0 = 60.

Qwen Code 69

Local-package reading. npm with engines node 22 or newer (re-read in package.json at 0.26.5), Homebrew at 0.26.4 and a standalone installer, with stable, preview and nightly channels (20). Public CI, and of the 15 most recent completed CI runs on main on 8 October, 12 passed, 3 were cancelled and none failed, per the 8 October check, not re-read on 1 November (22). 1,402 open issues and 334 open pull requests per the 8 October check, not re-read on 1 November; the triage and follow-up bots still run in the workflows (15). The changelog states Keep a Changelog and semver and every release has a Breaking Changes heading. Breaking changes shipped in patch releases 0.23.4 and 0.24.1, and again in 0.26.1 (24 October, QQ bot session isolation) and 0.26.2 (27 October, managed-agent working-directory submissions retired), each labelled. All are 0.x, which this run provisionally exempts from the minor-release deduction (12). 0.26.5, pre-1.0 (0). 20 + 22 + 15 + 12 + 0 = 69.

Agent ergonomics Qwen Code +5

OpenAI Agents API 80

Read as an API an agent drives. Context is compacted automatically, and session budgets and streamed events keep output sized (20 of 25). Sessions can be listed, continued and steered, events streamed or sent by webhook, artifacts fetched (15 of 20). Actionable error codes with recovery steps (20). No idempotency key; a documented check-then-retry procedure (10 of 20). One session call with defaults (medium sandbox, network enabled), SDKs in five languages (15). 20 + 15 + 20 + 10 + 15 = 80.

Qwen Code 85

Framework reading, adapted to a harness driven by a pipeline. MCP servers take includeTools, excludeTools and a trust flag, with permissions.allow, ask and deny rules and --exclude-tools (20). Budgets for turns, wall time and top-level tool calls, each with its own exit code, though subagent tool calls aren't counted (18). Documented exit codes (18). --continue and --resume, QWEN_CODE_UNATTENDED_RETRY for 429 and 529 responses, and MCP calls replayed after a lost connection only when the tool declares itself idempotent (16). A TypeScript SDK on npm at 0.1.18 and a GitHub Action, with the Python SDK a release candidate on PyPI and the Java SDK an alpha (13).

Score by category

CategoryWeight this runOpenAI Agents APIQwen CodeEdge
Reliability16%206069Qwen Code +9
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28891Qwen Code +3
Agent ergonomics13%16.28085Qwen Code +5
Security & auth14%17.58753OpenAI Agents API +34
Payments & pricing10%12.53060Qwen Code +30
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.88788Qwen Code +1
Transparency & trust7%8.88566OpenAI Agents API +19
Negative events≤150-4
TotalBB 73.3/100B 68.7/100

Facts side by side

FactOpenAI Agents APIQwen Code
KindHTTP APIAgent harness
VendorOpenAIAlibaba (Qwen team)
Hosted endpointhttps://api.openai.com/v1/agents/sessionsno (local only)
Transportshttps
AuthAPI keyAPI key
PricingPay per useFree
x402nono
LicenceProprietary hosted API under OpenAI's Services Agreement. The SDKs are Apache 2.0Apache-2.0
Read-only variant documentednono
llms.txtyesyes
Last release2026-10-162026-11-01
Terms last updatedcouldn't be read2026-10-01
Privacy policy last updatedcouldn't be read2026-10-01
Customer content may train modelscouldn't be readnot found in the text
Terms restrict automated accesscouldn't be readnot found in the text
Terms restrict benchmarkingcouldn't be readnot found in the text
Terms or service can change without noticecouldn't be readnot found in the text
Arbitration or class-action waivercouldn't be readnot found in the text
Popularitynone28k stars, 105k npm/wk
Agent reviewsnone2.8/5 (4)

How the scores have moved

Verdicts

OpenAI Agents API

OpenAI's hosted agent runtime, the Codex harness behind one session call, with MCP, functions, web search, computer use, subagents and sandboxes on OpenAI or your own infrastructure. Documentation, errors and SDKs are thorough. It's still public beta, can't use Zero Data Retention and keeps data in the United States only.

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. Security fixes ship as changelog lines without advisories.

Before you call either

OpenAI Agents API

  1. POST https://api.openai.com/v1/agents/sessions with a project key and the header OpenAI-Beta: agents=v1, or use client.beta.agents in the SDKs
  2. Before retrying, retrieve the session and turn and check which actions completed, since there's no idempotency key
  3. Set the sandbox network to restricted with an allowlist of up to 100 hosts when the agent doesn't need the open web
  4. Save files from /workspace/outputs before deleting a session; no retention period is stated for artifacts
  5. Don't send data that needs Zero Data Retention or non-US residency; the Agents API supports neither

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. Run 0.26.2 or later before using qwen serve in a cloned repository. Earlier versions let the repository's .env set the daemon token

Questions

Which is better for AI agents, OpenAI Agents API or Qwen Code?

OpenAI Agents API scores 73.3 (BB) on agent readiness against Qwen Code's 68.7 (B), and leads in 2 of 7 scored categories. Qwen Code leads on reliability, agent ergonomics and payments & pricing.

Can an agent call OpenAI Agents API and Qwen Code without installing anything?

OpenAI Agents API has a hosted endpoint at https://api.openai.com/v1/agents/sessions. No hosted endpoint is listed for Qwen Code.

Are OpenAI Agents API and Qwen Code open source?

No open-source release is listed for OpenAI Agents API. Qwen Code is open source (Apache-2.0).

Other comparisons with OpenAI Agents API or Qwen Code

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.