> ## 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.

# Index with real-time progress (NDJSON stream)

> Same work as /memory/index, but the response streams newline-delimited JSON as it
runs: one `{"type":"item"}` event per processed memory/chunk (with its label, 1-based
position, total, and extracted entity names), then a final `{"type":"done"}` event
with the run totals. Failures mid-run arrive in-band as `{"type":"error"}`.




## OpenAPI

````yaml /openapi.yaml post /memory/index/stream
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/index/stream:
    post:
      summary: Index with real-time progress (NDJSON stream)
      description: >
        Same work as /memory/index, but the response streams newline-delimited
        JSON as it

        runs: one `{"type":"item"}` event per processed memory/chunk (with its
        label, 1-based

        position, total, and extracted entity names), then a final
        `{"type":"done"}` event

        with the run totals. Failures mid-run arrive in-band as
        `{"type":"error"}`.
      operationId: indexMemoriesStream
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: NDJSON progress stream ending with a done (or error) event.
          content:
            application/x-ndjson:
              schema:
                type: string
                example: >
                  {"type":"item","kind":"chunk","id":"...","label":"runbook.pdf
                  › DATABASE
                  FAILOVER","index":3,"total":46,"entities":["Postgres"]}

                  {"type":"done","indexed":0,"chunksIndexed":46}

````