Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.5 Update released for Drupal core (11.4.5)! Release: Drupal 10.6.15 Update released for Drupal core (10.6.15)! Release: Trash 3.0.32 Minor update available for module trash (3.0.32). Release: Node View Permissions 2.0.3 Minor update available for module node_view_permissions (2.0.3). Release: Trash 3.1.0-beta3 New beta version released for module trash (3.1.0-beta3). Release: HTTP Client Manager 10.0.3 Minor update available for module http_client_manager (10.0.3). Release: HTTP Client Manager 11.0.3 Minor update available for module http_client_manager (11.0.3). Release: View Mode Selector Field 2.1.1 Minor update available for module view_mode_selector_field (2.1.1). Module Revived: Entity Browser 8.x-2.16 Module entity_browser updated after 11 months of inactivity (8.x-2.16). Usage Milestone: Media entity Twitter Module media_entity_twitter crossed 10,000 active installs.

Let an AI Agent list, create, and update Drupal Views on your behalf.

Project Overview

AI Agents provides configured agents — a system prompt, a set of tools, a chosen provider/model — that can reason and act through a tool-calling loop. Until now, an agent had no way to work with the Views system: creating a listing, adding a field or filter, or adjusting a display all required a site builder to do it by hand in the Views UI.

AI Agents Views closes that gap with a set of AI function-call tools for common Views operations, plus a ready-to-use Views Agent that composes them: list existing views, create a new view, add a display, add or remove handlers (fields, filters, sorts, arguments, relationships), update handler options, and update display-level plugin settings (title, path, access, style, row, and more).

This project is the implementation delivered for [META] Drupal AI Views Agent — the meta issue proposing AI-driven Views configuration across the Drupal AI ecosystem. The Views Agent itself was developed in Add views agent, a child issue of that meta issue.

Note: this module is experimental. Review any view it produces before relying on it in production.

Core Functionality

  • List views — enumerate existing views, or show the full config for one.
  • Create a view — a new View entity for a given entity type, with sensible defaults.
  • Create a display — add a display (e.g. page, block) to an existing view.
  • Create a handler — add a field, filter, sort, argument, relationship, header, footer, or empty-text handler to a display.
  • Update handler options — reconfigure an existing handler (e.g. a filter's operator/value, a sort's order).
  • Remove a handler — take a handler back off a display.
  • Update display plugins — set display-level options such as title, path, access, pager, style, and row.
  • List a sample view — show core's own frontpage (public) or content (admin) view as a worked example the agent can model new views on.
  • A shipped Views Agent config entity composes all of the above into one ready-to-use agent, with guardrails (e.g. it will not delete a view or change an existing view's base table).

Example use case

A site builder asks the Views Agent: Create an admin listing of all content, showing title, type, and status, sortable by last updated, gated behind the content overview permission. The agent creates the view, adds the display, adds the three fields and a sort, sets the access permission, and reports back what it built — all through the same tools a developer would otherwise call by hand, or via the Views UI.

Requirements

  • Drupal core ^10.3 || ^11
  • AI Agents (ai_agents)
  • Views UI (views_ui, Drupal core) — required for the administer views permission the tools check against

Installation

Install as you would normally install a contributed Drupal module:

composer require drupal/ai_agents_views
drush en ai_agents_views

Enabling the module installs the shipped Views Agent config entity automatically.

Usage

  1. Grant the acting user (or the agent's configured account) the administer views permission.
  2. Invoke the Views Agent through the AI Agents system (chat, or any integration that can call a configured agent) with a natural-language request.
  3. The agent plans and calls the tools it needs — creating the view, adding the display, fields, filters, and sorts — and reports the result.
  4. Review the resulting view in the Views UI as you would any other.

Sample prompt

Create an entity type node listing view with the default display, title field with label Title, sort in descending order by created date, filter by published status 1, and filter by type article. Grant 'access content' permission. Create a page display with URL 'content-listing'.

The individual tools are also available to any other agent: add them to a custom agent's tool list to compose your own Views-editing behavior.

Demo & further reading

Similar Projects

  • AI Agents — provides the agent framework and tool-calling loop this project supplies Views tools for.
  • [META] Drupal AI Views Agent — the ecosystem-wide meta issue this project implements.

No other project currently exposes Views CRUD operations as AI Agent tools; this project exists to fill that gap.

Activity

Tracked releases
2
Tracked since
Aug 2026
Latest release
4 hours ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0-beta1 Pre-release Aug 6, 2026
1.0.x-dev Dev Aug 6, 2026