Pokémon Bakeoff Reveals Best JavaScript Frameworks for AI Agents
Nolan Lawson benchmarks twelve JavaScript frameworks to determine which best support agentic AI development.
1Moving Beyond Vibes-Based Selection
Developer Nolan Lawson argues that JavaScript framework selection is often driven by subjective preferences rather than objective data. To counter this, he launched a benchmark study using AI agents to build identical Pokémon applications. This experiment aims to provide empirical evidence for framework efficiency when utilized by autonomous model-powered coding assistants.
2Methodology of the Agentic Benchmark
Lawson tasked a Claude Code agent with building a web application using the PokéAPI across twelve different stacks. He conducted five independent sandbox runs for each framework to reduce variance. Automated test suites verified accessibility compliance, while Google Lighthouse measured transfer size and runtime performance to ensure the generated code met standards.
3Server-Centric Frameworks Lead Efficiency
The benchmark results indicate that agents perform significantly better with server-centric frameworks compared to client-heavy Single-Page App architectures. Hono paired with htmx emerged as the most cost-effective solution, costing only $2.67 per application. This efficiency stems from eliminating the architectural complexity required to synchronize data between the client and the server.
4Astro and Nuxt Performance Metrics
Astro followed closely with a $2.76 build cost and achieved the fastest median build time at 8.2 minutes. Nuxt, while slightly more expensive at $2.82, proved highly efficient in token consumption. Nuxt produced the application in 1,415 lines of code, demonstrating how opinionated frameworks reduce the boilerplate code agents must generate.
5Challenges with Traditional Frameworks
Some established frameworks struggled during the automated generation process. SvelteKit cost $4.28, as the agent frequently referenced documentation to navigate recent updates. Angular proved the most expensive at $4.97, requiring 9.76 million tokens and failing to produce a functional application in two out of five attempts during the rigorous testing phase.
6Runtime Performance and Loading Times
While all generated applications passed accessibility tests, runtime performance varied significantly. Astro delivered the fastest Largest Contentful Paint at 810 milliseconds. Conversely, Next.js and TanStack Start were the slowest, taking over 2,000 milliseconds to load. These results suggest that shipping excessive JavaScript to the client negatively impacts the performance of agent-built applications.
7Human Factors in Framework Adoption
Community feedback highlights that AI efficiency is not the sole metric for framework selection. Developers emphasize the importance of human maintainability and existing expertise. Some argue that switching to marginally better tools, like htmx, may degrade a team's ability to effectively review, debug, and manage code produced by other human or AI actors.
8Future of AI-Assisted Development
Lawson hopes this benchmark encourages greater rigor in selecting tools for AI-driven tasks. As frameworks evolve, they may integrate AI capabilities to minimize current performance gaps. Ultimately, the industry must balance the speed of AI-generated code with the long-term necessity of human readability and the ongoing maintenance requirements of complex software projects.