Figure out an Architecture that unifies Assistants and Agents and uses the Modeller API "Properly"
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3566771. -->
Reported by: [yautja_cetanu](https://www.drupal.org/user/626050)
>>>
<p>Note: This is entirely written by AI based on a problem I perceived about this. I don't know if this has correctly understood the problem and there is a more detailed plan here: <a href="https://github.com/drupalforge/drupal_cms_ai_demo_flowdrop/tree/main/.claude/plans">https://github.com/drupalforge/drupal_cms_ai_demo_flowdrop/tree/main/.claude/plans</a></p>
<p>We will wait until after Tuesday 13th's demo before exploring this further. </p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>We currently have multiple FlowDrop entry points (Agent editor, Assistant editor, and future Chatbot editor). Each entry point ends up with slightly different<br>
save logic and behavior, even though the visual editor should behave identically. This leads to drift, inconsistent saves, and confusion when editing complex graphs<br>
that include Agents, Assistants, sub-agents, tools, and chatbots.</p>
<p>The Modeler API is designed to save related configuration together, but in practice we have multiple ModelOwners and custom save paths. This makes it harder to<br>
guarantee that “Save” behaves the same regardless of how a user enters the editor.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ol>
<li>Open an Assistant in FlowDrop.</li>
<li>Edit tools and sub-agents, save.</li>
<li>Open the linked Agent in FlowDrop.</li>
<li>Observe that the resulting graph/save behavior is not always consistent with the Assistant view.</li>
</ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Define a unified FlowDrop UI that always behaves the same, regardless of entry point. The only difference is the initial “focus” (Agent, Assistant, Chatbot).<br>
Save should persist all entities represented in the graph using a single, consistent pipeline.</p>
<p>Clarify and document how Modeler API should be used when a single UI saves multiple related entities, and identify any gaps or extensions needed.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ul>
<li>Define a workflow data contract that supports “focus” without changing save semantics.</li>
<li>Agree on a single save pipeline that persists Agents, Assistants, and Chatbots consistently.</li>
<li>Document how Modeler API should handle multi-entity saves in this context.</li>
<li>Update tests to verify consistent behavior across entry points.</li>
</ul>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>FlowDrop UI should look and behave the same for Agent, Assistant, and Chatbot entry routes. The only variation is which node is initially focused/centered in the<br>
graph. Drawer components and configuration panels should use the same reactive logic regardless of entry point.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>No immediate API changes are required, but we likely need a documented pattern for multi-entity saves via Modeler API (or a shared save service that works<br>
alongside Modeler API parsing).</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>No schema changes are required initially. The change is in how existing config entities (ai_agent, ai_assistant, chatbot blocks) are saved together from one<br>
graph.</p>
<p> If you want, I can tailor this to a specific issue number and add links to current routes or related code.</p>
issue