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

# Get agent metrics

> Get cumulative usage metrics from the agent runtime.



## OpenAPI

````yaml /docs/reference/openapi.json get /metrics
openapi: 3.1.0
info:
  description: >-
    The HTTP API of an agent served with `omniserve run --agent agent.py`: runs,
    approvals, budgets, background tasks, sessions and the evidence of every
    run.
  title: OmniServe
  version: latest
servers:
  - description: omniserve run, locally
    url: http://localhost:8000
security: []
paths:
  /metrics:
    get:
      tags:
        - Metrics
      summary: Get agent metrics
      description: Get cumulative usage metrics from the agent runtime.
      operationId: get_metrics_metrics_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
          description: Successful Response
components:
  schemas:
    MetricsResponse:
      description: Response model for metrics endpoint.
      properties:
        average_time:
          default: 0
          description: Average time per request
          title: Average Time
          type: number
        total_request_tokens:
          default: 0
          description: Total request tokens used
          title: Total Request Tokens
          type: integer
        total_requests:
          default: 0
          description: Total number of requests
          title: Total Requests
          type: integer
        total_response_tokens:
          default: 0
          description: Total response tokens used
          title: Total Response Tokens
          type: integer
        total_time:
          default: 0
          description: Total processing time in seconds
          title: Total Time
          type: number
        total_tokens:
          default: 0
          description: Total tokens used
          title: Total Tokens
          type: integer
      title: MetricsResponse
      type: object

````