Show case Modeler API to setup an agent

Created on 15 May 2025, 19 days ago

Problem/Motivation

Build a POC to show case how a modeler can be used to create a new agent or to modify an existing one.

Proposed resolution

  • Identify the building blocks
  • Map them to UI component types
  • Implement the model owner plugin to work with agents and write the saved "model" back to a config entity
πŸ“Œ Task
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

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

Merge Requests

Comments & Activities

  • Issue created by @jurgenhaas
  • Merge request !131Resolve #3524652 "Show case modeler" β†’ (Open) created by jurgenhaas
  • Pipeline finished with Failed
    16 days ago
    Total: 165s
    #499733
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    If the showcase goers in the right direction, there are 2 blocks of topics that we need to discuss:

    Integration decisions:

    • Is modeler API a fixed dependency?
    • Do we allow different modelers?
    • If no modeler is available, the agent can not be edited?

    Tasks to do in bpmn_io:

    • Property panel too high, should be embedded in the canvas and have a scrollable container when it's too high
    • Property panel: replace their forms with Drupal form API components
    • Hide all non-editable components in the property panel
    • Hide non-supported components in the left components panel
    • Auto-fill task label when adding a new template
    • Adding a new tool should start with the template selector, not that the user has to trigger that as a second step
    • Each tool can only be added once
    • Add zoom in/out widgets
  • Pipeline finished with Failed
    14 days ago
    Total: 158s
    #501115
  • Pipeline finished with Failed
    13 days ago
    Total: 195s
    #502038
  • Pipeline finished with Failed
    13 days ago
    Total: 217s
    #502760
  • Pipeline finished with Failed
    13 days ago
    Total: 162s
    #502812
  • Pipeline finished with Canceled
    13 days ago
    Total: 132s
    #502817
  • Pipeline finished with Success
    13 days ago
    Total: 152s
    #502818
  • Pipeline finished with Success
    12 days ago
    Total: 145s
    #503605
  • Pipeline finished with Success
    12 days ago
    Total: 215s
    #503644
  • Pipeline finished with Success
    12 days ago
    Total: 146s
    #503652
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    Testing instructions

    I started with the current version of Drupal 11.x (core, not recommended-project) and I am using ddev. Make changes as needed if you are using a different setup.

    Install modules and Drush

    Install from source, so that we can use git to pull different versions.

    ddev composer require --prefer-source drupal/bpmn_io:^3@dev drupal/modeler_api:^1@dev drupal/ai_agents:^1.1@dev
    ddev composer require drush/drush
    

    Check out specific branches

    I copied and pasted the instructions from this issue. (Expand the "Show commands" section.)

    cd modules/contrib/ai_agents
    git remote add ai_agents-3524652 git@git.drupal.org:issue/ai_agents-3524652.git
    git fetch ai_agents-3524652
    git checkout -b '3524652-show-case-modeler' --track ai_agents-3524652/'3524652-show-case-modeler'
    

    Then I switched to the dev branch of bpmn_io:

    cd ../bpmn_io
    git switch 3.0.x
    cd ../../..
    

    Install Drupal and enable modules

    ddev drush si --yes
    ddev drush en ai_agents_modeler_api --yes
    

    Generate a one-time login link

    ddev drush uli
    

    Open the link in a browser.

    Edit an AI agent

    1. Go to Administration > Configuration > AI > AI Agents Settings (/admin/config/ai/agents).
    2. Find an agent with Type: config, such as field_agent_triage.
    3. Follow the Edit link.

    Alternatively, from /admin/config/ai/agents, use the "Add AI Agent" action link (/admin/structure/ai_agent/add).

    Testing results

    When I enabled the ai_agents module, I got three warnings like this:

    Schema errors for ai_agents.ai_agent.content_type_agent_triage …

    I also see those warnings on /admin/config/ai/agents after clearing caches.

    My guess is that these warnings are not related to this issue. They might be there because I am using the latest 11.x version of Drupal core, not any release.

    Initially, I enabled the ai_agents module without the ai_agents_modeler_api submodule. That leads to a WSOD when I try to edit an agent. I think we need to disable the Edit link unless the appropriate modules are enabled. If this issue is intended as a proof of concept, then that can be done as a follow-up issue, but for now I am setting the status to NW.

  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    I am testing this issue while at MidCamp, so I added the issue tag for that. @cosmicdreams is here, too.

  • Pipeline finished with Success
    11 days ago
    Total: 242s
    #504122
  • Pipeline finished with Success
    11 days ago
    Total: 164s
    #504765
  • Pipeline finished with Failed
    10 days ago
    #504890
  • Pipeline finished with Success
    10 days ago
    #504893
  • Pipeline finished with Success
    9 days ago
    Total: 163s
    #505606
  • Pipeline finished with Success
    8 days ago
    Total: 184s
    #506670
  • Pipeline finished with Failed
    6 days ago
    Total: 152s
    #507642
  • Pipeline finished with Failed
    6 days ago
    Total: 159s
    #507646
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    @marcus_johansson this is now ready for review, as discussed in our call. It keeps the original functionality and adds the alternative agent form only if the ai_agents_modeler_api submodule is enabled. That gives people a chance to play around with this new stuff, but it also keeps the functionality untouched for productions systems.

  • Pipeline finished with Failed
    6 days ago
    #508350
  • Pipeline finished with Success
    6 days ago
    #508354
  • Pipeline finished with Failed
    6 days ago
    Total: 300s
    #508431
  • Pipeline finished with Success
    5 days ago
    Total: 155s
    #508640
Production build 0.71.5 2024