Create agents as Tools
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3556380. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>This issue assumes that #1, #2 or #3 will be the decisions in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-1"><a href="https://www.drupal.org/project/ai/issues/3556140" title="Status: Active">#3556140: [Discuss] Allow usage of Tool API in Agents</a></span>. If not, we can close this issue.</p> <p>We want to move our agents from being function calls to being tools. This means that we need to add some differences onto the output.</p> <p>By default the output, can just change to a string, but if we have <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-8"><a href="https://www.drupal.org/project/ai/issues/3556378" title="Status: Needs review">#3556378: Create assisted structured output generation</a></span> in place, the output should conform to whatever the JSON Schema is.</p> <p>This also need to deprecate the agents as function calls part.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>Deprecate the agents as function calls.</li> <li>Make agents as tools - make sure to keep the same id, so an upgrade process is easy.</li> <li>Set output schemas - default to text.</li> <li>For complex schemas, the textual version of it is just the same but YAML dumped.</li> </ul>
issue