Fetch Data from Agent tracer in backend

I am working on an application built on Theme-Cosmos.

We are running some Agentic AI Agents which are doing some work in the backend.

My question is how do we use the Agent tracer in the backend to get the performance details of the Agent and show it in the UI via charts or anything.

Main requirement is to fetch the performance details of an Agent from Agent tracer in backend.

Use Agent Tracer only for debugging, not as a source for UI reporting, because Tracer is resource-heavy and meant to capture temporary execution details during troubleshooting, not to provide reusable performance data. For your requirement, log the agent run metrics yourself during each execution, such as start time, end time, duration, status, and processed count, into a dedicated data table. Then build a report definition on that table and show the results in the UI as charts. This gives you stable, searchable, and production-safe performance data. It also avoids the overhead of reading Tracer output in the backend. Pega documentation describes Tracer as a debugging tool and warns that it slows performance, so a custom metrics table is the correct solution.

Agent Tracer can be used to troubleshoot the issues to ensure the right tools are being invoked during the context of the conversation. I doubt that can be used for efficiency for reporting needs.