node_ai_assistant
Node AI Assistant adds an AI-powered chatbot tab directly inside the Drupal node edit form. Content editors and moderators can instantly query all field values — including deeply nested paragraphs and entity references — using plain English, without navigating away from the edit screen.
Managing nodes with dozens of fields and complex paragraph structures is time-consuming. Editors often need to scroll through the entire form just to find a single field value. Node AI Assistant solves this by giving editors a conversational interface right inside the edit form where they can simply ask "What is in the hero paragraph?" or "List all empty fields" and get an instant answer.
Features
- Inline AI chat tab — A dedicated "AI Assistant" tab appears inside the node edit form vertical tabs group, keeping editors in context without opening new pages or admin screens.
- Full field awareness — The AI has access to every field on the node including text fields, entity references, image fields, link fields, and boolean fields.
- Deep paragraph support — Recursively extracts nested paragraph field data up to 5 levels deep, so even complex paragraph structures are fully queryable.
- Conversational memory — Chat history is maintained within the session so editors can ask follow-up questions naturally.
- Suggestion chips — Pre-built prompt suggestions help editors get started instantly without knowing what to type.
- Provider agnostic — Works with any AI provider configured through the Drupal AI module including OpenAI, Anthropic Claude, Azure OpenAI, and Google Gemini.
- Read-only and safe — The assistant only reads and summarises field data. It never modifies node content, making it safe for all editorial roles.
- Role-based access — A dedicated permission
use node ai assistantcontrols which roles can see the AI tab. - Works on existing nodes — The tab only appears when editing an existing node, not on node creation forms where there is no data to query.
Use cases:
- A content editor needs to quickly check what text is inside a specific paragraph without scrolling through a long form.
- A moderator reviewing content needs a summary of all fields before approving a node.
- An editor wants to find all empty fields on a node before publishing.
- A site manager wants to quickly audit entity references and media fields on complex nodes.
Post-Installation
After enabling the module follow these steps:
- 1. Configure an AI provider — Go to Administration → Configuration → AI → Providers and configure at least one provider (e.g. OpenAI) with a valid API key using the Key module. Set it as the default provider for the "Chat" operation type.
- 2. Grant permissions — Go to Administration → People → Permissions and grant the
Use node AI assistantpermission to the roles that should have access to the chatbot tab (e.g. Content Editor, Moderator). - 3. Open any existing node — Go to Content → Edit on any existing node. You will see a new "AI Assistant" tab inside the vertical tabs area at the bottom of the edit form alongside tabs like Authoring information and Promotion options.
- 4. Start chatting — Click the AI Assistant tab, type a question in the input box or click one of the suggestion chips, and the AI will respond with information drawn entirely from that node's field data.
No additional configuration pages, content types, or text format changes are required.
Additional Requirements
The following are required for this module to function:
- Drupal core 10.x or 11.x
- AI module (
drupal/ai) — Provides the provider-agnostic AI abstraction layer and plugin manager that Node AI Assistant uses to communicate with AI services. - Key module (
drupal/key) — Required by the AI module for secure API key storage. - At least one AI provider sub-module — Install and configure one of the following depending on your preferred AI service:
drupal/ai_provider_openai— for OpenAI (GPT-4o etc.)drupal/ai_provider_anthropic— for Anthropic Claudedrupal/ai_provider_azure_openai— for Azure OpenAIdrupal/ai_provider_gemini— for Google Gemini
- Paragraphs module (
drupal/paragraphs) — Required only if your content types use paragraph fields. The field extractor will gracefully skip paragraph extraction if the module is not installed. - A valid API key from your chosen AI provider (OpenAI, Anthropic, etc.)
Recommended Modules and Libraries
- AI Logging — Part of the AI module suite. Provides request and response logging for auditing AI interactions on your site. Note: if enabled, ensure the
ai_log__tagsdatabase column is sized appropriately for large field contexts. - Gin Admin Theme — The AI Assistant tab and chat UI are designed to work well with modern admin themes. Gin provides a clean layout that complements the chatbot interface.
- Field Group — Helps organise complex node forms. Works alongside Node AI Assistant since the AI tab is appended independently of field group configuration.
- Paragraphs — When installed, Node AI Assistant automatically recurses into paragraph fields and extracts all nested content, making it significantly more useful on paragraph-heavy content types.
- Entity Reference Revisions — Required by Paragraphs. The field extractor handles entity reference revision fields natively.
Similar Projects
- AI Content — Part of the AI module suite. Focused on generating and improving content using AI during the authoring process. Node AI Assistant differs in that it is purely a read-only query tool for existing field data rather than a content generation tool.
- AI Assistant API — Provides a general-purpose AI assistant interface for Drupal. Node AI Assistant differs by being specifically embedded inside the node edit form and automatically scoped to the current node's field data with no manual context setup required.
- AI Agents — Provides autonomous agent behaviour allowing AI to take multi-step actions on Drupal data. Node AI Assistant is intentionally simpler and read-only — it queries and summarises but never modifies content, making it safer for editorial workflows.
- OpenAI / ChatGPT integration — A broader OpenAI integration module offering content generation, moderation, and other features. Node AI Assistant is provider-agnostic and focused specifically on the node edit form field inspection use case rather than site-wide AI features.
Supporting This Module
- File issues and feature requests on the project issue queue on drupal.org.
- Submit patches and merge requests — contributions are very welcome.
- Write a review on the project page to help others discover the module.
- Sponsor development — if your organisation depends on this module and would like to fund specific features or maintenance, please get in touch via the issue queue.
Community Documentation
- Installation walkthrough — Step-by-step setup guide including AI module configuration, provider setup, and permission assignment is available in the project's
README.mdon GitLab. - Video demo — Coming soon. Subscribe to the project to be notified when a walkthrough is published.
- Demo site — A DrupalPod-based demo is planned. Watch the issue queue for updates.
Additional notes:
This module was designed with editorial usability as the primary goal. The decision to make the assistant read-only was deliberate — content editors should feel confident that asking the AI a question will never accidentally modify their node. If you have a use case that requires the AI to write back to fields, consider using the AI Agents module in combination with custom agent tools instead.
The field extractor service (NodeFieldExtractor) is a standalone service that can be reused by other custom modules. If you need to extract all field values from any entity into a plain text string for AI context, you can inject node_ai_assistant.field_extractor into your own services and call extractAll($entity) directly.