For years, AI integration in Drupal was the territory of flashy demos and pilot projects that rarely made it to production. Today, the landscape is different: stable modules, documented architectures, and thousands of sites already using AI in production environments.
From the OpenAI module for Drupal to the AI module
The OpenAI module for Drupal was the pioneer: text generation, speech-to-text with Whisper, and images with DALL-E directly from the admin. But active development has moved to the AI module, which is provider-agnostic and connects Drupal to more than 21 providers (OpenAI, Anthropic, Google Vertex, AWS Bedrock, Ollama, and others) without locking organizations into a single one.
Main use cases
Content automation with generative AI — The module exposes text generation interfaces directly in the node edit form: drafts, summaries, SEO metadata, translations. For large volumes, the OpenAI Batch module handles asynchronous requests in bulk, processing selected content entities via cron.
AI code generation — The AI Generation module (experimental, local development only) generates modules, themes, and YAML configuration from an interface at /admin/config/ai/ai-generation or via Drush.
RAG (Retrieval-Augmented Generation) in Drupal — Instead of the LLM responding from generic pretrained knowledge, the system retrieves relevant fragments from the site's own content and injects them as context. Requires the Drupal AI module, an LLM provider, a vector database, and the Search API for indexing and retrieval. Every published node is automatically indexed on the next cron run.
Drupal AI Orchestration and AI agents for CMS
This is where Drupal makes the leap from CMS to orchestration platform. The Orchestration module exposes Drupal's capabilities to external automation platforms like Activepieces, enabling two-way interaction: external platforms can invoke Drupal workflows and execute AI agents for CMS, while Drupal can respond to external events such as content updates, user registrations, or form submissions.
A concrete example: when a visitor submits a contact form, a connected automation platform can add them to a CRM, send a personalized email, and open a support ticket — all without custom code. The ECA (Event-Condition-Action) module complements this logic directly inside Drupal, enabling visual workflow building without writing code.
For production observability, Langfuse automatically captures all AI module interactions: it groups multiple operations into unified traces and delivers analytics on token usage, response times, and model performance — with no changes to existing code required.
Predictive personalization with Drupal and AI
The most advanced level: using behavioral signals to adapt content in real time. Drupal's advantage here is structural — it stores content as typed, queryable data rather than plain HTML, exactly what AI models need to produce precise outputs.
Quick reference stack
| Level | Key modules | Use case |
| Basic | ai + ai_provider_openai + key | Editorial assistance, metadata |
| Intermediate | + ai_chatbot + Search API | Chatbot with site context |
| Advanced | + RAG + vector DB | Retrieval over own content |
| Enterprise | + orchestration + ECA + Langfuse | Orchestration, dynamic personalization |
*Each level includes the modules from the previous level plus those indicated.
The infrastructure is mature. The moment to explore AI integration in Drupal is not in the future — it already passed.