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

# Get an execution's trace summary

> Summarizes the trace an Automation execution recorded: how many spans it holds, by type, which spans are
roots, and the tokens its LLM calls used. List the spans themselves with the trace spans endpoint.

A running execution returns the spans recorded so far, with `complete: false`. A finished execution
that recorded no trace returns `not_found`.




## OpenAPI

````yaml /openapi/platform-v1.yaml get /api/v1/automations/{automation_id}/executions/{execution_id}/trace
openapi: 3.0.1
info:
  title: CrewAI Platform API
  version: v1
  description: Supported public API for CrewAI Platform.
servers:
  - url: https://app.crewai.com
    description: Current CrewAI Platform host
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Users in the organization.
  - name: Status
    description: Platform health and API availability.
  - name: Automations
    description: >-
      Automations, their source artifacts, their executions, and their
      schedules.
  - name: Teams
    description: Teams in the organization.
  - name: Group Mappings
    description: Identity-provider group mappings to Teams.
  - name: Service Accounts
    description: Service accounts in the organization.
  - name: Webhook Endpoints
    description: Endpoints that receive signed event deliveries.
  - name: Studio Projects
    description: Projects built in Crew Studio.
  - name: Environment Variables
    description: Environment variables in the organization.
  - name: Git Repositories
    description: Git repositories connected to the organization.
  - name: LLM Connections
    description: Connections to LLM providers.
  - name: Tools
    description: Tools in the organization's tool repository.
paths:
  /api/v1/automations/{automation_id}/executions/{execution_id}/trace:
    parameters:
      - name: automation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          example: 4f6d0d9a-7b78-4c6a-b64f-2e2e3d2c8f9a
      - name: execution_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          example: 4f6d0d9a-7b78-4c6a-b64f-2e2e3d2c8f9a
    get:
      tags:
        - Automations
      summary: Get an execution's trace summary
      description: >
        Summarizes the trace an Automation execution recorded: how many spans it
        holds, by type, which spans are

        roots, and the tokens its LLM calls used. List the spans themselves with
        the trace spans endpoint.


        A running execution returns the spans recorded so far, with `complete:
        false`. A finished execution

        that recorded no trace returns `not_found`.
      operationId: getAutomationExecutionTrace
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                success:
                  value:
                    data:
                      complete: true
                      span_count: 4
                      error_span_count: 1
                      span_counts_by_type:
                        crew: 1
                        llm_call: 1
                        task: 1
                        tool_call: 1
                      root_span_ids:
                        - '0000000000000001'
                      usage:
                        input_tokens: 812
                        output_tokens: 164
              schema:
                type: object
                required:
                  - data
                additionalProperties: false
                properties:
                  data:
                    type: object
                    required:
                      - complete
                      - span_count
                      - error_span_count
                      - span_counts_by_type
                      - root_span_ids
                      - usage
                    additionalProperties: false
                    properties:
                      complete:
                        type: boolean
                        example: true
                        description: >-
                          False while the execution runs, or when the trace
                          holds more spans than the platform returns (5,000). A
                          trace that is not complete may be missing spans.
                      span_count:
                        type: integer
                        minimum: 0
                        example: 4
                      error_span_count:
                        type: integer
                        minimum: 0
                        example: 1
                      span_counts_by_type:
                        type: object
                        additionalProperties:
                          type: integer
                          minimum: 1
                        example:
                          crew: 1
                          llm_call: 1
                          task: 1
                          tool_call: 1
                        description: >-
                          Span counts keyed by span `type`. Types with no spans
                          are left out.
                      root_span_ids:
                        type: array
                        items:
                          type: string
                          example: 0f1e2d3c4b5a6978
                      usage:
                        type: object
                        nullable: true
                        additionalProperties: false
                        required:
                          - input_tokens
                          - output_tokens
                        description: >-
                          Tokens used by the execution's LLM calls, or null when
                          none were recorded.
                        properties:
                          input_tokens:
                            type: integer
                            minimum: 0
                            example: 812
                          output_tokens:
                            type: integer
                            minimum: 0
                            example: 164
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                unauthorized:
                  value:
                    errors:
                      - type: >-
                          https://docs-platform.crewai.com/api/problems/unauthorized
                        code: unauthorized
                        title: Unauthorized
                        status: 401
                        detail: Missing or invalid bearer token.
                  summary: Missing or invalid bearer token
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    errors:
                      - type: >-
                          https://docs-platform.crewai.com/api/problems/not_found
                        code: not_found
                        title: Not found
                        status: 404
                        detail: The requested resource could not be found.
                  summary: The execution finished without recording a trace
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '503':
          description: Service Unavailable
          content:
            application/json:
              examples:
                service_unavailable:
                  value:
                    errors:
                      - type: >-
                          https://docs-platform.crewai.com/api/problems/service_unavailable
                        code: service_unavailable
                        title: Service unavailable
                        status: 503
                        detail: Traces are temporarily unavailable. Try again later.
                  summary: The trace store did not answer
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - errors
      additionalProperties: false
      properties:
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Error'
    Error:
      type: object
      description: Public API error object.
      required:
        - type
        - code
        - title
        - status
        - detail
      additionalProperties: false
      properties:
        type:
          type: string
          format: uri
          enum:
            - https://docs-platform.crewai.com/api/problems/bad_request
            - https://docs-platform.crewai.com/api/problems/clipper_disabled
            - https://docs-platform.crewai.com/api/problems/clipper_disallowed
            - >-
              https://docs-platform.crewai.com/api/problems/clipper_feature_disabled
            - https://docs-platform.crewai.com/api/problems/clipper_not_found
            - https://docs-platform.crewai.com/api/problems/conflict
            - https://docs-platform.crewai.com/api/problems/forbidden
            - https://docs-platform.crewai.com/api/problems/internal_error
            - https://docs-platform.crewai.com/api/problems/not_found
            - https://docs-platform.crewai.com/api/problems/service_unavailable
            - >-
              https://docs-platform.crewai.com/api/problems/tool_execution_failed
            - https://docs-platform.crewai.com/api/problems/unauthorized
            - https://docs-platform.crewai.com/api/problems/validation_error
          example: https://docs-platform.crewai.com/api/problems/bad_request
        code:
          type: string
          enum:
            - bad_request
            - clipper_disabled
            - clipper_disallowed
            - clipper_feature_disabled
            - clipper_not_found
            - conflict
            - forbidden
            - internal_error
            - not_found
            - service_unavailable
            - tool_execution_failed
            - unauthorized
            - validation_error
          example: bad_request
        title:
          type: string
          x-crewai-enum-format: freeform
          enum:
            - Bad request
            - Clipper resource disabled
            - Clipper resource disallowed
            - Clipper feature disabled
            - Clipper resource not found
            - Conflict
            - Forbidden
            - Internal error
            - Not found
            - Service unavailable
            - Tool execution failed
            - Unauthorized
            - Validation error
          example: Bad request
        status:
          type: integer
          enum:
            - 400
            - 401
            - 403
            - 404
            - 409
            - 422
            - 500
            - 503
          example: 400
        detail:
          type: string
          example: The request is invalid.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.