Allow the Assistant and Chatbot access to the tool calling within the sub-agents behind agent tool calls.

Created on 19 August 2025, 27 days ago

Problem/Motivation

We would like to support giving the end-user more information about what the agents are doing whilst they wait. The goal is to support this usecase in experience builder: https://youtu.be/yOy7Ng7U-E4

This has a few things about it that are relevant to this issue and things that are important for a follow up.

  • - We want to make sure that we can display what the AI is doing in a human readable and understandable format. It doesn't need to have an absolutely accurate dipition of what is going on (No words like, Tools, or Agents, should appear here and we don't need to diferenciate between the two).
  • - We need the sub-agent tasks that the orchestrator has asked for the be information that is regularly sent back to the chatbot and displayed to the end user, with progress on when its started and when its finished).
  • - We eventually want to see the full plan of work across all the tool calls its going to do and then fill in the results as AI completes the tasks (Perhaps a follow up issue).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.2

Component

Code

Created by

🇬🇧United Kingdom yautja_cetanu

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

Comments & Activities

  • Issue created by @yautja_cetanu
  • 🇩🇪Germany marcus_johansson

    Doublet of 📌 Allow the Assistant and Chatbot access to the tool calling within the sub-agents behind agent tool calls. Active - setting to postponed, because this might turn into a meta issue.

  • 🇦🇺Australia RichardGaunt Melbourne

    This has been an area of interest to me while working on a project that is using the ai_agents.

    I've been attempting to get access to the communication between AI Provider and the assistant / agents in the process.

    I have been wanting to pass contextual data from the top-level process through an agent and all its sub-agents/functions, so that this context is accessible in my event subscribers for PreGenerateResponseEvent and PostGenerateResponseEvent (dispatched in \Drupal\ai\Plugin\ProviderProxy).

    Note this is not data to be consumed by the provider just accessible so I can carry out different actions within the subscribers.

    I've attempted to pass contextual data that is preserved in \Drupal\ai_agents\PluginBase\AiAgentEntityWrapper and passed to the provider (\Drupal\ai\Plugin\ProviderProxy::wrapperCall) method by:
    1. Setting ChatInput metadata - but this gets rebuilt/lost in the agent wrapper
    2. Setting Debug data to ChatInput - but this also gets overwritten in the agent wrapper
    3. Extra tags/user interface - but this method is not implemented in Agent Wrapper

    My personal fix for now has been to set an identifiable $runnerId on the agent that will orchestrate the other agents, then I have patched the AiAgentEntityWrapper class to set this same $runnerId

    I've uploaded the patch knowing that this is not the fix that should be implemented but gives an idea of how to pass contextual information through the different tools in the process.

Production build 0.71.5 2024