跪拜 Guibai
← All articles
Trae · AI Coding · AIGC

One Requirement, Five Agents: TRAE's Parallel Agent Team Cuts a 2-Hour Build to 30 Minutes

By 悟空码字 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Integration conflicts get caught at draft time instead of after everything is built, which is where the 4x gain comes from. The pattern works without any multi-agent framework: disciplined task splitting, standardized sub-agent inputs, and explicit alignment checks carry the weight.

Summary

Building a visitor appointment system with a single serial AI agent costs about two hours, most of it lost to integration rework when frontend and backend disagree on field names. A TRAE multi-agent setup restructures the same build around five specialized agents: one orchestrator that writes no code, and four sub-agents launched simultaneously for the Vue3 frontend, Express+SQLite backend, test suite, and delivery documentation.

The orchestrator deliberately avoids pre-defining field names. Frontend and backend pick their own keys, and the orchestrator compares the two schema documents the moment drafts land. That check caught three critical conflicts (name vs visitorName, visitTarget vs hostName, reason vs purpose) plus a reservation-number format mismatch, and dispatched fixes to the frontend and test agents in the same round. The test suite went from 57 cases with placeholder fields to 58 with zero placeholders, and the frontend build passed.

Total parallel time came to about 30 minutes versus 2 hours serial, roughly a 4x gain. The pattern generalizes into a '1+4 parallel architecture' built on explicit design principles: the orchestrator stays out of code, sub-agent inputs and outputs are standardized, agents think independently before alignment, fixes also run in parallel, and alignment checks read output documents explicitly rather than rely on memory.

Takeaways
— Five agents handle the build: an Orchestrator-Main plus four sub-agents for UI pages, backend code, testing, and documentation.
— The orchestrator writes no business code; it decomposes the requirement, dispatches tasks, checks alignment, and coordinates fixes.
— Each sub-agent receives a standardized task with an explicit tech stack, a deliverable list, and constraints such as the phone-number regex /^1[3-9]\d{9}$/.
— Field names are intentionally not pre-decided. The frontend and backend agents pick their own keys, and the orchestrator compares pages-structure.md with api-schema.md afterward.
— The first alignment check found three critical field conflicts (name/visitorName, visitTarget/hostName, reason/purpose) and one booking-number format mismatch (2610210001 vs RSV17294688000001234).
— After renaming fields across 6 files, the frontend npm run build passed, and the test suite went from 57 cases (P0:39, P1:9, P2:9) to 58 with no leftover placeholders.
— Backend work produced 7 APIs (submit, detail query, admin list, approve, reject, mark visited, visitor query) and 17 passing interface self-tests.
— Documentation came out as 4 deliverables: a PRD with mermaid flowcharts, a user manual, a deployment guide, and an ops troubleshooting doc with 20+ failure scenarios.
— Serial development was estimated at about 2 hours including rework; the parallel run took about 0.5 hours, roughly a 4x speedup.
— The general pattern is called '1+4 parallel architecture': one orchestrator plus four sub-agents, applicable to other small and medium projects.
— Fixes are dispatched in parallel too: the frontend rename and test placeholder replacement ran in the same round.
Conclusions

Deliberately letting frontend and backend draft conflicting field names runs against the usual instinct to standardize early, but it converts hidden integration assumptions into explicit, fixable diffs while changes are still cheap.

Moving the alignment check to just after first drafts accounts for most of the 4x speedup; parallel execution mainly makes every artifact available for comparison at the same moment.

Keeping the orchestrator out of code preserves its view of the whole system; an orchestrator that starts writing business logic degrades into a serial executor with no oversight.

The pattern applies project-management discipline to AI agents: clear ownership, known interfaces, independent workstreams, and a named integration checkpoint. Those habits transfer directly to any small full-stack build.

Framing multi-agent work as 'moving multiple worker threads from the CPU layer to the AI layer' understates the change: serialized human rework, not compute, was the bottleneck, and parallel agents remove the waiting.

Multi-agent discussions usually stay at the framework level, but the whole mechanism here reduces to a Promise.all over four Task calls and a diff between two markdown docs. Task decomposition and explicit checks supply the value, independent of any framework.

Concepts & terms
Orchestrator agent (主控 Agent)
The coordinating agent in a multi-agent build. It decomposes requirements, launches sub-agents in parallel, compares their output documents for field conflicts, and dispatches fixes. It writes no business code itself, preserving a project-level view of the whole delivery.
Agent alignment check
An explicit step where the orchestrator reads each sub-agent's output documents, such as pages-structure.md and api-schema.md, and compares business-meaning-to-field-name mappings. Running it immediately after first drafts surfaces integration conflicts while rework is still cheap.
1+4 parallel architecture
The reusable arrangement from this build: one orchestrator agent plus four specialized sub-agents for frontend, backend, tests, and documentation, all started simultaneously with standardized inputs and outputs. Its design principles, from an orchestrator that never codes to automatic alignment checks, transfer to other small and medium projects.
TRAE Task()
A call used to launch a sub-agent in TRAE's agent mode. The orchestrator fires four Task calls in one turn inside Promise.all, so the sub-agents start simultaneously and run without blocking each other. Each call carries a description and a query that pins down the tech stack and deliverables.
From the discussion

TRAE's absence from job postings is the only substantive issue raised; the listings that do mention AI coding tools name Codex, GPT, Cursor, and Claude Code. The gap is attributed to domestic Chinese AI coding tools being left out of job requirements entirely, and the follow-up laments that this makes things hard. The remaining comments are routine praise and mutual-learning acknowledgments.

— TRAE is missing from job postings that otherwise list Codex, GPT, Cursor, and Claude Code.
— The omission is attributed to domestic Chinese AI coding tools being absent from job requirements entirely.
Featured comments
bluceli

Why is it that in job postings, the AI coding tools listed never include TRAE? It's all Codex, GPT, Cursor, Claude Code [facepalm]

悟空码字

Is it because none of the domestic ones are included? [grin]

bluceli  → 悟空码字

Yeah, it's too hard [tears]

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