Exports a SqliteBrain to a structured JSON file.

Usage:

const exporter = new JsonExporter(brain);
await exporter.export('/path/to/export.json', { includeEmbeddings: false });

Constructors

Methods

Constructors

Methods

  • Export the full brain state to a JSON file at outputPath.

    Parameters

    • outputPath: string

      Absolute path to write the JSON output.

    • Optional options: ExportOptions

      Optional export configuration.

    Returns Promise<void>

  • Export the full brain state as a JSON string without filesystem access.

    Parameters

    • Optional options: ExportOptions

      Optional export configuration (embeddings, conversations).

    Returns Promise<string>

    Pretty-printed JSON string of the full brain payload.