Decide the Sub agents and tools

Created on 15 April 2025, about 2 months ago

Problem/Motivation

This module currently uses only 1 agent : src/Plugin/AiAgent/XbPageBuilder.php
With AI Agents 1.1, we now have the flexibility to break down the page building tasks to various sub agents. Each sub agents can use function calls to carry out individual tasks. This issue is for deciding the new agent workflow

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India Akhil Babu Chengannur

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

Comments & Activities

  • Issue created by @Akhil Babu
  • 🇮🇳India Akhil Babu Chengannur

    This is an early version of the workflow plan. It may change as development progresses.

  • 🇮🇳India Akhil Babu Chengannur

    "#2 is no longer valid.

    The module's architecture has completely changed. It now leverages utility functions defined by the XB UI, such as addNewComponentToLayout, to place components rather than updating the autosave data. This is inspired by the code of the ConceptProvider extension added in XB.

    The current implementation has only one agent with two sub-agents. The new version has the following agents:

    • Main Agent – An orchestration agent that parses the user request and assigns the task to the corresponding sub-agents.
    • Template Designer Agent: Used as a tool by the main agent. Responsible for building an entire page (e.g. a template for a news article).
    • Layout Editor: Used as a tool by the main agent. Responsible for adding new components to an already created page (e.g. "Add a paragraph with text explaining 5 new features of Drupal.")
    • Contextual Editor: Used as a tool by the main agent. Can update content or child components of a selected component placed on the page (e.g. the user selects a 2 column layout and asks, "Add 2 images to both columns").

    The module now supports creating code components from Figma design, using the Figma MCP Server. These new agents have been created for that:

    • Figma Agent: Creates Preact code from Figma data.
    • Figma Image Decoder Agent: Used as a tool by the Figma agent when the code component should use the exact images present in the Figma design, if any."

    These are not yet published.

Production build 0.71.5 2024