Interface ExportOptions

Options for exporting the memory store via Memory.export().

interface ExportOptions {
    format?: "json" | "markdown" | "sqlite" | "obsidian";
    includeEmbeddings?: boolean;
    includeConversations?: boolean;
}

Properties

format?: "json" | "markdown" | "sqlite" | "obsidian"

Serialisation format for the export artifact.

  • 'sqlite' – a new SQLite file holding this brain's rows of every portable table.
  • 'json' – one JSON document: the brain's metadata, its traces (forgotten ones included), graph rows, documents with their chunks and images, and conversations with their messages.
  • 'markdown' – a folder of Markdown files, one per active trace, each with YAML front matter.
  • 'obsidian' – the Markdown folder, each note's body followed by the trace's tags as #tags and a Related: list of [[wikilinks]] to the labels its knowledge-graph node links to, each when there are any.

When omitted, the output path names the format: a .json path is JSON, a .sqlite or .db path SQLite, and any other path a Markdown folder.

includeEmbeddings?: boolean

Whether a JSON export holds the raw embedding vectors of its traces, knowledge nodes, chunks and images, as base64. They make the file much larger; an import of a file without them stores those rows with no vector. A SQLite export always holds them, and a Markdown or Obsidian export never does.

Default

false
includeConversations?: boolean

Whether a JSON export holds the brain's conversations and messages rows. The other formats ignore it: a SQLite export holds every portable table, and a Markdown or Obsidian export holds traces alone.

Default

true