Add new AI agent for managing menus and menu items

Created on 4 August 2025, 2 months ago

Problem/Motivation

The current there is no agent functionality to manage menus or menu items. Adding an AI agent for menu and menu item management will allow site builders and developers to automate tasks such as creating menus, managing menu links, and updating navigation hierarchies using AI prompts or automated workflows.

Steps to reproduce

Proposed resolution

Introduce a new AI agent plugin (e.g., MenuAgent) that supports the following capabilities:

  • Listing menus and menu links.
  • Creating or updating menus.
  • Adding, editing, and reordering menu links.
  • Fetching menu structure information (titles, hierarchy, URLs).

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.2

Component

Code

Created by

🇮🇳India sijumpk

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

Merge Requests

Comments & Activities

  • Issue created by @sijumpk
  • Merge request !169Adding menu agent. → (Open) created by sijumpk
  • Pipeline finished with Failed
    2 months ago
    #564164
  • Pipeline finished with Failed
    2 months ago
    #564169
  • Pipeline finished with Failed
    2 months ago
    #564174
  • 🇮🇳India sijumpk

    Changes have been added to the relevant branch — please pull the latest code and test as follows:

    How to test the Menu Agent

    1. Install the Drupal CMS AI recipe .
    2. Check out the code from the branch containing the Menu Agent implementation.
    3. Run the database updates to register the new agent configuration:
      drush updb
    4. Go to the AI Assistant configuration page and edit Drupal CMS Assistant settings.
    5. Under "Agents Enabled", enable the Menu Agent by checking the corresponding checkbox.
    6. Open the Drupal Agent Chatbot prompt.
    7. Try creating or editing menus and menu links using natural language commands (e.g., "Create a new menu called Books Menu", or "Add a home page link to the Footer menu with title Home").
  • Pipeline finished with Success
    2 months ago
    #564183
  • 🇮🇳India anjaliprasannan

    Great work! @Sijumpk. I have reviewed and the menu agent is working fine. Only thing is you no need to specify to install drupal cms in steps to reproduce, we can test in drupal core as well.
    Steps followed:

    1. Run the database updates to register the new agent configuration:
    2. drush updb
    3. Edit the AI Assistant configuration settings.
    4. Under "Agents Enabled", enable the Menu Agent by checking the corresponding checkbox.
    5. Open the Drupal Agent Chatbot prompt.
    6. Tried creating or editing menus and menu links using natural language commands (e.g., "Create a menu Cities with terms as metro cities in India", "You can add Delhi, Chennai, kochi, Bangalore, Mumbai", Add a home page link to the Footer menu with title Home").

    Cities menu got created and terms where added. Home page link to the Footer menu with title Home was added.

    SS attached

  • 🇮🇳India sijumpk

    Yes, Anjali, I specified the Drupal CMS AI recipe just to make the testing setup easier. Essentially, it’s simply another agent—like ContentType, FieldType, or TaxonomyAgent—that can be used for regular agentic purposes.

Production build 0.71.5 2024