Skip to content
中文

Inspect sessions and usage

Use sessions, users and spending to assess your embed, then inspect an individual conversation. This page is for service agents already receiving traffic from a host application.

Prepare the records

With an authorized organization account, open Service agents → Select agent in the Dashboard; the tabs used below are Overview (概览), Sessions (会话), Customers (客户) and Usage (用量). Labels below describe the current Chinese Dashboard. Have the time, end-user ID and integration type ready.

Send a recognizable test message from your host website and receive a reply before checking operations data. Dashboard Playground records are excluded from customer operations statistics. They cannot prove customer traffic or spending was recorded.

Inspect the overview

Open Overview (概览) and choose 24 hours, 7 days or 30 days. Aggregate overview statistics are currently Dashboard-only; there is no corresponding public API.

InformationQuestion it answers
Sessions, active end users, cost, cost per sessionHas traffic or the cost of serving a conversation changed?
Positive feedback rateWhat proportion of rated responses received positive feedback?
P50 first-token latency, error rateHas the initial response slowed, or have runs failed?
Source and version distributionDoes traffic come from Kit, iframe, Hosted, API or automation? Is the new version in use?
Attention counters and top 5 toolsAre origins blocked, budgets reached or tool calls unusual?

Expected: Session trends and version distribution cover the selected period. A metric without samples displays “—”, not zero. The 24-hour trend uses hourly buckets; other periods use daily buckets. Run errors, origin blocks and tool counts aggregate the intersecting UTC calendar days, including whole boundary days.

Find and replay sessions

  1. Open Sessions (会话), enter the full end-user ID, and click Filter (筛选). Choose a Source (来源) if needed.
  2. Open the session and check its user, source, version and creation time in the replay header.
  3. Inspect messages and tool calls, locate your test message and reply, then use Close replay (关闭回放).

Expected: Replay is read-only; you cannot send messages. To prevent further messages, click Archive (归档) and confirm. Records remain readable after archiving, but the session cannot receive more messages.

Use response identifiers

Pass identifiers returned by the preceding response. Do not copy sample placeholders or construct identifiers from prefixes.

Next actionSource value
Fork a sessionmessage_id from a completed agent.message, not the event’s id; send it as message_id to POST /agent/v1/sessions/{session_id}/fork
Read an attachmentUse the actual path in the attachment creation or file listing response; computer attachments are under /attachments/, not the working directory
Pin a skill versionUpload response latest_version_id; see Skills for deletion order and references
Retrieve a thread or runIts creation response id; session, event and message identifiers are not interchangeable

Native API errors have the shape {type, error: {type, message, code, retryable}, request_id}. Keep request_id and the X-Request-Id response header; they can differ. Never include credentials. Back off only when retryable: true and repeating the operation is safe. After a write times out, inspect existing resources before sending another message or creating a session.

Inspect spending and budgets

Open Usage (用量) to see monthly spending, the monthly cap and its action. Choose 7, 30 or 90 days for daily spending. Below are budget and rate settings, monthly source breakdown and the top 20 end users by spending. Monthly totals use the UTC calendar month; displayed amounts are US dollars.

These aggregate reports and budget settings are currently Dashboard-only. Edit the budget settings directly in the Budget & limits (预算与限额) card on the Usage (用量) tab. Save and return to verify. Stop new sessions rejects session creation when the cap is reached; Alert only does not block it. Cost composition (花费构成) is not available yet; its placeholder is not a breakdown.

Verify and act

Match the host message, replay and source using the same user, session and period. For an unexpected version, check the version used at token issuance. Pinning or rolling back does not alter existing tokens. For missing data, check the environment, organization and period before creating more test sessions.

For origin or budget failures, record the response’s X-Request-Id, time, HTTP status and error code. Exclude API Keys and tokens. See Manage customers for user-level actions.

Next: Embed limits and errors · Agent API · Cookbook