Getting Started with Drupal AI: Brahim Khouy Explains the AI Core Module
Brahim Khouy, R&D and Tech Lead at Dropteam, has offered a practical roadmap for developers stepping into the Drupal AI ecosystem. His recent post outlines how to approach the AI Core module and start working with large language models (LLMs) via Drupal.
The AI Core module provides the abstraction layer that manages connections between Drupal and external AI providers. Rather than diving into the full architecture at once, Khouy advises developers to focus first on the AI Core programming interface, particularly its services and plugins.
According to Khouy, the left-hand side of the AI Core diagram—representing provider-specific plugins—can initially be ignored. Instead, developers should concentrate on the base call API, which standardizes how AI operations are structured, executed, and extended across contrib and custom modules.
Each AI operation, such as chat, speech-to-text, or image classification, defines an interface, an abstracted input class, and an abstracted output class. This structure ensures that providers can handle input and return results consistently across different implementations.
Operations accept an array of tags as a third parameter. These enable event-based integrations with other modules. For example, AI Logging and AI External Moderation use tags to monitor or modify requests dynamically. Core provider and model identifiers are always passed as tags to maintain context across calls.
To assist developers, Khouy links to the Base Calls developer guide, which outlines implementation details for defining and extending operation types in the AI module.
For developers integrating AI in Drupal, understanding the AI Core module’s service architecture is the first step. Khouy's diagram and documentation pointers offer a clear foundation for building advanced, provider-agnostic AI features.
Image Attribution Disclaimer: At The Drop Times (TDT), we are committed to properly crediting photographers whose images appear in our content. Many of the images we use come from event organizers, interviewees, or publicly shared galleries under CC BY-SA licenses. However, some images may come from personal collections where metadata is lost, making proper attribution challenging.
Our purpose in using these images is to highlight Drupal, its events, and its contributors—not for commercial gain. If you recognize an image on our platform that is uncredited or incorrectly attributed, we encourage you to reach out to us at #thedroptimes channel on Drupal Slack.
We value the work of visual storytellers and appreciate your help in ensuring fair attribution. Thank you for supporting open-source collaboration!

