> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Agent Stats

> Retrieve aggregated transcript statistics and usage metrics for a specific voice agent.

Retrieve high-level, aggregated statistics about a specific Voice Agent's performance and usage history.

If you are building an analytics dashboard for your users, this endpoint is highly efficient. Instead of downloading every single transcript to calculate metrics locally, this endpoint instantly returns pre-calculated totals and averages directly from the server.

<Info>
  **Authentication Required:** You must include your API key in the `x-api-key` header to authenticate this request.
</Info>

### Required Parameters

* **`agentId` (Path Parameter):** The 24-character unique identifier of the agent whose statistics you want to retrieve.

### Understanding the Analytics Response

A successful `200 OK` request returns a lightweight JSON object packed with actionable data:

* **`totalCalls`**: The absolute volume of conversations this agent has handled since it was created.
* **`browserCalls`**: How many of those calls originated from a web-based widget or browser interface.
* **`phoneCalls`**: How many calls were routed through a telephony or SIP trunk integration (e.g., standard phone lines).
* **`avgMessages`**: A great indicator of conversation depth. A higher average message count usually means the agent is successfully engaging users in longer, back-and-forth dialogue rather than quick drop-offs.


## OpenAPI

````yaml get /transcripts/agent/{agentId}/stats
openapi: 3.0.3
info:
  title: Lyzr Voice LiveKit API
  version: 1.0.0
servers:
  - url: https://voice-livekit.studio.lyzr.ai/v1
security: []
paths:
  /transcripts/agent/{agentId}/stats:
    get:
      summary: Get Agent Stats
      description: >-
        Retrieve aggregated transcript statistics and usage metrics for a
        specific voice agent.
      parameters:
        - name: agentId
          in: path
          required: true
          description: The unique identifier of the agent.
          schema:
            type: string
            example: f790923795a23467555c0ad6
      responses:
        '200':
          description: Agent transcript statistics retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  totalCalls:
                    type: integer
                    description: The total number of sessions handled by this agent.
                    example: 1250
                  browserCalls:
                    type: integer
                    description: >-
                      The number of sessions initiated via a web browser
                      interface.
                    example: 850
                  phoneCalls:
                    type: integer
                    description: >-
                      The number of sessions initiated via a SIP/telephony
                      integration.
                    example: 400
                  avgMessages:
                    type: number
                    format: float
                    description: The average number of messages exchanged per session.
                    example: 14.5
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````