Evaluating AI Agents That Replicate Web Applications: Methods and Practices

    This article presents a reproducible method for evaluating how large language models and agent frameworks replicate a web application. It covers variable control across model and framework combinations, a two-round prompting mechanism, three required deliverables, a unified execution pipeline, six scoring dimensions, common failure modes, and engineering recommendations for running the evaluation at scale. Readers will learn how to turn a vague "agent replication" task into controllable variables, inspectable artifacts, and quantifiable metrics.

    1. Background and Problem Definition

    Over the past two years, large language models have shifted from answering questions to delivering engineering artifacts. Once a model is connected to an agent harness with file read/write, command execution, and browser control, it no longer just generates code snippets. It can autonomously handle the full loop: understanding requirements, inspecting pages, reviewing API documentation, writing code, running and debugging, and self-checking results.

    This creates a practical problem: the engineering delivery capability produced by different combinations of models and frameworks varies widely, and subjective impressions alone cannot determine which is better.

    The original practice discussed here centers on a concrete task: several model plus agent framework combinations were asked to replicate the web frontend of a conversational AI product and produce three types of deliverables. Specific products, tools, and model names from the source material have all been removed and replaced with neutral descriptions such as “target site,” “a certain class of AI coding tool,” and “a cloud vendor’s model service.” The focus is not on which product is stronger, but on whether the evaluation method itself is rigorous, reproducible, and generalizable.

    One point deserves emphasis: the most common mistake in this kind of evaluation is inconsistent criteria. Some groups were allowed network access and others were not; some received two rounds of prompts and others received everything at once; some had humans take over the final debugging. Any single inconsistency distorts the conclusions. The first principle of method design is therefore to control variables.

    2. Evaluation Design: Variable Control and Deliverable Definition

    2.1 Test Combinations and Capability Dimensions

    The original practice selected six test subjects covering three technical routes: general-purpose large models paired with highly autonomous agent frameworks; models emphasizing very long context paired with client-side toolchains; and combinations emphasizing standard context and tool ecosystems. Abstractly, this forms a two-dimensional matrix:

    • Dimension A: model-side capabilities, including reasoning depth, context length, and code and structured output capabilities.
    • Dimension B: framework-side capabilities, including tool types (terminal, file, browser), permission policies, and self-check and rollback mechanisms.

    The value of a matrix design is that failures can later be attributed to a specific dimension rather than dismissed with a vague claim that “a certain model is not good.”

    2.2 Two-Round Prompting Mechanism

    The evaluation uses two rounds of interaction, a key design in the whole method:

    The first round provides only the requirements and role setting, with no credentials. The role is a senior product manager, and the task is to replicate the web frontend of the target conversational product. Browser-type tools are allowed to access the target page and public API documentation (login states and links from the source material are not retained here). At this point the model must complete information gathering on its own: page structure, interaction flows, visual hierarchy, and how APIs are called.

    The second round adds access credentials. The purpose is to observe behavioral differences as the model moves from design to something runnable: after receiving credentials, does it do only a minimal connectivity check and stop, or does it proactively build more complete test cases that expose boundary conditions and defects and keep iterating?

    2.3 Three Deliverables

    Three outputs are required, forming a complete evaluation chain:

    1. Product functional documentation and structure diagram: assesses requirement abstraction and information architecture.
    2. Replicated pages: assesses fidelity to the target interaction and visuals.
    3. Improved pages: assesses autonomous optimization after understanding the original design, rather than mechanical imitation.

    The three deliverables correspond to understanding, reproduction, and creation, preventing the evaluation from degrading into pure pixel comparison.

    3. Execution Flow and Unified Criteria

    To ensure comparability, all test groups must follow the same process, which can be fixed as the following stages:

    1. Stage 0 Environment setup: unify runtime, dependency versions, screen resolution, network policy
    2. Stage 1 Requirement input: first-round prompt only, no credentials
    3. Stage 2 Autonomous inspection: allow access to target page and public docs, log access count and time spent
    4. Stage 3 Solution output: functional doc + structure diagram + initial implementation
    5. Stage 4 Credential injection: second-round prompt, provide keys needed for access
    6. Stage 5 Integration and self-check: model runs, catches errors, and fixes them on its own
    7. Stage 6 Delivery freeze: stop all human intervention, archive artifacts and logs

    Stage 5 is the most likely to cause disagreement. Observations from the original practice found that some combinations performed only the simplest connectivity check after receiving credentials and then declared completion; others proactively constructed scenarios such as abnormal inputs, very long sessions, and concurrent requests, then found defects and went back to optimize. This is not a prompt difference but a framework strategy difference: some frameworks default to “stop at minimum viable,” while others build in a “continuous verify and fix” loop. The evaluation report must state this clearly, or readers will misread it as a gap in model capability.

    4. Scoring Dimensions and Quantification Suggestions

    Subjective scoring is hard to reproduce, so it is advisable to break it into at least six dimensions, each with verifiable criteria:

    • Requirement coverage: whether the functional documentation covers key paths such as sessions, history, parameter settings, and error messages.
    • Fidelity: whether layout, hierarchy, and state feedback match the target, which can be compared item by item using screenshots.
    • Engineering quality: code structure, component decomposition, error handling, and runnability.
    • Self-check depth: whether tests beyond minimal verification were constructed, and whether defects and fixes were recorded.
    • Iteration efficiency: rounds, tool calls, and time required to reach the same quality.
    • Improvement rationality: whether the improved version solves real pain points rather than introducing new complexity.

    Extra weight is suggested for self-check depth. In real engineering, the ability to find your own problems matters more than getting it right the first time.

    5. Common Failure Modes

    The failure types that repeatedly appear in practice are worth setting expectations for in advance:

    1. Only visual imitation, ignoring states and error paths, so pages break with empty data, long text, or network failures.
    2. Misunderstanding how APIs are called, treating general conventions in public documentation as private conventions, causing large-scale rework during integration.
    3. Losing early constraints after context expansion, producing inconsistent naming and structure.
    4. Not verifying after receiving credentials, delivering something that only “looks runnable.”
    5. Over-engineering the improved version, introducing unnecessary abstraction layers that reduce maintainability.

    6. Engineering Implementation Suggestions

    To turn this evaluation into a routine team capability, consider three points. First, bake the environment into a container image with dependencies and resolution fully locked, ensuring reproducibility over time. Second, archive artifacts and logs to object storage, combined with logging services and monitoring alerts, forming a traceable evaluation archive. Third, script the scoring: automatically compare structure diagrams and page screenshots, automatically execute test cases, and reduce drift from manual scoring.

    On the model access side, routing and rate limiting through a unified model service gateway make it easier to swap test models horizontally and prevent the evaluation from being interrupted by a single point of failure. For large-scale concurrent test runs, container platforms can scale elastically and message queues can smooth peaks, keeping the task queue moving steadily.

    7. Conclusion

    The core contribution of this method is not a ranking of any particular combination, but breaking the vague task of “agent application replication” into controllable variables, inspectable artifacts, and quantifiable metrics. Two-round prompting controls the pace of information injection, three deliverables cover understanding, reproduction, and creation, unified criteria eliminate execution differences, and multi-dimensional scoring makes conclusions reproducible. For engineering teams, what is truly worth building up is this evaluation pipeline itself: it can continuously answer a key question: when a model is given tools and permissions, how far can it go on its own?