Population of task metadata during agent action

Created on 28 January 2025, 2 months ago

Problem/Motivation

I'm just looking at \Drupal\ai_agents\Plugin\AiAssistantAction\AgentAction::triggerAction which sets the $task on the Agent. The Task entity has a bunch of metadata like title/author/etc but at the moment it looks like it is just filling in the description from the action query.

<?php
    // Get all tokens and replace them in the query.
    $task = new Task($parameters['query']);
    $task->setComments($this->messages ?? []);
    $this->currentAgent->setTask($task);
?>

Leaving the prompt missing information

user

Task Title: 

Task Author: 

Task Description:

Can you update the price of the product called Headphones to be $15?

--------------------------

The prompt still works so its not a bug, but might just flagging in case this is expected to be populated.

Steps to reproduce

- create assistant chat bot using an existing agent
- send chat message

Proposed resolution

- Not sure

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom yanniboi UK

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

Comments & Activities

Production build 0.71.5 2024