Multi-Agent Coding in Practice: Replicating a Conversational Web App End to End

    This article uses the replication of a conversational web app as a testbed for evaluating LLM-based coding agents. It explains why chat-style apps are a better test target than toy tasks, how to assess a model together with its execution harness under a unified and reproducible test process, and how to write prompts that specify acceptance criteria rather than only goals. It walks through a two-round interaction flow (skeleton first, real tools and least-privilege access second), example verification commands, a concrete session-switching defect and its fix, and the security boundaries required when agents handle credentials and commands. It also offers questions for judging self-test depth, a scoring table for horizontal comparison, the leverage effect of the execution harness, and the applicability limits of this kind of test. Readers will learn what actually differentiates coding agents: not a flashier interface, but the willingness to test, find defects, fix them, and leave evidence.

    1. Why “Replicating a Conversational Web App” Makes a Good Test Target

    LLM-powered coding tools are moving from early-stage code completion toward end-to-end delivery. That raises a more valuable evaluation question: if an agent is asked to independently replicate a real product, how far does it actually get?

    We chose a conversational web app as the test vehicle because it looks simple but covers a full frontend engineering chain: multi-turn conversation management, streaming output rendering, Markdown parsing, syntax highlighting, session switching, scroll positioning, state persistence, API integration, and error handling. Compared with a toy task such as “build a to-do list,” a chat app exposes far more of an agent’s weaknesses in long-chain engineering work.

    Dimension To-Do List Task Conversational Web App Task
    Page complexity Low Medium to high
    State management Simple create/delete/update Multiple conversations, multiple messages, streaming state
    Interaction details Few Scrolling, switching, input disabling, error messaging
    Verification difficulty Easy Requires real clicks, observation of streaming, and edge-case testing
    Engineering reference value Limited Closer to real product delivery

    For this reason, such tasks are better suited to observing whether an agent combines requirements understanding, UI replication, feature implementation, testing and verification, and iterative improvement.

    2. Test Design: Evaluate the Model and the Execution Harness as One Unit

    To compare agents fairly, tests usually pair each model with an execution framework (harness). The model handles understanding, planning, and generation; the harness schedules tools such as browsing pages, reading and writing files, running commands, executing tests, and recording results. Together they determine the agent’s practical capability ceiling.

    The test process must stay uniform: the same goal, the same acceptance criteria, and the same delivery requirements. So that the exercise does not stop at listing methods, we recommend a reproducible test record. The record should not just say “completed”; it should retain inputs, permissions, commands, results, and the defect-fix trail.

    Example test record:

    Field Example content
    Test ID CHAT-REPLICA-001
    Model and version Model A v1.2, Model B v0.9 (anonymized)
    Execution harness and version Harness-A 0.4, Harness-B 0.2
    Runtime environment Node.js 20.11, npm 10.2, Chromium 125
    Round 1 input Target product description, replication scope, acceptance checklist
    Round 2 input Read-only page entry, test account, API documentation
    Tool permissions Local file read/write, browser access, test command execution
    Acceptance criteria Can send messages, replies display via streaming, can switch sessions, errors are surfaced
    Verification commands npm ci, npm run test, node scripts/smoke-chat.js
    Result Pass / failed items / defect list / fix notes

    Records like this improve the article’s credibility and let readers see whether the agent merely “generated code” or actually closed the verification loop.

    3. Requirements Stage: Prompts Must State Acceptance Criteria, Not Just Goals

    The quality of the requirements stage directly caps everything delivered afterward. An effective prompt should cover, at minimum, the role, goal, inputs, deliverables, output format, acceptance criteria, prohibitions, and failure/rollback policy. A template you can adapt:

    1. Role: senior product manager + full-stack engineer
    2. Goal: replicate and improve a conversational web application
    3. Inputs: target product description, page structure, acceptance samples
    4. Deliverables:
    5. 1. Feature specification document + information architecture diagram
    6. 2. A runnable replicated version
    7. 3. An improved version with change notes
    8. Output format:
    9. - Feature document in Markdown, including page structure, state flow, and API table
    10. - Code delivery must include startup commands and self-test records
    11. Acceptance criteria:
    12. - After a message is sent, the reply displays via streaming
    13. - Switching sessions does not mix data between them
    14. - Empty input, overlong input, and network interruption all produce clear feedback
    15. - Basic state can be restored after a page refresh, or its loss is clearly communicated
    16. Prohibitions:
    17. - Do not upload credentials to public repositories
    18. - Do not run unconfirmed high-risk commands
    19. - Do not operate directly on production data
    20. Failure and rollback policy:
    21. - After any failed acceptance check, roll back to the most recent runnable version and record the reason
    22. Self-test requirements:
    23. - Run tests, capture screenshots or logs, and list the issues found and how they were fixed

    The point of such a prompt is not only to get the model to build something, but to make it prove that it got it right. Without self-test and acceptance requirements, a model will often deliver a static page that looks right but breaks as soon as you interact with it.

    4. Two Rounds of Interaction: Build the Skeleton First, Then Connect Real Tools

    A typical test runs in two rounds. In the first round, the model receives only the requirements and is expected to complete overall planning and the main implementation. In the second round, access credentials or tool entry points are added so the model can browse the real pages, verify details, and integrate with the real API.

    Recommended first-round inputs:

    • A description of the target app’s core features
    • Page structure and interaction requirements
    • A deliverables list
    • Self-test requirements
    • Notes on prohibited operations

    For the first round, tool permissions should be limited to the local environment: read/write project files, start local services, and run test scripts. Do not provide real accounts or production credentials. This first reveals whether the model can plan and implement independently.

    Recommended second-round inputs:

    • The real page entry or a read-only access method
    • A test account or a minimal-privilege token
    • API documentation
    • A list of open issues identified so far that still need checking
    • The verification goals for this round

    Second-round tool permissions must follow the principle of least privilege: prefer read-only access, restrict domains, limit the scope of operations, and require human confirmation for high-risk commands.

    Example verification commands:

    1. npm ci
    2. npm run lint
    3. npm run test -- --run
    4. npm run dev &
    5. curl -I http://localhost:3000
    6. node scripts/smoke-chat.js

    Here, npm ci confirms that dependencies are reproducible, npm run test checks basic logic, and smoke-chat.js simulates key paths such as sending a message, switching sessions, and checking scroll state.

    A typical defect and its resolution:

    • Defect: After switching sessions, the new session’s message area briefly shows the old session’s content, and the scroll position is not reset.
    • Reproduction: Create session A and send several messages, then create session B and switch to it. Observe the message list and the scroll position.
    • Diagnosis: When switching sessions, the current message array was not cleared, and the scroll container reused the old state.
    • Fix: In the session-switch handler, reset messages, loading, and scrollTop, or add key={conversationId} to the message list.
    • Re-verification: Run npm run test -- e2e/session.spec.ts and manually click to confirm that no old messages flash after switching.
    • Result: The issue was closed and logged in the test record.

    Cases like this reveal the real differences between agents: not whether they can produce an interface, but whether they are willing to find and fix detail-level defects.

    5. Security and Permissions: Never Put the Agent Straight into Production

    During multi-round interactions, an agent may handle access credentials, API endpoints, command-line tools, and local files. Security boundaries therefore need to be set in advance.

    Recommended principles:

    1. Least-privilege credentials: Grant only the permissions the test needs. Prefer read-only tokens and avoid administrator access.
    2. Environment isolation: Run in a dedicated sandbox or ephemeral container, never mixed with production.
    3. Command approval: Put commands such as installing dependencies, deleting files, starting services, and executing scripts behind approval or an allowlist.
    4. Data backup: Before letting the agent modify code, keep the initial version or a rollback branch.
    5. Log redaction: Keep real accounts, keys, user data, and API tokens out of test logs.
    6. No high-risk operations: Without human confirmation, do not allow forced deletion, production releases, or database writes.

    These boundaries are not optional add-ons. They are a necessary part of testing coding agents. A test without safety constraints lacks engineering credibility, even when the results look complete.

    6. How to Judge Whether Self-Testing Was Sufficient

    The value of a coding agent depends largely on whether it has a built-in “complete, verify, fix” self-iteration loop. An agent with shallow self-testing usually only checks whether the page opens. An agent with deep self-testing proactively runs, observes, diagnoses, fixes, and re-verifies.

    Use these questions to judge whether self-testing was sufficient:

    • Did it cover core paths, such as sending a message, receiving a reply, switching sessions, and refreshing the page?
    • Did it cover error paths, such as empty input, overlong text, network failure, and API timeouts?
    • Did it cover edge cases, such as long-list scrolling, code block rendering, and rapid repeated clicks?
    • Did it record failures, including symptoms, reproduction steps, root causes, and fix results?
    • Did it re-verify? After a fix, were the tests run again rather than the problem simply declared resolved?

    We recommend adding a scoring sheet to make horizontal comparisons easier:

    Dimension Focus Suggested score
    Requirements understanding accuracy Whether the role, goal, and constraints were understood 0–5 points
    UI fidelity Whether visuals, layout, and interactions are close to the target 0–5 points
    Feature completeness Whether core flows are usable 0–5 points
    Robustness Whether abnormal input and network errors are handled 0–5 points
    Self-test depth Whether it ran, found, fixed, and re-verified 0–5 points
    Iteration mindset Whether it made effective improvements on top of the replica 0–5 points

    When scoring, retain evidence such as test commands, screenshots, logs, defect lists, and fix notes. This keeps evaluation conclusions from turning into subjective impressions.

    7. The Leverage Effect of the Execution Harness

    The same model can show a different capability ceiling under different execution harnesses. The harness determines whether the model can actually read pages, manage files, execute commands, run tests, and record results.

    A weak harness may leave the agent stuck at “generate and stop.” A well-designed harness guides it through a more complete workflow:

    • Read the target page structure first
    • Then generate code and documentation
    • Start the local service
    • Run the tests
    • Finally fix issues based on failures and re-verify

    When evaluating coding agents, therefore, do not treat the model and the harness as separate things. More accurately, you are evaluating an overall system composed of the model, the harness, the prompt, and the permission environment.

    8. Applicability and Practical Recommendations

    This type of test suits evaluating replication of frontend interaction tasks, especially UI fidelity, state management, streaming rendering, and user experience details. It does not directly represent capabilities in areas such as backend high concurrency, complex authorization, distributed systems, or production security.

    When putting it into practice, we recommend:

    • Using a unified task to keep horizontal comparisons fair
    • Explicitly requiring self-testing and fixes in the prompt
    • Releasing tools and permissions gradually across two rounds
    • Using a test record to capture the environment, commands, criteria, and results
    • Prioritizing the “complete, verify, fix” closed-loop capability
    • Setting security boundaries for tests that involve credentials and commands

    Conclusion

    Using the replication of a conversational web app as a lens, we can see where current coding agents stand. What truly separates them is not which one produces the flashier interface, but which one is more willing to test thoroughly, find problems, fix them, and leave evidence. Understanding this is valuable whether you are selecting a tool or applying agents in engineering practice.