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

# Retrieve Memory

<Warning>The API Reference is under active development. Request and response schemas may change before a stable release.</Warning>


## OpenAPI

````yaml /openapi.json post /open/v1/memory/retrieve
openapi: 3.1.0
info:
  title: Memind Server API
  description: HTTP API for Memind memory ingestion, retrieval, and administration.
  version: v1
servers: []
security: []
tags:
  - name: memory
    description: Runtime memory ingestion, retrieval, and health endpoints.
    x-group: memory
  - name: admin
    description: Administrative endpoints for memory operations.
    x-group: admin
paths:
  /open/v1/memory/retrieve:
    post:
      tags:
        - memory
      summary: Retrieve Memory
      operationId: retrieveMemory
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetrieveMemoryRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SuccessResultRetrieveMemoryResponse'
components:
  schemas:
    RetrieveMemoryRequest:
      type: object
      properties:
        userId:
          type: string
          minLength: 1
        agentId:
          type: string
          minLength: 1
        query:
          type: string
          minLength: 1
        strategy:
          type: string
          enum:
            - SIMPLE
            - DEEP
        trace:
          type: boolean
      required:
        - agentId
        - query
        - strategy
        - userId
    SuccessResultRetrieveMemoryResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/RetrieveMemoryResponse'
    RetrieveMemoryResponse:
      type: object
      properties:
        status:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/RetrievedItemView'
        insights:
          type: array
          items:
            $ref: '#/components/schemas/RetrievedInsightView'
        rawData:
          type: array
          items:
            $ref: '#/components/schemas/RetrievedRawDataView'
        evidences:
          type: array
          items:
            type: string
        strategy:
          type: string
        query:
          type: string
        trace:
          $ref: '#/components/schemas/RetrievalTraceView'
    RetrievedItemView:
      type: object
      properties:
        id:
          type: string
        text:
          type: string
        vectorScore:
          type: number
          format: float
        finalScore:
          type: number
          format: double
        occurredAt:
          type: string
          format: date-time
    RetrievedInsightView:
      type: object
      properties:
        id:
          type: string
        text:
          type: string
        tier:
          type: string
    RetrievedRawDataView:
      type: object
      properties:
        rawDataId:
          type: string
        caption:
          type: string
        maxScore:
          type: number
          format: double
        itemIds:
          type: array
          items:
            type: string
    RetrievalTraceView:
      type: object
      properties:
        traceId:
          type: string
        startedAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
        truncated:
          type: boolean
        stages:
          type: array
          items:
            $ref: '#/components/schemas/StageView'
        merge:
          $ref: '#/components/schemas/MergeView'
        finalResults:
          $ref: '#/components/schemas/FinalView'
    StageView:
      type: object
      properties:
        stage:
          type: string
        tier:
          type: string
        method:
          type: string
        status:
          type: string
        inputCount:
          type: integer
          format: int32
        candidateCount:
          type: integer
          format: int32
        resultCount:
          type: integer
          format: int32
        degraded:
          type: boolean
        skipped:
          type: boolean
        startedAt:
          type: string
          format: date-time
        durationMillis:
          type: integer
          format: int64
        attributes:
          type: object
          additionalProperties: {}
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/RetrievalCandidateTrace'
    MergeView:
      type: object
      properties:
        inputCount:
          type: integer
          format: int32
        outputCount:
          type: integer
          format: int32
        deduplicatedCount:
          type: integer
          format: int32
        sourceCount:
          type: integer
          format: int32
        status:
          type: string
    FinalView:
      type: object
      properties:
        strategy:
          type: string
        status:
          type: string
        itemCount:
          type: integer
          format: int32
        insightCount:
          type: integer
          format: int32
        rawDataCount:
          type: integer
          format: int32
        evidenceCount:
          type: integer
          format: int32
    RetrievalCandidateTrace:
      type: object
      properties:
        sourceType:
          type: string
        rank:
          type: integer
          format: int32
        finalScore:
          type: number
          format: double
        vectorScore:
          type: number
          format: float
        textPreview:
          type: string

````