Skip to content
AI Learning Ground Start learning

News ·

The AI cost of JavaScript frameworks

A developer benchmarked how costly and effective AI agents are at building the same Pokémon app across JavaScript frameworks, finding SvelteKit, Gracil+Lit, and Angular more expensive, with results highly stochastic.

Bar chart of framework costs, with htmx/hono as the fastest
Image: Hacker News

Frustrated by evidence-free claims that some frameworks are 'better for agents,' the author built a benchmark: a small but non-trivial Pokémon app using the PokéAPI, built by AI agents instructed to use different JavaScript frameworks and meta-frameworks such as Next.js, Nuxt, SvelteKit, and Hono+htmx.

The setup used Claude Opus 5.5 at high effort, with each framework's official MCP or skills, latest versions, and no architecture mandate. Output was checked against a spec conformance suite based on the accessibility tree (to avoid agent cheating and accommodate shadow DOM), then evaluated on development time, tokens spent, lines of code, and Lighthouse performance and accessibility scores. Agents ran in sandboxes without knowing they'd be tested on Lighthouse. Each framework was built five times, taking the median; Angular failed twice, so some metrics used three runs. Costs quoted Claude Code API prices. SvelteKit, Gracile+Lit, and Angular were more expensive, with SvelteKit agents reading a v3 migration guide each run and Gracile agents cloning the repo or reading node_modules source. React Router's median was about a dollar above Hono+htmx, though the cheapest React Router run beat the priciest Hono+htmx one.

The author stresses caveats: the app is a single holotype, content-heavy like Wikipedia rather than Figma, and LLM randomness plus inconsistent Lighthouse results mean high variance across runs. For builders, the takeaway is that agent-era framework claims often lack evidence, and framework choice measurably affects AI build cost and quality, though results should be read with the variance in mind.

References

Read the full story at Hacker News ↗Like, save or discuss on Buzz

#community #signals