Skip to main content

Class: CsvImporter

Defined in: packages/agentos/src/cognition/memory/io/CsvImporter.ts:34

Imports a flat CSV file into a Brain.

Constructors​

Constructor​

new CsvImporter(brain): CsvImporter

Defined in: packages/agentos/src/cognition/memory/io/CsvImporter.ts:35

Parameters​

brain​

Brain

Returns​

CsvImporter

Methods​

import()​

import(sourcePath, options?): Promise<ImportResult>

Defined in: packages/agentos/src/cognition/memory/io/CsvImporter.ts:43

Read, parse, and import a CSV file.

Parameters​

sourcePath​

string

Absolute or relative path to the CSV file.

options?​

Pick<ImportOptions, "dedup">

Returns​

Promise<ImportResult>

Import summary with imported/skipped/error counts.


importFromString()​

importFromString(csvContent, options?): Promise<ImportResult>

Defined in: packages/agentos/src/cognition/memory/io/CsvImporter.ts:64

Import a CSV string directly into the target brain without filesystem access.

Parameters​

csvContent​

string

The raw CSV string to parse and import.

options?​

Pick<ImportOptions, "dedup">

Returns​

Promise<ImportResult>

Import summary with imported/skipped/error counts.