Skip to content

[AI Bundle] Show configured components and their calls in the profiler panel - #2376

Open
sanya-misharin wants to merge 4 commits into
symfony:mainfrom
sanya-misharin:profiler-component-slicing
Open

sanya-misharin wants to merge 4 commits into
symfony:mainfrom
sanya-misharin:profiler-component-slicing

Conversation

@sanya-misharin

@sanya-misharin sanya-misharin commented Jul 31, 2026

Copy link
Copy Markdown
Q A
Bug fix? no
New feature? yes
Docs? yes
Issues Fix #525
License MIT

The profiler panel previously showed only platform calls, tools and tool calls, with the "Configured Platforms" metric hardcoded to 1, while the collector already gathered agent, chat, message store and store calls without rendering them.

As proposed in the issue discussion, this PR surfaces everything that is already collected - scoped to src/ai-bundle only:

  • panel sections for Agent Calls, Chat Calls, Message Store Calls and Store Calls (reusing a shared message_bag macro extracted from the platform calls section);
  • real per-component metrics (configured instances + calls) instead of the hardcoded platform count, and a "Configured Components" table listing each component with the service ids it was registered under (via indexed tagged iterators);
  • the toolbar now reflects all component slices and counts every collected call.

A follow-up PR will add TraceableIndexer to symfony/ai-store and wire it into the collector.

Screenshots (before / after / narrow viewport):

ai-panel-before-top ai-panel-after-top ai-panel-after-configured ai-panel-narrow

…r panel

The data collector already collected the calls of agents, chats, message
stores and stores, but the panel rendered none of them and reported a
hardcoded number of configured platforms.

The traceable services are now tagged with the id of the service they
decorate, so the collector can report which components are configured,
and the panel renders a section per component with the calls collected
for it.
@carsonbot carsonbot added AI Bundle Issues & PRs about the AI integration bundle Feature New feature Status: Needs Review labels Jul 31, 2026

@chr-hertel chr-hertel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid next step, but untested from my end for chat & message store component - thanks @sanya-misharin!

@chr-hertel chr-hertel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed while testing that this list is quite long now even if no message stores/chats are configured:

Image

let's skip components that are not configured please.

same here:
Image

Image

The toolbar list, the metrics row, the call sections and the configured
components table now only cover components that actually have a configured
instance, instead of always rendering all six slices.
@sanya-misharin

Copy link
Copy Markdown
Author

Thanks for testing, @chr-hertel! Fixed in f269f63.

Every slice is now gated on the component actually having a configured instance, in all the spots you pointed at, plus the "Configured Components" table that had the same zero rows:

  • toolbar: a Configured X / X Calls pair is only rendered when that component has a configured instance;
  • metrics: the component list is built once and filtered, so the metric groups and the dividers between them only cover configured components;
  • panel sections: Platform Calls, Tools + Tool Calls, Agent Calls, Chat Calls, Message Store Calls and Store Calls are skipped entirely for unconfigured components. The inner "No ... calls were made." empty states stay, so a configured but unused component still tells you it did nothing during this request;
  • if nothing at all is configured, the panel shows a single "No AI components are configured." note instead of an empty metrics bar.

The docs paragraph about the panel mentions this as well now.

All screenshots below come from one and the same profiler token, rendered once with the previous template and once with the new one. The demo app configures no chat and no message store, so it reproduces your setup.

Toolbar (before / after):

before-toolbar after-toolbar

Panel metrics (before / after):

before-panel-top after-panel-top

Empty sections (before / after):

before-configured after-configured

Configured Components table (before / after):

before-configured-table after-configured-table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Bundle Issues & PRs about the AI integration bundle Feature New feature Status: Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AI Bundle] Take Component Slicing into account in Profiler Toolbar/Panel

3 participants