Building a web application with AI agents costs five times less when using server-centric JavaScript frameworks compared to traditional single-page approaches, according to a benchmark study published this week by Nolan Lawson, a developer at AI security firm Socket. Lawson tested 12 JavaScript frameworks by having Claude Code agents build identical Pokémon apps, measuring build cost, speed, and code efficiency across five runs per framework. The results reveal that frameworks emphasizing convention, API stability, and brevity enable agents to work far more effectively than those requiring complex client-server coordination.

The pairing of Hono with htmx delivered the most economical outcome, with a median cost of $2.67 per application, while Angular proved the most expensive at $4.97 and failed to produce a working app in two of five attempts. Astro came in second at $2.76 and achieved the fastest median build time at 8.2 minutes, also handling everything server-side. Nuxt led the single-page-app-style frameworks at $2.82, consuming the fewest tokens overall at 3.85 million and producing an app in just 1,415 lines of code—second only to Hono/htmx's 1,370 lines. SvelteKit cost $4.28 to generate, with the agent repeatedly consulting documentation to understand recent framework updates. Angular consumed 9.76 million tokens and took 17.2 minutes despite its failures. Loading times varied significantly: Astro's app loaded in 810 milliseconds, while Next.js took 2,090 milliseconds and TanStack Start required 2,028 milliseconds, likely because they shipped more JavaScript to the client.

Lawson wrote that "one of my pet peeves with the web development community is that so many of the decisions we make are vibes-based," explaining his motivation to prevent subjective preferences from influencing AI tooling choices. The study found that agents generally perform more efficiently with server-centric frameworks than with client-heavy single-page app architectures. The experiment used identical instructions across all frameworks, with agents building apps using the PokéAPI while Lawson deployed automated test suites querying the browser's accessibility tree to verify that interactive elements weren't faked—a shortcut large language models sometimes take.

The report explains that server-only frameworks like Hono/htmx avoid the overhead of synchronizing architecture between client and server, which reduces both code volume and token consumption. Opinionated frameworks like Nuxt eliminate boilerplate code that agents would otherwise need to generate, while also handling data transfer and file routing internally—more code the model doesn't have to worry about. Frameworks with recent updates or less stable APIs forced agents to repeatedly consult documentation, driving up costs and build times. All completed apps passed Lighthouse accessibility and performance tests, though Lawson acknowledged the simplicity of the application made this unsurprising.

Lawson hopes this work will encourage more rigorous framework selection for AI-driven development now that developers won't handle the actual coding themselves. However, developers on Hacker News noted that AI efficiency isn't the only consideration—human maintainability matters too, with one noting they wouldn't learn a marginally better tool after a decade with React if it compromised their ability to review another developer's work. The frameworks themselves may evolve with AI assistance, potentially narrowing performance gaps over time. For organizations deploying AI agents to handle routine development work, the choice of underlying framework now carries direct cost implications that human preference alone can't justify. Teams betting on agent-driven workflows may need to reconsider their technology stacks through an entirely new lens, one where convention and simplicity trump flexibility and feature richness.