Debugging: slow or failing replies

Lesson 9 of 11 · Debugging. You measure slow or failing replies in Chrome DevTools, with the inspector from lesson 8, and copy a debug report.

The scenario

Customers say your AI agent takes a long time to answer on your website when it books an appointment or looks up an order. Sometimes it answers with the technical error reply instead. That part of the conversation calls one of your own systems through an API integration.

Goal: know which step is slow or fails, with the numbers to show it.

What you need

  • The Web Widget inspector switched on for your website. See Getting started with the Web Widget inspector.
  • In the same Chrome, signed in to your Zendesk account, so the panel can add your AI agent's conversation log.
  • Chrome DevTools: Cmd+Option+I on a Mac, F12 or Ctrl+Shift+I on Windows.

Steps

  1. On your website, open DevTools and the AI Agent Inspector tab. At the top, choose Web Widget inspector as the source. The panel is described in The AI Agent Inspector panel in Chrome DevTools.
  2. Reload the page with the panel open. The panel then captures the widget's realtime connection from the start, which it needs to measure typing.
  3. In the widget on the page, send the messages a customer sends to reach the slow part, for example: Can I book an appointment for Saturday? This is a real conversation, like any visitor's.
  4. Open Timings. For each reply you see Typing, First answer and Full reply, with the medians and the slowest reply. Replies slower than Slow after, 8 seconds unless you change it, are marked Slow.

    In the example, the AI Agent Inspector tab in Chrome DevTools on the Timings view, with Web Widget inspector as the source for the fictional shop Bluebird Bikes, bluebirdbikes.zendesk.com. Three replies are listed with Typing, First answer and Full reply. The third, Saturday morning, please., is marked Slow, with a first answer after 9.36 seconds. Above the table are Slow after 8 s measured on First answer, and the medians and the slowest reply.

  5. Click the slow row. The Timeline opens at that reply, with everything in order: messages, realtime and streaming events, network responses and conversation log entries. The Δ column shows the time since the previous row, so you see which step between the customer's message and the answer takes long, such as the API integration or the start of the stream. Select a row to see its data. Tick Issues only to see only the errors.

    In the example, the Timeline view of the AI Agent Inspector tab, with filters for messages, zE calls, widget events, realtime, streaming, network, analytics, console and log, and Issues only. The list shows the customer messages of the fictional shop Bluebird Bikes, typing events, task identification, a knowledge search, stream chunks, and an API integration called Book a test ride with HTTP 200, about 3 seconds after typing started; the answer began to stream 5.6 seconds later. The selected AI agent message is shown as JSON on the right.

  6. To see why your AI agent sometimes gives the technical error reply, repeat the conversation in the preview. Open a test of your AI agent and send the same messages. In the preview's Inspector, the Log tab shows the API integration with its Response code. An error code, such as 500 or 504, points to the integration rather than to your AI agent's content. The inspector's tabs are in Using the inspector, the Log tab in Reading the conversation log.
  7. Open Debug report and click Copy Markdown. Read it, then paste it into your request to us, with the name of your AI agent and when it happened.

    In the example, the Debug report view of the AI Agent Inspector tab, with the buttons Copy Markdown, Copy JSON and Rebuild above a Markdown report that starts with the account, the checks and the conversation of the fictional shop Bluebird Bikes.

Why it matters

  • With the timings and the report, your request shows which reply was slow and what happened at that moment, not only the symptom your customers noticed.
  • The report leaves out tokens, passwords, secrets and email addresses. It does contain the conversation, so read it before you send it. The report is always in English.
  • In the preview, Typing reads no signal: the test widget shows typing as soon as you send. The timings there come from the test widget's socket traffic, so open the panel before the conversation starts.
  • Preserve log keeps the timeline when the page reloads.
How the timings are measured

First answer runs from the customer's message to the first streamed text or message. Full reply runs to the last message before the customer's next message. Messages carry the server's time, and typing and streaming the browser's; the panel corrects the difference between the two clocks when it can. Choose under measured on whether Slow looks at the first answer or the full reply.

Was this article helpful?

0

Still stuck?

Our support team will take a look with you.

Comments

0 comments

Please sign in to leave a comment.