Drupal is a registered trademark of Dries Buytaert

Note: The functionality of this module has moved to Drupal Canvas AI

This module provides an AI powered extension to the Experience Builder, enabling users to generate page templates using natural language. Simply describe the desired layout in plain English, such as:

"Create a homepage template for a university website."
"Add a slider with five slides as the second component."
"Display two paragraphs side by side."

The AI assistant will intelligently analyze the available Single Directory Components (SDCs) in your theme/module and strategically assemble them into a well-structured layout.

Watch the demo

Usage

  • Provide meaningful descriptions for SDC components: The assistant relies on component and slot descriptions to determine their suitability for a layout. Well defined descriptions improve the accuracy of the generated structure.
  • Update settings.php: This module leverages the AI Assiatants and AI agents modules, but requires some tweaks to the default prompts. So add the following lines to the settings.php to override the default prompts
  $settings['ai_assistant_advanced_mode_enabled'] = TRUE;
  $settings['ai_assistant_custom_prompts'] = TRUE;
  • Enable installing test modules: As of now, Some modules from experience_builder/tests/modules must be enabled to use the extension feature. So add the following line also to the settings.php
  $settings['extension_discovery_scan_tests'] = TRUE;

ddev drush en experience_builder xb_dev_standard xb_dev_mode

Demo with Starshot Demo Design System (SDDS)

  cd starshot
  patch -d web/themes/contrib/demo_design_system/ -p1 < web/modules/contrib/xb_ai_assistant/patches/sdds-sdc-info.patch
  • Add the following lines to the settings.php
// To install the required test modules.
$settings['extension_discovery_scan_tests'] = TRUE;
// To override the default prompts
$settings['ai_assistant_advanced_mode_enabled'] = TRUE;
$settings['ai_assistant_custom_prompts'] = TRUE;
// To use only the SDDS components.
$settings['xb_ai_assistant_ignore_xb_sdc'] = TRUE;

Activity

Total releases
1
First release
Mar 2025
Latest release
11 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev Mar 17, 2025