What happened
Developer Nolan Lawson published a benchmark of the AI cost of JavaScript frameworks. He asked a coding agent to build the same small Pokémon app in several frameworks, checked each result against a conformance suite, and compared cost, code size, and Lighthouse performance and accessibility scores. Each framework was run five times and the median reported.
The cost spread was real but noisy. SvelteKit, Gracile+Lit and Angular were more expensive to build than the rest. The author ties this to the agent re-reading a migration guide for a very new version, struggling with a lesser-known framework, and (for Angular) a larger amount of code. He also stresses that the app is content-heavy and that results vary a lot between runs.
Why it matters
Many small teams now let agents write a large share of their code, and “this framework is better for agents” is starting to drive rewrite decisions. This benchmark suggests two things. First, token spend depends on how well the model knows the framework, not only on the framework itself. Second, a single run tells you very little: the cheapest run of one option beat the most expensive run of another.
If you have no platform team, those costs land on your AI bill and your engineers’ time, and a rewrite justified by a feeling is an expensive bet. The caveats matter too: one app type, one model setup, and Lighthouse itself is inconsistent.
What to do this week
- Check what your agent usage actually costs per task. Look at token spend by repository or project, not just the monthly total.
- Before proposing a rewrite “for agents”, run a small trial of your own: the same task, several runs, and compare the median, not the best case.
- Note which of your dependencies are very new. Agents may burn tokens reading migration guides or source code for them.
- Give agents a test suite or spec to work against, so you can judge output on behaviour rather than impressions.
- Re-run Lighthouse several times before trusting a score, as the benchmark shows it can shift between runs.
Need a hand?
If your AI and cloud bills are growing and you cannot tell why, we can help you trace the spend and decide what is worth changing. Our Cloud Cost Optimisation service covers exactly this kind of review. The first call is free, and it is with an engineer.
Source: The AI cost of JavaScript frameworks
Related service: Cloud Cost Optimisation