The future of web frameworks in the age of AI

The introduction of AI, and more specifically agents, has changed the software engineering profession recently. Whereas developers used to write most of the code they sent to production, today that fraction is barely 10 or 5%.

This new paradigm is very recent, and we probably don’t yet fully understand all of its implications. But perhaps we can already imagine what it means for web frameworks and how they will evolve in the coming years.

For a framework to break through today and be widely used, it must be understandable not only to humans but also to AI. If an agent has difficulty interpreting it and generates erroneous code most of the time, requiring systematic manual correction, then the framework will have a serious disadvantage.

We are entering the era of AI-understandable frameworks, and here are three points that I believe they will need to comply with in the future in order to survive or stand out.

First-class documentation

Although good documentation was a significant asset in the past, it has now become indispensable. AI will rely primarily on documentation to learn and ultimately produce its code. To increase the relevance of responses, documentation will need to excel in three areas.

First, it will have to be very detailed. Every part of the framework and every feature will need to be fully documented. Previously, when this was not the case, it was always possible for human developers to compensate for this by searching the Internet, relying on auto-completion, testing pieces of code, or looking at the source code of the library or framework. But now, even though these tasks can of course also be performed by AI, they will not be done systematically by it, and providing complete documentation will certainly make the code generated by agents more relevant.

Next, and perhaps unlike much of the current documentation, the documentation will have to contain many examples or “recipes.” It will need to explain the whys and wherefores and present the different reasons for using a particular feature or approach depending on the situation. Modern LLMs like to have context and know how to rely scrupulously on examples to learn and produce relevant output.

Finally, the documentation and the site on which it is located will have to be particularly well organized and optimized for crawling. A nice visual interface will no longer be enough. The documentation will need to be easily searchable and semantically organized so that an agent can browse and interpret it effectively.

A boring structure

The second point on which frameworks will need to converge is a focus on developing a boring and familiar code structure.

LLM-based AI excels at reproducing what is generally known and widely accepted as certain patterns or architectural choices. If a framework follows these patterns with the associated vocabulary, then it will be more understandable to AI. On the other hand, if it is drastically innovative in its approach, creating entirely new patterns, AI may have more difficulty interpreting it and therefore generating correct code.

A stable interface over time

Finally, the third point that frameworks will need to pay attention to, even more so than usual, is the stability of their API. Developers hate having to migrate from one major version to another when this transition involves numerous breaking changes, as is well known. Libraries and frameworks must therefore already ensure that they maintain, as far as possible, a stable interface between the two versions.

But with the arrival of agents, this requirement for stability will be even more necessary. Because if an LLM has learned to write code on a certain version of the framework and the current project uses another version, the output code may once again be incorrect.

A reduced and more targeted scope

These three points (documentation, architecture, and interface stability) will likely be key factors in making a framework AI-friendly. They will enable agents to produce more relevant code.

But in addition to these aspects, the arrival of AI agents may also change the scope of frameworks and restrict the areas on which they will need to focus.

Previously, frameworks provided a framework with a multitude of on-demand features. Their main role was to avoid having to reinvent the wheel and rewrite code from scratch, saving time and avoiding many errors.

But with the contributions of AI, many simple features, such as encoding or decoding, can now be written quickly and without error in any project thanks to agents.

The contribution of frameworks in this area is therefore becoming more limited, and spending time developing and maintaining such features is becoming much less interesting for open-source coders.

The scope of frameworks could therefore narrow in the future and focus on what AI cannot do (at least today):

  • offer a globally consistent code architecture for an entire project;
  • and offering flagship features that are difficult to develop and maintain, either because they are large, because they are highly technical, because a small error can have serious consequences, such as a security breach, or because they are all three at once. Authentication systems and ORMs are notable examples.

Share this article

Stay up to date

Get notified when I publish something new about software engineering.

Your subscription could not be saved. Please try again.
Your subscription has been successful.