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

# Get Session

> Returns comprehensive information about a session, including its current status, execution metadata, workflow blocks that have been executed, and agent information. This endpoint provides a complete view of the session's execution history and results.



## OpenAPI

````yaml GET /api/get_session/{session_id}
openapi: 3.0.1
info:
  title: Kura API
  description: API specification for Kura's agent and session management endpoints
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://backend.trykura.com
security: []
paths:
  /api/get_session/{session_id}:
    get:
      description: >-
        Returns comprehensive information about a session, including its current
        status, execution metadata, workflow blocks that have been executed, and
        agent information. This endpoint provides a complete view of the
        session's execution history and results.
      parameters:
        - name: session_id
          in: path
          description: Unique identifier for the session
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Session execution data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionExecutionData'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SessionExecutionData:
      type: object
      description: Response schema for session execution data
      required:
        - metadata
        - blocks
        - agent_metadata
      properties:
        metadata:
          $ref: '#/components/schemas/SessionExecutionMetadata'
        blocks:
          type: array
          description: List of executed workflow blocks in the session
          items:
            $ref: '#/components/schemas/WorkBlockExecutionLogResponse'
        agent_metadata:
          $ref: '#/components/schemas/BasicAgentMetadata'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    SessionExecutionMetadata:
      type: object
      description: Metadata about the session execution
      required:
        - session_id
        - agent_id
        - version_id
        - status
        - start_time
      properties:
        session_id:
          type: string
          description: Unique identifier for the session
        agent_id:
          type: string
          description: Identifier of the agent that executed the session
        version_id:
          type: integer
          description: Version identifier of the agent
        status:
          type: string
          description: Current status of the session execution
        start_time:
          type: integer
          description: Unix timestamp when the session started
        end_time:
          type: integer
          description: Unix timestamp when the session ended
          nullable: true
        output:
          description: Final output of the session execution
          nullable: true
        error_message:
          type: string
          description: Error message if the session failed
          nullable: true
    WorkBlockExecutionLogResponse:
      type: object
      description: Information about an executed workflow block
      required:
        - id
        - session_id
        - block_id
        - iteration_number
        - cached
        - replaced_variables
        - original_prompt
        - start_time
        - end_time
      properties:
        id:
          type: string
          description: Unique identifier for the block execution
        session_id:
          type: string
          description: Identifier of the session this block belongs to
        block_id:
          type: string
          description: Identifier of the workflow block
        parent_block_id:
          type: string
          description: Identifier of the parent block if applicable
          nullable: true
        iteration_number:
          type: integer
          description: Iteration number of the block execution
        output:
          description: Output of the block execution
          nullable: true
        cached:
          type: boolean
          description: Whether the block execution result was cached
        replaced_variables:
          type: object
          description: Variables that were replaced in the block execution
        original_prompt:
          type: string
          description: Original prompt used for the block execution
        start_time:
          type: integer
          description: Unix timestamp when the block execution started
        end_time:
          type: integer
          description: Unix timestamp when the block execution ended
        debug_data:
          type: object
          description: Debug data for the block execution
          nullable: true
        block_type:
          type: string
          description: Type of the workflow block
          nullable: true
        error_message:
          type: string
          description: Error message if the block execution failed
          nullable: true
    BasicAgentMetadata:
      type: object
      description: Basic metadata about the agent
      required:
        - agent_id
      properties:
        title:
          type: string
          description: Title of the agent
          nullable: true
        agent_id:
          type: string
          description: Unique identifier for the agent

````