# Agent insight not loaded

**URL:** <https://community.livekit.io/t/agent-insight-not-loaded/428>\
**Category:** Agents\
**Tags:** livekit-cloud\
**Created:** [March 2, 2026, 5:36am UTC](https://community.livekit.io/t/agent-insight-not-loaded/428 "2026-03-02T05:36:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishal\_Maurya](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/vishal_maurya/32/516_2.png) [@Vishal\_Maurya](https://community.livekit.io/u/Vishal_Maurya)\
**Post date:** [March 2, 2026, 5:36am UTC](https://community.livekit.io/t/agent-insight-not-loaded/428/1 "2026-03-02T05:36:31Z")

</div>

Why these 3 don’t have usage metrics in Log Agent insight  
Room Id : [RM\_R688mmNWxYxw](https://cloud.livekit.io/projects/p_539vq31kxmx/sessions/RM_R688mmNWxYxw)  
[RM\_mqWdXm6zCn8f](https://cloud.livekit.io/projects/p_539vq31kxmx/sessions/RM_mqWdXm6zCn8f)  
[RM\_xzBrURRSTBmG](https://cloud.livekit.io/projects/p_539vq31kxmx/sessions/RM_xzBrURRSTBmG)

I want to know Usage: UsageSummary

CODE:

```auto

session = AgentSession(
        tools=[end_interview],
        stt=stt_plugin.FallbackAdapter([
            stt,
            assemblyai.STT(model="universal-streaming", api_key=ASSEMBLYAI_API_KEY)
        ]),
        # llm="openai/gpt-4o",
        llm = llm.FallbackAdapter(llm=[
            openai.LLM(
                model="gpt-5",
                api_key=OPENAI_API_KEY
            ),
            openai.LLM(
                model="gpt-4o"
            )
        ]),
        tts=tts_plugin.FallbackAdapter([
            tts,
   
        ]),
        vad=silero.VAD.load(),
        turn_detection=MultilingualModel(),
        preemptive_generation=True,
        allow_interruptions=True,
        min_interruption_duration=1.2, # Minimum speech length (s) to register as an interruption
        min_endpointing_delay=1.6, # Minimum time-in-seconds since the last detected speech before the agent declares the user's turn complete.
        max_endpointing_delay=7.0, # Maximum time-in-seconds the agent will wait before terminating the turn
        false_interruption_timeout=1.5, #
        user_away_timeout=20
    )

 usage = metrics.UsageCollector()

    @session.on("metrics_collected")
    def _m(ev):
        usage.collect(ev.metrics)

    async def log_usage():
        logger.info(f"Usage: {usage.get_summary()}")

    ctx.add_shutdown_callback(log_usage)

```

Even in my local, i didn’t printed this line

```auto
logger.info(f"Usage: {usage.get_summary()}")

```

---

<div class="post-metadata">

**Author:** ![CWilson](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/cwilson/32/135_2.png) [@CWilson](https://community.livekit.io/u/CWilson)\
**Post date:** [March 3, 2026, 12:29am UTC](https://community.livekit.io/t/agent-insight-not-loaded/428/2 "2026-03-03T00:29:46Z")

</div>

Your other sessions are saving insights and just not these three or none are saving insights?

---

<div class="post-metadata">

**Author:** ![Vishal\_Maurya](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/vishal_maurya/32/516_2.png) [@Vishal\_Maurya](https://community.livekit.io/u/Vishal_Maurya)\
**Post date:** [March 4, 2026, 6:12am UTC](https://community.livekit.io/t/agent-insight-not-loaded/428/3 "2026-03-04T06:12:48Z")

</div>

I got the issue and solved it.  
Thanks for your response

---

<div class="post-metadata">

**Author:** ![CWilson](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/cwilson/32/135_2.png) [@CWilson](https://community.livekit.io/u/CWilson)\
**Post date:** [March 4, 2026, 8:03pm UTC](https://community.livekit.io/t/agent-insight-not-loaded/428/4 "2026-03-04T20:03:24Z")

</div>

How did you solve it, just wondering incase others have the same issue.

---

<div class="post-metadata">

**Author:** ![Vishal\_Maurya](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/vishal_maurya/32/516_2.png) [@Vishal\_Maurya](https://community.livekit.io/u/Vishal_Maurya)\
**Post date:** [March 4, 2026, 8:21pm UTC](https://community.livekit.io/t/agent-insight-not-loaded/428/5 "2026-03-04T20:21:58Z")

</div>

I’m currently using the following code:

@session.on(“close”)  
async def on\_closed(session):  
logger.info(“\n------ Cleaning up timeout task on session close ------”)  
logger.info(f"Session closed Usage: {usage.get\_summary()}")  
timeout\_task.cancel()

However, it seems that using `async` with the `@session.on("close")` handler may not be supported.

When I change it to:

@session.on(“close”)  
def on\_closed(session):

(without `async`), I do not encounter any errors and the usage summary is correctly reflected in the insights dashboard.
