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

# Get Agent Statistics

> Get agent performance statistics.



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json get /agents/{agent_id}/stats
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /agents/{agent_id}/stats:
    get:
      tags:
        - agent-management
      summary: Get Agent Statistics
      description: Get agent performance statistics.
      operationId: get_agent_statistics_agents__agent_id__stats_get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: period_days
          in: query
          required: false
          schema:
            type: integer
            maximum: 365
            minimum: 1
            description: Period in days
            default: 30
            title: Period Days
          description: Period in days
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentStats'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AgentStats:
      properties:
        agent_id:
          type: string
          format: uuid
          title: Agent Id
        total_calls:
          type: integer
          title: Total Calls
        total_sessions:
          type: integer
          title: Total Sessions
        avg_call_duration:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Call Duration
        avg_sentiment_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Sentiment Score
        success_rate:
          type: number
          title: Success Rate
        last_call_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Call At
        cost_this_month:
          type: number
          title: Cost This Month
        calls_today:
          type: integer
          title: Calls Today
      type: object
      required:
        - agent_id
        - total_calls
        - total_sessions
        - avg_call_duration
        - avg_sentiment_score
        - success_rate
        - last_call_at
        - cost_this_month
        - calls_today
      title: AgentStats
      description: Agent statistics and performance metrics.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````