Skip to content

Get agent statistics

View .md
GET

Get statistics for an AI agent including invocations, tokens, and costs.

Covers the messaging channels only. Voice calls are not counted here: a call is a multi-turn conversation rather than one inbound message and one reply, so it is recorded as a call, not an execution. An agent that only answers phone calls reports zeros on every field. Use GET /v1/calls for voice activity, duration, and cost.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • senderIdstringrequired

Responses

200Agent statistics.
  • totalInvocationsintegerrequired
  • totalTokensUsedintegerrequired
  • totalCostnumberrequired

    Total cost in USD.

  • successCountintegerrequired

    Successful executions among the agent's 100 most recent. Executions with status filtered (messages the agent never ran on) are not counted here, in errorCount or in avgLatencyMs.

  • errorCountintegerrequired

    Failed executions among the agent's 100 most recent.

  • avgLatencyMsnumbernullable

    Average latency of the agent's 100 most recent executions, filtered excluded. Null when there are none.

401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject
404Agent not found.
  • codestringrequired
  • messagestringrequired
  • detailsobject