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!