[Discuss] - Reusable agent specific modal popup chat
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3572258. -->
Reported by: [marcus_johansson](https://www.drupal.org/user/385947)
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Short Description: </strong>[One-line issue summary for stakeholders]<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
<em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>In <a href="https://www.drupal.org/project/ai_agents_debugger">https://www.drupal.org/project/ai_agents_debugger</a>, I've added a piece of code that I think could be reusable everywhere in Drupal. The problem with the current Chatbot is that either need to change it so you can talk to specific agents, since a general agent is not solved yet (and might not be the cheapest solution for specific problems).</p>
<p>What happens is that you run an agent, and then you can open the <a href="https://www.drupal.org/project/ai_agent_agent">AI Handler Agent</a> in a modal, that also sends the context of the whole run that just happened and then you can start chatting around it.</p>
<p>Think about having the Content Type agent on the content type pages or the Field Agent on the field pages etc. That means that any module could ship with a context specific chatbot.</p>
<p>We need a pattern for this where we can:</p>
<p>1. Load the chatbot with a specific agent.<br>
2. Load it with preset context.<br>
3. Preferably do ajax updates on actual changes, so you do not need to reload the page.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Discuss and come up with a solution.</p>
<h3 id="summary-ai-usage">AI usage (if applicable)</h3>
<p>[ ] AI Assisted Issue<br>
This issue was generated with AI assistance, but was reviewed and refined by the creator.</p>
<p>[ ] AI Assisted Code<br>
This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p>
<p>[ ] AI Generated Code<br>
This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p>
<p>[ ] Vibe Coded<br>
This code was generated by an AI and has only been functionally tested.</p>
issue