AI in Drupal: Latest Demos of the Incredible Capabilities

Nov 06 2024

Authored by Nadiia Nykolaichuk.

AI is shifting our perception of the impossible. It does things that past generations would have never imagined. Indeed, it has long since become a routine to ask AI assistants to play music, turn on the lights, or even order groceries. With the advance of generative AI, boosting content management through various AI-driven tasks has also become increasingly common.

How about another ground-breaking shift? Picture receiving a message from the future, informing you that soon, you'll be able to instruct AI on your Drupal website to create any features you desire and perform intricate configuration adjustments. Not only will you not need coding skills, but you also won't need to understand Drupal terminology—you'll simply communicate with AI in plain language.

This future is just around the corner! A series of demos at DrupalCon Barcelona 2024 left the attendees mind-blown. Let’s immerse ourselves in the latest insights about Drupal’s AI transformation, including examples of how it works.

Drupal and its ground-breaking AI leap

“I’ve shown this video to a few non-developers and literally their jaws dropped. They didn’t think that was possible with Drupal. I’ve also shown it to developers, and their jaws have dropped as well. Honestly, I haven’t seen many competitors do things like this.” Drupal’s creator Dries Buytaert

Drupal started offering its users great modules for AI integration immediately after the rise of OpenAI, and the range of possible functionalities kept expanding. However, at his keynote session at DrupalCon Barcelona 2024, Dries Buytaert demonstrated absolutely new and unprecedented AI capabilities. They may seem unbelievable, but everything is real, even though it's not yet ready for production. However, you can already test the code.

Where will Drupal’s amazing AI capabilities be available?

Drupal CMS. What Dries demoed will be included in Drupal CMS. It’s a top-notch product that is being built on top of Drupal core and optimized for non-tech users. It must be noted that the “traditional Drupal” as you know it will now exist under the name of “Drupal core.” Drupal CMS has already generated a lot of buzz and is widely known as “Drupal Starshot,” but in Barcelona, Dries announced that its final name will simply be “Drupal CMS,” and encouraged everyone to use it. Besides AI, Drupal CMS will include pre-packaged feature sets called Recipes (like multilingual support, events, accessibility tools, advanced SEO, etc.), an innovative page builder called Experience Builder, and more. On Drupal’s birthday, January 15, 2025, we should expect the first product ready for everyone to use.

The AI module. An amazing team is working on Drupal’s AI capabilities both for Drupal CMS and the new module called “AI.” It is a contributed module which is now in active development, with its beta version recently released. The module is available for installation on all Drupal websites that are not older than Drupal 10.2. This is the outcome of a decision by the maintainers of several leading AI modules to collaborate and develop a unified AI platform for Drupal. The features included with Drupal CMS and the AI module won’t be exactly the same.

“For the Sarahs of the world”: human-centric AI in Drupal

Drupal CMS in general, and its AI capabilities in particular, should empower non-tech users. Dries calls them “the Sarahs of the world” because the presentation features Sarah — the perfect user persona for it. She is a marketing director at a company that offers wine-tasting tours. She doesn’t know any Drupal site building but just needs certain features to be built or fixed on their Drupal website. In Dries’ demo, she achieves unimaginable results by simply chatting to AI.

“What we’ll be able to achieve in Drupal is wild compared to what exists out there. I’m not seeing very much that is like this. You find in the outside world the easy-to-use tools for building on top of AI tend to be proprietary, and where it’s open-source, they tend to be very code-heavy. And so this mixture of the two that Drupal allows us to do — I’m calling it human-centric AI — is a very unique thing to Drupal.” — says Dries.
 

AI’s mission is to empower non-tech users in no-code side building

The 4 responsible AI principles for Drupal

Where there is power, there must also be great responsibility. That's why one of the core beliefs about AI, as stated by Drupal's creator, is the necessity of establishing a standard for AI usage. This approach guides us toward developing beneficial AI, akin to the helpful AI depicted on the right in the image below, rather than the malevolent AI on the left.

 

Building AI the right way in Drupal


According to Dries, the four overarching principles of responsible AI to consider when developing our AI capabilities are as follows:

  1. Human-in-the-Loop. People should be able to review and revert the work of AI.
  2. Transparency. AI shouldn’t be a hidden feature but we need to be clear about where it’s used.
  3. Swappable language models. People should be able to choose AI models they like.
  4. Promoting responsible AI. Where possible, users should be guided towards AI models that have strong ethical values, reduce bias, prioritize energy efficiency, respect copyrights, etc.

The 4 responsible AI principles for Drupal

Time for inspiring demos: AI in action

AI renames a content type

