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

# Import memories agents already saved on disk

> What `memloom import agent-memory` calls. Discovers the agents' own well-known
memory folders (Claude Code per-project memory directories, GitHub Copilot's
memory-tool notes; the client never supplies a filesystem path), parses each file
into memories, redacts secret-shaped strings, and saves through the belief
pipeline. No LLM extraction: the files are already distilled. A content-hash
ledger skips unchanged memories, so re-runs are free. The response streams NDJSON:
one `{"type":"item"}` event per folder, then `{"type":"done"}` with the totals.




## OpenAPI

````yaml /openapi.yaml post /import/agent-memory/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:
  /import/agent-memory/stream:
    post:
      summary: Import memories agents already saved on disk
      description: >
        What `memloom import agent-memory` calls. Discovers the agents' own
        well-known

        memory folders (Claude Code per-project memory directories, GitHub
        Copilot's

        memory-tool notes; the client never supplies a filesystem path), parses
        each file

        into memories, redacts secret-shaped strings, and saves through the
        belief

        pipeline. No LLM extraction: the files are already distilled. A
        content-hash

        ledger skips unchanged memories, so re-runs are free. The response
        streams NDJSON:

        one `{"type":"item"}` event per folder, then `{"type":"done"}` with the
        totals.
      operationId: importAgentMemoryStream
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                agents:
                  type: array
                  items:
                    type: string
                  description: Only these agents (claude-code, copilot). Default both.
                project:
                  type: string
                  description: >-
                    Only Claude Code projects whose folder name contains this
                    substring.
                dryRun:
                  type: boolean
                  description: List folders and counts; no provider calls, no writes.
                force:
                  type: boolean
                  description: Re-import everything, ignoring the content-hash ledger.
      responses:
        '200':
          description: NDJSON progress stream ending with a done (or error) event.
        '400':
          $ref: '#/components/responses/ValidationError'
components:
  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

````