Skip to content

AI Agents Views

Let an AI agent list, create, and update Drupal Views on your behalf - describe the listing you want in plain language instead of building it by hand in the Views UI.

What it can do

  • List views - enumerate existing views, or show the full config for one.
  • Create a view - a new View for a given content type or other entity, with sensible defaults.
  • Add a display - a page, block, feed, or attachment display on an existing view.
  • Add or update fields, filters, sorts, and relationships on a display.
  • Adjust display settings - title, path, access, pager, style, row, caching, CSS class, and more.
  • Remove a handler - take a field, filter, sort, or other handler back off a display.

The agent will not delete a view (it gives you the direct link to do that yourself) or change an existing view's base table - create a new view instead for that.

Install

composer require drupal/ai_agents_views
drush en ai_agents_views

Enabling the module installs the shipped Views Agent automatically.

Sample prompt

Create a view of published articles, sorted newest first, showing just the title.

See Example Prompts for more, including a fully explicit version of this one, and coverage of displays, filters, feeds, attachments, and more.

Chat interface

The optional views_agent_dev_assistant submodule adds a ready-to-use chat interface: a Views Assistant in the Gin toolbar that you can talk to in plain English, which delegates Views work to the Views Agent above (and content type, field, and taxonomy work to their own agents). See Views Assistant Submodule for how to enable it, and Views Assistant example prompts for what it can do.