Inspiration

Hard research prompts rarely fail because one model cannot write fluent text; they fail because one pass misses a perspective, accepts weak evidence, or hides uncertainty. Qwen Heavy treats a difficult prompt as work for a small, inspectable society of specialists instead of a single opaque completion.

The goal was to preserve the simplicity of a normal chat while making the collaboration underneath visible when a user wants to inspect it.

What it does

A user can choose Standard for one direct Qwen agent or Heavy for coordinated multi-agent research.

In Heavy mode:

A Qwen planner decomposes the prompt into complementary assignments. Distinct Qwen workers investigate those assignments concurrently with safe web-search, calculator, and sandboxed file tools. Every worker returns evidence, caveats, and a focused report. A lead Qwen synthesizer compares the reports, reconciles disagreements, preserves unresolved uncertainty, and produces one answer. The interface streams planning, agent activity, tool calls, retries, warnings, and synthesis through a collapsed View process trace without making the chat feel like an operations dashboard.

Runs can be cancelled, event streams can reconnect and replay missed events, and successful partial results are still synthesized when one worker times out or fails.

Track 3: Agent Society

Qwen Heavy is built directly around the three Track 3 requirements.

Task decomposition and role assignment

The planner produces a structured set of agent tasks with a unique title, focus, and prompt. The number of workers is dynamic, while presets control cost, thinking, token budgets, and model choice. The default Balanced route uses Qwen Flash for planning, Qwen Plus for parallel investigation, and Qwen Max where cross-report judgment has the most leverage: final synthesis.

Dialogue, disagreement, and execution conflicts

Workers are deliberately given different investigative boundaries so they can reach competing conclusions instead of echoing one another. Their reports become the shared negotiation surface for the lead synthesizer. The synthesis contract explicitly requires it to reconcile disagreements, retain uncertainty, preserve caveats, and avoid silently discarding failed-agent warnings.

Execution conflicts are handled separately from semantic disagreements: concurrency is bounded, tool loops have iteration limits, calls have timeouts and retries, cancellation propagates through the run, and partial success falls back to a combined report rather than losing completed work.

Measurable efficiency

The repository includes a reproducible deterministic orchestration benchmark with six equivalent role assignments and a fixed 50 ms artificial provider delay per call.

Parallel worker wave: 50.186 ms median Serial single-worker baseline: 302.819 ms median Worker-wave speedup: 6.034×, or 83.43% lower latency Full planner → workers → synthesis pipeline: 151.461 ms parallel versus 404.302 ms serial End-to-end orchestration speedup: 2.669×, or 62.54% lower latency

Both variants execute the same tasks and assert byte-for-byte equivalent fixture outputs. These figures measure orchestration latency only—not model quality, token throughput, or Qwen Cloud network performance—and the raw measurements and methodology are checked into the repository.

How we built it

The backend is a Python/FastAPI service connected to Qwen Cloud through its OpenAI-compatible API. A run manager owns snapshots, ordered server-sent events, cancellation, retention, retries, timeouts, and bounded model concurrency. The same orchestration path powers the REST API and terminal client.

The tool layer is hot-discovered and exposes JSON schemas to Qwen. It currently includes public web search with snippet/page extraction, a bounded arithmetic evaluator, sandboxed UTF-8 file reading and writing, and an explicit task-completion signal.

The responsive interface is React, TypeScript, and Vite. It presents optimistic chat turns, Standard/Heavy controls, agent-count and preset selection, reconnectable SSE with polling fallback, local conversation history, Markdown answers, source links, and expandable process traces. If the backend is unavailable, the interface clearly labels and replays deterministic sample data instead of pretending a model call occurred.

Qwen-only validation exists at both request and provider boundaries. Credentials remain server-side, the provider URL must be an HTTPS Alibaba Cloud endpoint, and no API key is exposed to the browser.

Challenges we ran into

Making a multi-agent system feel like a normal chat while keeping planning and execution auditable. Preserving Qwen tool-call history correctly across multi-step function-calling loops. Separating semantic disagreement resolution from operational failure handling. Streaming enough state for recovery without tying the UI to one uninterrupted connection. Keeping web and file tools useful while bounding SSRF, path traversal, arithmetic, output-size, and iteration risks. Routing expensive models only where their judgment adds value instead of using the largest model for every role.

Accomplishments that we're proud of

A complete Qwen-only single-agent and multi-agent path sharing one tested tool loop. Dynamic role decomposition, concurrent workers, disagreement-aware synthesis, and partial-failure recovery. Replayable SSE, cancellation, CLI access, three cost-aware presets, and transparent token/model reporting. A responsive code-native chat interface validated at desktop and mobile viewports. 22 backend tests and 5 frontend tests, plus clean Ruff, ESLint, TypeScript, and production-build checks. A reproducible benchmark that makes the parallelism claim inspectable instead of presenting an unexplained marketing number.

What's next

Next steps are direct inter-agent rebuttal rounds before synthesis, persistent encrypted run storage, authentication and per-user quotas for public deployment, richer quality/coverage evaluations against live single-agent baselines, and additional Qwen-native multimodal tools.

Built With

  • asyncio
  • duckduckgo-search
  • fastapi
  • openai-compatible-api
  • pydantic
  • pytest
  • python
  • qwen-cloud
  • qwen3.6-flash
  • qwen3.7-max
  • qwen3.7-plus
  • react
  • server-sent-events
  • typescript
  • vite
  • vitest
Share this project:

Updates