Skip to main content

Class: SqliteImporter

Defined in: packages/agentos/src/memory/io/SqliteImporter.ts:83

Merges a source SQLite brain file into a target SqliteBrain.

Usage:

const importer = new SqliteImporter(targetBrain);
const result = await importer.import('/path/to/source.sqlite');

Constructors

Constructor

new SqliteImporter(brain): SqliteImporter

Defined in: packages/agentos/src/memory/io/SqliteImporter.ts:87

Parameters

brain

SqliteBrain

The target SqliteBrain to merge data into.

Returns

SqliteImporter

Methods

import()

import(sourcePath): Promise<ImportResult>

Defined in: packages/agentos/src/memory/io/SqliteImporter.ts:102

Open sourcePath as a read-only SQLite connection, read all tables, and merge their contents into the target brain.

The source connection is closed when this method returns (even on error).

Parameters

sourcePath

string

Absolute path to the source .sqlite file to import.

Returns

Promise<ImportResult>

ImportResult with counts of imported, skipped, and errored items.