Skip to main content

Class: JsonExporter

Defined in: packages/agentos/src/memory/io/JsonExporter.ts:106

Exports a SqliteBrain to a structured JSON file.

Usage:

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

Constructors

Constructor

new JsonExporter(brain): JsonExporter

Defined in: packages/agentos/src/memory/io/JsonExporter.ts:110

Parameters

brain

SqliteBrain

The SqliteBrain instance to read from.

Returns

JsonExporter

Methods

export()

export(outputPath, options?): Promise<void>

Defined in: packages/agentos/src/memory/io/JsonExporter.ts:126

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

Parameters

outputPath

string

Absolute path to write the JSON output.

options?

ExportOptions

Optional export configuration.

Returns

Promise<void>