New post: "The AI cost of JavaScript frameworks" https://nolanlawson.com/2026/10/28/the-ai-cost-of-javascript-frameworks/
Which JavaScript frameworks are actually "good for agents"? Let's benchmark it!
Discussion
New post: "The AI cost of JavaScript frameworks" https://nolanlawson.com/2026/10/28/the-ai-cost-of-javascript-frameworks/
Which JavaScript frameworks are actually "good for agents"? Let's benchmark it!
@davatron5000 The agents were asking the same thing! 😅 I wanted something to pair with Lit; maybe there's something better I could have chosen.
@nolan I like data, for sure, but "Lit+[something new not many people have heard of]" is a bit out of pocket. I'd typically pair Lit with mulit-page Vite or something.
@davatron5000 That's fair, although I wanted to test Lit's SSR/hydration, which Gracile actually did in 2 of the runs:
- https://github.com/nolanlawson/agent-framework-benchmark-results/blob/4c2c18c3a993606feca4bd8d9894a73dc5b1936f/20261026/gracile-1/agent/repo/app/src/routes/(home).ts#L25
- https://github.com/nolanlawson/agent-framework-benchmark-results/blob/4c2c18c3a993606feca4bd8d9894a73dc5b1936f/20261026/gracile-5/agent/repo/app/src/routes/(home).js#L22
There are lots of other variations I could test though. The benchmark is open source; I encourage anyone to run their own experiments! (With their own tokens 😉)
@nolan I found the accessibility results interesting. 100 for all? Is Claude generating accessible code by default now?
@thereisnocat Very few results were in the 90-100 range, and the median for all frameworks was 100, yes. Note that the test harness explicitly evaluated the accessibility tree, so this might have nudged the agents in that direction.
@nolan That makes sense to me. A few months ago I was playing with Claude and asked it to do accessibility audits on some code it had created for me. It found a lot of things to fix. I asked, if it was capable of doing a competent a11y audit, why didn’t it generate accessible code by default. After some back and forth, it suggested I file a bug telling the dev team this. 😜
@thereisnocat I've found that if you just use the word "accessibility" you often get better results. And with Opus 5.5 I've frankly been astonished at how it finds oddball stuff like improving the design in forced-colors (aka high-contrast) mode.
I was surprised by some of the results, e.g. that React is not the framework cheapest to build with agents (despite this being what many people believe). Astro and htmx fans may also feel vindicated by the results. Note this is one benchmark though, and I lay out plenty of caveats and future work.
@nolan So... what's Gracile?