Which web frameworks are most token-efficient for AI agents?
Minimal API web frameworks are far quicker and more cost effective for agents to work with.
[âŚ]
In terms of more fully featured frameworks SvelteKit and Django really shine - this doesnât surprise me as theyâre both extremely well thought through web frameworks.
A 2.9x token gap doesnât matter much on a single task. It matters a lot when agents are building and modifying code hundreds of times a day.
Django, Express.js, etc. do pretty well but do not spark joy for me. My beloved Phoenix comes in last (đ). SvelteKit hits the sweet spot in terms of token efficiency and fun-to-use.
I wouldnât pick a framework based on this metric, but this may become increasingly important over time!