> ## 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, so every client shares one
    consistent view of

    your memories.


    ## Owners


    One daemon can serve more than one owner. Every owner-scoped endpoint, reads
    as well as

    writes, acts for the owner named by the `X-Memloom-Owner` request header: a
    uuid, sent on

    every request by a client bound to that owner. A request without the header
    gets the

    daemon's own default owner (`MEMLOOM_OWNER_ID` in its environment, or the
    sentinel owner

    when that is unset), which is what a single-owner install has always used
    and what the

    browser-based Console gets. `GET /health` reports that default.


    A malformed header is refused with 400 rather than coerced. The three
    endpoints that also

    accept an `ownerId` in their body (`/memory/save`, `/context/add`,
    `/context/url`) refuse a

    body value that disagrees with the header, rather than silently preferring
    one.


    Store-wide endpoints carry no owner: the speech-model catalog, reconcile
    settings, the

    connector scopes, the ingest queue, and `/health`.


    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.
    The owner header

    is therefore a separation mechanism, not an authentication one: any process
    on your machine

    can name any owner. It keeps two agents or two people out of each other's
    memories; it is

    not a boundary between untrusted users.
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
      parameters:
        - $ref: '#/components/parameters/OwnerHeader'
      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}
components:
  parameters:
    OwnerHeader:
      name: X-Memloom-Owner
      in: header
      required: false
      description: >
        The owner this request acts for. Applies to every owner-scoped endpoint,
        reads as well

        as writes. Omit it and the daemon's own default owner answers (see `GET
        /health`), which

        is what a single-owner install has always used. A value that is not a
        uuid is refused

        with 400 rather than coerced.
      schema:
        type: string
        format: uuid
      example: 11111111-1111-4111-8111-111111111111

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.