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

# Recall memories

> Hybrid retrieval over active memories: vector similarity + exact keyword + entity match,
fused with reciprocal-rank fusion. Results are ordered by `rrfScore`, which is rank-based
and small by design (about 0.03 max). `similarity` is the plain cosine similarity score.




## OpenAPI

````yaml /openapi.yaml post /memory/query
openapi: 3.1.0
info:
  title: memloom local API
  version: 0.1.0
  description: >
    The HTTP API served by the `memloom serve` daemon on your machine. The CLI,
    the MCP server,

    and the viewer all route through this API. The daemon is the single owner of
    the store, so

    every client shares one consistent view of your memories.


    No authentication: the daemon binds to `127.0.0.1` only and is reachable
    solely from your

    own machine. Browser clients on other localhost ports are allowed via CORS.
servers:
  - url: http://127.0.0.1:4319
    description: Local memloom daemon
security: []
paths:
  /memory/query:
    post:
      summary: Recall memories
      description: >
        Hybrid retrieval over active memories: vector similarity + exact keyword
        + entity match,

        fused with reciprocal-rank fusion. Results are ordered by `rrfScore`,
        which is rank-based

        and small by design (about 0.03 max). `similarity` is the plain cosine
        similarity score.
      operationId: queryMemory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                  description: What to recall, in natural language or exact identifiers.
                  example: what are my plans for today
                limit:
                  type: integer
                  description: Maximum results (default 10).
                  example: 5
      responses:
        '200':
          description: Ranked memories.
          content:
            application/json:
              schema:
                type: object
                properties:
                  memories:
                    type: array
                    items:
                      $ref: '#/components/schemas/Memory'
        '400':
          $ref: '#/components/responses/ValidationError'
        '503':
          $ref: '#/components/responses/StoreLocked'
components:
  schemas:
    Memory:
      type: object
      properties:
        id:
          type: string
        ownerId:
          type: string
        status:
          type: string
          enum:
            - active
            - stale
        memoryType:
          type: string
          description: >-
            The kind of memory: one of `fact`, `preference`, `episode`,
            `procedure`. Recall results for ingested context chunks carry the
            sentinel `context` (see `kind`).
          example: fact
        canonical:
          type: string
          nullable: true
        content:
          type: string
        summary:
          type: string
          nullable: true
        assertedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        similarity:
          type: number
          description: >-
            Cosine similarity to the query (meaning signal alone). Present on
            recall results.
          example: 0.85
        rrfScore:
          type: number
          description: >-
            Fused reciprocal-rank-fusion score. Rank-based and small by design.
            Use it for ordering; it is not a percentage.
          example: 0.0328
        kind:
          type: string
          enum:
            - memory
            - context
          description: >-
            Whether this result is a saved memory or a chunk of an ingested
            context document.
        source:
          type: object
          description: >-
            Present on context-chunk results; describes where the text came
            from.
          properties:
            documentId:
              type: string
            title:
              type: string
              example: Deploy Guide
            path:
              type: string
            headingPath:
              type: string
              nullable: true
              example: Deploy Guide > Database
            page:
              type: integer
              nullable: true
              description: 1-based PDF page.
  responses:
    ValidationError:
      description: The request body failed validation. `issues` names each offending field.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: invalid request body
              issues:
                type: array
                items:
                  type: object
                  properties:
                    path:
                      type: string
                      example: query
                    message:
                      type: string
                      example: query must be a non-empty string
    StoreLocked:
      description: >
        The store is held by a connected Postgres wire client (Drizzle Studio,
        psql). PGLite is

        single-connection; disconnect that client and retry. All `/memory/*`
        endpoints can

        return this.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: >-
                  the store is locked by a connected Postgres wire client
                  (Drizzle Studio, psql, a DB panel). PGLite is
                  single-connection; disconnect that client and retry.

````