Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module adds an AI-powered chatbot to your website that can interact with visitors using your custom content. It supports various AI services and allows for customization of the chatbot's personality and responses.

Latest version supports Open AI, Google Gemini, Anthropic Claude and Mistral.

The AI Chatbot module provides a frontend chatbot block and acts as an AI agent for your website. It interacts with site visitors using your custom content/data. The module supports Open AI, Google Gemini, Anthropic Claude and Mistral. The AI prompt, context can be customized so that the AI agent just talks about your website/company and nothing else. Module supports configurable AI prompt, welcome message, agent name and more.

Features

- Configurable AI prompt and welcome message
- Configurable agent name
- AI works on your custom data context
- The module can use basic HTML formatting in context, which can be provided the custom data field like- 'strong', 'b', 'em', 'a', 'ol', 'ul', 'li', 'br', 'p'.
- The prompt can be configured/instructed to use basic HTML tags.
- Mobile-friendly frontend chat UI (fixed bottom-right)
- Open/Close chat window with smooth scroll
- Session persistence and reset functionality
- Caching of response for improved performance

Configuration

- Configure the AI API Settings (/admin/config/aichatbot/api)
- Configure the AI Prompt, Custom data (/admin/config/services/aichatbot-prompt)

Requirements

- AI Service (Open AI / Gemini / Claude / Mistral) API Key.

Installation

- Install as you would normally install a contributed Drupal module.

Frontend Block

The module provides a block titled "AI Chatbot".

- Go to: /admin/structure/block
- Place the block in a region (e.g., Header)
- The Chatbot block appears fixed in the bottom-right of the screen

Technical Notes

- Uses session to store chat history with 30-minute timeout
- Cache stores answers for 30 minutes using hashed question+prompt
- Module use your custom data context before calling AI service

Curl Commands to test your API Key and Model integration

OpenAI

curl https://api.openai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCOUNT_API_KEY" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "What is Drupal?"
      }
    ],
    "max_tokens": 512,
  }'

Anthropic Claude

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: YOUR_ACCOUNT_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Just Say Hi!"
      }
    ]
  }'

Gemini

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent" \
  -H 'Content-Type: application/json' \
  -H 'X-goog-api-key: YOUR_ACCOUNT_API_KEY' \
  -X POST \
  -d '{
    "contents": [
      {
        "parts": [
          {
            "text": "Just Say Hi!"
          }
        ]
      }
    ]
  }'

Mistral

curl --location "https://api.mistral.ai/v1/chat/completions" \
     --header 'Content-Type: application/json' \
     --header 'Accept: application/json' \
     --header "Authorization: Bearer YOUR_ACCOUNT_API_KEY" \
     --data '{
    "model": "magistral-medium-latest",
    "messages": [{"role": "user", "content": "Just Say Hi!"}]
  }'

Maintainers
Current maintainer:
Gaurav Kumar - https://www.drupal.org/u/gauravkumar

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Jun 2025
Latest release
1 month ago
Releases (12 mo)
3 ▼ from 4
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
8.x-1.8 Stable 9–11 Jul 28, 2026
8.x-1.7 Stable 9–11 Feb 1, 2026
8.x-1.6 Stable 9–11 Oct 5, 2025
8.x-1.5 Stable 9–11 Jul 19, 2025
8.x-1.4 Stable 9–11 Jun 30, 2025
8.x-1.3 Stable 9–11 Jun 24, 2025
8.x-1.2 Stable 9–11 Jun 19, 2025