Sarah’s website has “Events” but she wants to rename them to “Wine Tours” because it’s easier for her users. She clicks on “Drupal Agent Chatbot” in the bottom right corner of the website and a chatbot window with the Drupal Agent opens. She doesn’t have to know what a “content type” is because AI understands her simple explanations of what must be done. Upon reloading the page, we see that the content type “Events” has been renamed to “Wine Tours.”

Renaming a content type via AI in Drupal


AI adds and configures an image field

Many websites that allow users to upload images face the problem of low-resolution images. Of course, there is a solution for that in Drupal, but it needs certain technical knowledge. Sarah asks AI about it in her own terms and the tool understands her. Furthermore, it knows that high resolution should mean 1920x1080 pixels.

Adding and configuring an image field via AI in Drupal

AI creates taxonomy and generates terms

Categorizing content is a popular feature on websites, but the term “taxonomy” might sound intimidating to non-technical people. So Sarah just asks AI to categorize wine tours by wine region and populate them with the top 20 most popular wine regions in Europe. Her request is easily fulfilled.

Creating taxonomy and generating terms via AI in Drupal

AI generates Alt text

AI can assist content managers in anything, and just one simple example is generating alternative text for images as part of the mission to create accessible content. Of course, it will hardly surprise our readers who have already seen our articles about the OpenAIAugmentorAI, and AI Interpolator modules. In the demo below, Sarah clicks the button to generate Alt text with AI. She can check what Alt text has been generated, as well as make sure the entire content item looks good, which demonstrates the “Human-in-the-Loop” principle in action.

Generating Alt text via AI in Drupal

AI migrates content from a non-Drupal website

Migrating content has always been a daunting task. But it’s an easy nut to crack for AI in Drupal! In this example, content needs to be migrated from a non-Drupal website where the content is packed into a single body field (essentially, one block of HTML, explains Dries). So the task is to convert that block into a structured Drupal content type.

So Sarah just clicks “Import content with AI,” enters the URL of the source website, and the AI will crawl the content and map all the content to different fields in Drupal. For example, it figured out the date and the images and put them into their respective Drupal fields. Furthermore, AI analyzed the content, figured out the actual wine regions, and auto-populated them in the taxonomy field. Near-magical!

Migrating content from another website via AI in Drupal

AI creates a page with Drupal Views

How to create a page with wine tours under a certain URL and with the options for users to search for tours by title and filter them by wine region? This is something that would usually be done via Drupal Views. This tool is extremely powerful but intimidating for new learners. Luckily, AI can create a view after a simple request! The AI-created view is fully editable by a human. Tweaking a view is a lot easier than creating it from scratch, says Dries, and it’s also a great way to learn Drupal.

Creating a Drupal Views page via AI in Drupal

AI creates a webform from a drawing

Could you simply sketch your desired form on a piece of paper, snap a photo, and then ask AI to generate this webform on your Drupal website? Sure! This example is not from Driesnote but from the session on the AI module by Marcus JohanssonJames AbrahamsFrederik Wouters, and Martin Anderson-Clutz.

It uses a different approach  instead of a chatbot, we see a Kanban board for all AI task management. There's an interface for creating an "epic" that outlines tasks in simple terms and allows you to attach a picture of the drawing. AI analyzes the JPEG and creates a full-fledged Drupal webform from it!

Creating a webform from a paper drawing via AI in Drupal

What’s under the hood

Chatbots, user interfaces, and Kanban boards are just various ways for users to communicate with AI and visualize what’s happening. What’s working behind the scenes, both in Drupal CMS and the AI module, are so-called AI agents. They are going to transform Drupal, says Dries, and it’s hard to disagree.

AI agents will transform Drupal

Currently, there are seven AI agents but it’s just the beginning. In essence, their job is to connect the Drupal APIs with the AI providers, explains Dries. He also mentions that there might be dozens or hundreds of them in the future.

AI agents in Drupal

The list of AI providers will also keep expanding to include as many services as possible. It is built using an abstraction layer. Users will be able to choose their own LLM (a large language model) — in other words, a type of AI program. Organizations will be able to build their own LLMs and thus connect their own AI providers. 

AI providers in Drupal

The AI code is all open-source and it’s built as a framework so that people can contribute to it. You can add your own contributed modules to expand it, encourages Dries.

Final thoughts

Drupal’s bold leap into AI-driven innovation is opening doors to possibilities we once only dreamed of. With the power of AI at our fingertips, creating and managing websites will become more intuitive, efficient, and accessible than ever before. Let’s embrace this new chapter and unlock the full potential of what AI and Drupal can achieve together!

 

Learn from us
Sign up and receive our monthly insights directly in your inbox!

Subcribe to newsletter (no spam)

Fields