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

# List Traces

> List traces sorted by ``started_at DESC`` with cursor pagination.

Filters compose AND-style. ``cursor`` is opaque (base64url JSON);
callers should treat it as a token to round-trip back. The list
fetches ``limit + 1`` rows so it can detect whether a next page
exists without a separate ``COUNT`` query.



## OpenAPI

````yaml /standalone/openapi.json get /admin/api/v1/traces
openapi: 3.1.0
info:
  title: Idun Agent Engine Server
  description: A production-ready server for conversational AI agents
  version: 0.6.1
servers: []
security: []
tags:
  - name: Runtime
    description: >-
      Public agent run endpoints, engine operations, and chat-channel webhooks.
      SSE streaming via the AG-UI protocol.
  - name: Agent Configuration
    description: >-
      Singleton admin endpoints for the agent, prompts, memory, guardrails, and
      onboarding wizard.
  - name: Auth & SSO
    description: >-
      Login, sessions, password change, SSO config, and the public SSO discovery
      endpoint.
  - name: Integrations & Tools
    description: MCP server registry and external integration credentials.
  - name: Observability
    description: Tracing/logging provider configuration.
  - name: Traces
    description: >-
      Trace and span storage admin endpoints — list, detail, delete, and
      pipeline-health for the standalone trace store.
  - name: Dashboard
    description: >-
      Operator dashboard widgets — KPIs, time-series, top errors, and
      configuration summary.
paths:
  /admin/api/v1/traces:
    get:
      tags:
        - Traces
      summary: List Traces
      description: |-
        List traces sorted by ``started_at DESC`` with cursor pagination.

        Filters compose AND-style. ``cursor`` is opaque (base64url JSON);
        callers should treat it as a token to round-trip back. The list
        fetches ``limit + 1`` rows so it can detect whether a next page
        exists without a separate ``COUNT`` query.
      operationId: list_traces_admin_api_v1_traces_get
      parameters:
        - name: started_after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Started After
        - name: started_before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Started Before
        - name: model
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Model
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: User Id
        - name: session_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Session Id
        - name: name_contains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name Contains
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandaloneTraceListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StandaloneTraceListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/StandaloneTraceListItem'
          type: array
          title: Items
        nextCursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Nextcursor
        totalEstimate:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalestimate
      type: object
      title: StandaloneTraceListResponse
      description: |-
        Envelope for the list view.

        ``next_cursor`` is the opaque cursor for the next page or ``None``
        when the current page is the last one. ``total_estimate`` is left
        ``None`` on SQLite (count is expensive) and reserved for a fast
        PG estimate via ``pg_class.reltuples`` in a later iteration.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StandaloneTraceListItem:
      properties:
        otelTraceId:
          type: string
          title: Oteltraceid
        name:
          type: string
          title: Name
        startedAt:
          type: string
          format: date-time
          title: Startedat
        endedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Endedat
        latencyMs:
          anyOf:
            - type: number
            - type: 'null'
          title: Latencyms
        totalTokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totaltokens
        totalCostUsd:
          anyOf:
            - type: number
            - type: 'null'
          title: Totalcostusd
        models:
          items:
            type: string
          type: array
          title: Models
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        userId:
          anyOf:
            - type: string
            - type: 'null'
          title: Userid
        sessionId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sessionid
        tags:
          items:
            type: string
          type: array
          title: Tags
      type: object
      required:
        - otelTraceId
        - name
        - startedAt
      title: StandaloneTraceListItem
      description: |-
        One row in ``GET /admin/api/v1/traces`` list response.

        ``otel_trace_id`` is the lowercase hex encoding of the 16-byte
        W3C trace id. The DB stores raw bytes; routers convert at the
        boundary so JSON consumers never see a binary blob.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````