Drupal is a registered trademark of Dries Buytaert
drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). commerce 3.3.5 Minor update available for module commerce (3.3.5). geocoder 8.x-4.34 Minor update available for module geocoder (8.x-4.34). leaflet 10.4.5 Minor update available for module leaflet (10.4.5). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3).

ai_chatblock

5 sites No security coverage
View on drupal.org

AI Chatblock adds a floating chat widget to any page on your Drupal site, powered by the AI module's assistant framework. Functionally similar to the ai_chatbot module from the AI ecosystem, but with a frontend that is 100% Drupal-native, and thus with a more flexible and familiar theming workflow.

Features

  • Streaming responses via Server-Sent Events (SSE), so replies appear progressively as they are generated.
  • Server-side session history — conversation threads are tracked per session, giving the AI context from earlier messages.
  • Suggested questions — clickable starter questions shown before the first message.
  • Introduction text — optional HTML displayed above the suggested questions.
  • Markdown rendering — assistant responses rendered as formatted HTML when league/commonmark is available.
  • Optional history restore on reload — reopens the chat with history intact after a page reload via localStorage.
  • In-browser test runner — fire test questions against the assistant directly from the block configuration form.
  • CLI test runner — a Drush script for automated testing from the terminal, with support for multi-turn conversation simulation.
  • SDC example component — a Single Directory Component starter that can be copied into any theme as a customisation base.

Post-Installation

  1. Configure an AI Assistant at Administration → AI → Assistants.
  2. Place the block at Structure → Block layout — search for AI Chatblock.
  3. Configure the block: go to the block's configuration form, select the AI Assistant you just created, and set other values as needed.
  4. Test the assistant — expand Test Questions in the block config form, enter a few questions then save the form. Then click Run Tests to verify responses.
  5. Theming (optional) — copy templates/ai-chatblock.html.twig to your theme and/or copy example-data/chatbot-sdc/ to your theme's components/ directory. Disable the module's default CSS in your theme's .info.yml:
    libraries-override: ai_chatblock/chatbot: css: theme: css/ai-chatblock.css: false

Additional Requirements

  • Drupal 10 or 11
  • drupal/ai — core AI integration framework, including the ai_assistant_api sub-module.
  • At least one configured AI Assistant entity at Administration → AI → Assistants.
  • An LLM provider module — e.g. drupal/ai_provider_openai with a valid API key.
  • league/commonmark — converts assistant responses from Markdown to formatted HTML. Install via composer require league/commonmark. Without it, responses are plain text.
  • drupal/ai_agents — adds agentic capabilities (tool use, multi-step reasoning) to AI Assistants.
  • A vector database provider (e.g. drupal/ai_vdb_provider_milvus) — enables retrieval-augmented generation (RAG) so the assistant can answer questions grounded in your site's content.

Similar projects

  • drupal/ai - submodule ai_chatbot — the official AI ecosystem chatbot module. The difference is that ai_chatbot's preferred frontend uses an external js chatbot API (Deepchat), while ai_chatblock's frontend is all Drupal.

Supporting this Module

Developed and maintained by LOOMhttps://loom.de

CLI test runner:

ddev drush php:script web/modules/custom/ai_chatblock/tests/drush/test-questions.php

Set $shared_thread = TRUE in the script to simulate a continuous multi-turn conversation.

Activity

Total releases
1
First release
Mar 2026
Latest release
1 month ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.0 Stable Mar 6, 2026