Last modified: January 16, 2025 at 5:37pm

Drupal CMS’s AI tools aim to make building a site and managing its content more efficient. Whether you’re new to Drupal CMS and need help finding your way around, or an experienced user looking to speed up common tasks the AI assistant is here to help.

  • For site administrators: AI assistants can help navigate Drupal CMS’s vast feature set, and complete site building tasks independently and effortlessly and get instant help creating content types, fields and categories.
  • For content creators: Use the built in AI tools to help you add accessible descriptions to images, with more features available in the AI ecosystem.

What should I expect?

Drupal CMS’s AI assistant, like the language models it is are built on, is really good at tasks that allow for some creative freedom, and less reliable (though still very useful) when being true-to-fact is the most important thing.

It’s always wise to review the AI assistant’s work. Even the best have their off days!

You’ll see two different UIs for interacting with AI features in Drupal CMS:

  • Action buttons: Buttons scattered throughout the UI that perform specific, discrete actions, when clicked. For example, generate alternative text for an image.
  • Chatbot: An AI chat window that appears at the bottom of every administrative page. Ask it for help using plain text and it will either:
    • Translate your request into a summary of actions that it can perform for you. Then use agents to perform those tasks automatically if you approve.
    • Or, respond with instructions on how to accomplish the task yourself.

Installation and configuration

To quickly get started using the AI assistant you can apply the provided defaults, and then add your API key to use the provided language models. This will:

  • Configure an AI-powered chatbot to assist with common administrative tasks.
  • Add an option to generate alternate text to the image uploading UI.

Enable the defaults using the following command run from the root directory of your Drupal CMS project:

You’ll need either an OpenAI API key, or an Anthropic API key. Note that this will require payment, and is not the same thing as a ChatGPT key.

Once you have your API key, you can enable these features using the Drupal CMS AI recipe:

  1. Navigate to ExtendRecipes (/admin/modules/browse/recipes).
  2. Locate the AI Assistant recipe, and press the Install button.
  3. On the provided configuration form choose either OpenAI or Anthropic as a provider and enter the corresponding API key.
    A setup screen titled 'Applying AI Assistant,' prompting the user to select an AI provider (OpenAI or Anthropic) and enter an API key. A blue 'Continue' button is at the bottom.
  4. Press Continue.
    A progress screen labeled 'Applying AI Assistant' with a loading bar and the text 'Initializing.'
  5. After the recipe is applied you should see a Drupal Agent Chatbot tab in the lower right corner. Click the tab to expand, and start using the AI assistant.
    A minimized version of the Drupal Agent Chatbot with only the header visible, showing the chatbot’s title and a green online status indicator.
  6. Accept the privacy prompt.
    The Drupal Agent Chatbot window asks for confirmation to load the Deepchat service, which uses a session cookie and sends data to an external service. A blue button labeled 'Yes (this time)' is displayed.

You’re now ready to use the Drupal CMS AI assistant 🎉.

A chat window titled 'Drupal Agent Chatbot' with a message stating, 'I am a Drupal AI Assistant, I can help you set up your Drupal site. I can give you instructions and I can also do some functions.' There’s a text input field at the bottom.

Key AI features in Drupal CMS

Below are examples of things the Drupal CMS AI assistant can help you with ranging from helping make sense of Drupal CMS’s UI to planning, and executing, the creation of complex content types. Spin up a trial site, and try it out.

Faster navigation and configuration changes

Use the assistant to help locate, and change, configuration options faster.

Example query:

“How do I change the site name?”

Expected results:

The assistant will make the configuration change for you if it has the ability to do so. Or, it will provide you with instructions on how to navigate to the relevant configuration forms so you can make the changes yourself.

Automate common tasks

Use the AI tools to assist in populating the alternate text for uploaded images. This can save you time and improve your site’s accessibility.

Try it out:

The same 'Add Image' form, now featuring a blue 'Generate with AI' button below the empty 'Alternative text' field.

  • Navigate to CreateImage.
  • Choose an image to upload.
  • Under the Alternative text section press the Generate with AI button.
  • Review the generated text and press Save to add the image to your media library.

Build complex features quickly

The AI assistant understands Drupal CMS best practices, and how to use the existing tools like content types, fields, and views. Ask it to help scaffold new features to save time.

Try it out with this example query or another like it:

“I want to create a new section of my site that lists different types of wines. Create a wine content type with fields for describing the wine, reviews, and an image. Add the option to categorize wines by region using taxonomy. And populate the wine region taxonomy with a list of popular wine regions.”

You’ve probably heard that language models often make things up. This means they might confidently generate results that sound plausible but may not be accurate or align with your specific requirements. When using generative AI to build website features, there’s always a risk that it could misinterpret your query, configure something incorrectly, or introduce unnecessary complexity.

Proceed with caution and always review the assistant’s work. After completing a task, the assistant should provide you with a summary of the changes it made. Take the time to inspect this summary to ensure it matches your expectations. Check for any inaccuracies or oversights, especially in critical areas like taxonomy relationships, field configurations, and content modeling. A little diligence upfront can save you significant troubleshooting later.

Additional resources

Wrap-up

The AI assistant in Drupal CMS is an experimental new feature that makes it easier than ever before to get started building amazing and truly bespoke sites in Drupal, and aim to take some of the tedium out of day-to-day tasks. In this tutorial we enabled and configured the Drupal CMS AI assistant, and previewed a couple examples of potential time saving use cases. 

Back to top