Wouldn't frameworks be better for Ai?
They're used more frequently, I couldn't imagine in python there's more examples of web servers from scratch then using flask or Django?
Frameworks provide a layer of abstraction, so the code is denser, which will use less tokens, and put less code in the prompt.