Drupal AI Views Agent

Created on 3 August 2025, 9 days ago

The detailed document can be found at https://docs.google.com/document/d/16yCLk7Q7WWbbqH9PxD6yJX9VufHNUqEWOGCW...

Summary

This issue outlines the scope, technical specifications, and user stories for a new Drupal AI Views Agent feature, designed to integrate AI capabilities into the Drupal Views module. The core objective is to enable users to create and configure Drupal Views using natural language instructions, leveraging Large Language Models (LLMs) and the existing Drupal AI Agent framework.

Introduction and Scenarios

The Drupal AI Views Agent will enhance the Views module by allowing users to interact with it through natural language. This feature will utilize Drupal AI agents and sub-agents to interpret user commands and translate them into specific Views configurations.

Sample scenarios include:

  • An event organizer wants to create a display for upcoming events to show on a homepage.
  • A non-profit organization wants to add a latest article listing to their homepage for awareness.

These scenarios are created based on https://new.drupal.org/assets/2025-06/Drupal-AI-Strategy-June-25_0.pdf.

Scope

The project's scope covers:

  • Development of the Drupal AI Views Agent for interpreting natural language to configure Views.
  • Integration with the existing Drupal AI Agent framework.
  • Identification and conversion of key parameters from natural language input (e.g., content type, display type, fields, filters, sorting)
  • Programmatic creation and configuration of a new View based on extracted parameters.
  • Support for common Views features: display types (block, page), style types (listing, table, grid), fields/view modes, filters (content type, status, arguments), sorting, content limits, headers/footers, and access control.

Technical Specifications

The Drupal Views AI Agent will process natural language instructions using an LLM to derive specific Views parameters.

An example instruction:

"Create a block display to show the latest 9 published articles in a 3 by 3 grid. Each article in the grid should show the title of the article, the image of the article, the summary of the article, and a read more link to the article."

Extracted parameters from this instruction would include:

  • Content type: article
  • Display type: block
  • Style type: grid
  • Style specific options: 3x3
  • Fields to use: title, summary, image, link to the article
  • Limit: 9
  • Sort order: published date descending
  • Content status: published

These parameters will then be passed to a function call plugin to create the view.

User Stories

The user stories for covering the AI agent's ability:

Future Considerations

Future enhancements may include:

  • Advanced filtering options (date ranges, taxonomy terms, user fields).
  • Relationship support between content types.
  • Contextual filters/arguments.
  • Exposed filters.
  • Internationalization for multi-language support.

Risks

Potential risks identified are:

  • LLM inaccuracies.
  • Complexity of the Views module.
  • Performance overhead.
  • Security vulnerabilities from natural language interpretation.
  • Instability and breaking changes due to ongoing Drupal AI module development.

Next Steps

The next steps involve:

  1. Review and approval of this document.
  2. Detailed technical design phase.
  3. Establishment of a comprehensive project plan and timeline.
  4. Commencement of development.

The detailed document can be found at https://docs.google.com/document/d/16yCLk7Q7WWbbqH9PxD6yJX9VufHNUqEWOGCW...

🌱 Plan
Status

Active

Version

1.0

Component

Project Management

Created by

🇨🇦Canada jibran Toronto, Canada

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024