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

# Get Thread State At Checkpoint

> Get the thread state at a specific checkpoint.

Use this to inspect historical state at any point in the thread's
execution history. Returns 404 if the checkpoint does not exist.



## OpenAPI

````yaml /openapi.json get /threads/{thread_id}/state/{checkpoint_id}
openapi: 3.1.0
info:
  title: Aegra
  description: Production-ready Agent Protocol server
  version: 0.9.24
servers: []
security: []
tags:
  - name: Assistants
    description: A configured instance of a graph.
  - name: Threads
    description: Accumulated state and outputs from a group of runs.
  - name: Thread Runs
    description: Invoke a graph on a thread, updating its persistent state.
  - name: Stateless Runs
    description: Invoke a graph without state or memory persistence.
  - name: Crons
    description: Scheduled recurring runs on a cron schedule.
  - name: Store
    description: Persistent key-value and semantic storage available from any thread.
  - name: Event Streaming
    description: Agent Protocol v2 thread event streaming and commands.
  - name: Health
    description: Server health checks and service information.
paths:
  /threads/{thread_id}/state/{checkpoint_id}:
    get:
      tags:
        - Threads
      summary: Get Thread State At Checkpoint
      description: |-
        Get the thread state at a specific checkpoint.

        Use this to inspect historical state at any point in the thread's
        execution history. Returns 404 if the checkpoint does not exist.
      operationId: >-
        get_thread_state_at_checkpoint_threads__thread_id__state__checkpoint_id__get
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
            title: Thread Id
        - name: checkpoint_id
          in: path
          required: true
          schema:
            type: string
            title: Checkpoint Id
        - name: subgraphs
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Subgraphs
            description: Include states from subgraphs
            default: false
          description: Include states from subgraphs
        - name: checkpoint_ns
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Checkpoint namespace to scope lookup
            title: Checkpoint Ns
          description: Checkpoint namespace to scope lookup
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadState'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentProtocolError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ThreadState:
      properties:
        values:
          additionalProperties: true
          type: object
          title: Values
          description: Channel values (messages, etc.)
        next:
          items:
            type: string
          type: array
          title: Next
          description: Next nodes to execute
        tasks:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Tasks
          description: Tasks to execute
        interrupts:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Interrupts
          description: Interrupt data
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Checkpoint metadata
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Timestamp of state creation
        checkpoint:
          $ref: '#/components/schemas/ThreadCheckpoint'
          description: Current checkpoint
        parent_checkpoint:
          anyOf:
            - $ref: '#/components/schemas/ThreadCheckpoint'
            - type: 'null'
          description: Parent checkpoint
        checkpoint_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Checkpoint Id
          description: Checkpoint ID (for backward compatibility)
        parent_checkpoint_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Checkpoint Id
          description: Parent checkpoint ID (for backward compatibility)
      type: object
      required:
        - values
        - checkpoint
      title: ThreadState
      description: Thread state model for history endpoint
    AgentProtocolError:
      properties:
        error:
          type: string
          title: Error
          description: Error type
        message:
          type: string
          title: Message
          description: Human-readable error message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: Additional error details
      type: object
      required:
        - error
        - message
      title: AgentProtocolError
      description: Standard Agent Protocol error response
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ThreadCheckpoint:
      properties:
        checkpoint_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Checkpoint Id
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
        checkpoint_ns:
          anyOf:
            - type: string
            - type: 'null'
          title: Checkpoint Ns
          default: ''
      type: object
      title: ThreadCheckpoint
      description: Checkpoint identifier for thread history
    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

````