Interface: ImportOptions
Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:629
Options for importing memory data via Memory.importFrom(). Memory.importFromString() takes dedup alone, with
the format as its own argument.
Properties
dedup?
optionaldedup:boolean
Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:660
Whether a record is skipped as a duplicate when a trace of the same scope, scope id and user holds its text, or
names that text's SHA-256 as import_hash or content_hash; a Markdown or Obsidian note is also skipped when it
is the own note of the trace its front-matter id names. A trace of another scope id is not a duplicate, nor is
one another user filed: a record's user is its metadata's turnUserId (a note's front-matter turnUserId), or
the session owner's when it names none. A trace the brain forgot counts as any other. A JSON, SQLite or CSV import
reads a file's live records before its forgotten ones, so a text the file holds both forgotten and live arrives
live. A SQLite import merges a skipped record's tags, and the later creation time, into the trace it matches, and
an Obsidian note adds the tags and links that trace lacks. With false, no trace record is skipped as a duplicate
and nothing is merged into a trace the brain holds.
Default
true
format?
optionalformat:"json"|"markdown"|"auto"|"sqlite"|"csv"|"obsidian"|"chatgpt"
Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:646
Source format of the import file.
'auto'– read from the source: a.jsonfile is a ChatGPT export when its text holds"mapping"and"conversation_id", and JSON otherwise; a.sqliteor.dbfile is SQLite, a.csvfile CSV, a folder Markdown (name'obsidian'for an Obsidian vault), and any other path JSON.'sqlite'– one brain's SQLite file, as a'sqlite'export writes it.'json'– one JSON document, as a'json'export writes it.'markdown'– a folder of Markdown files: each file whose body is not blank is one trace, its front matter read into the trace's fields.'obsidian'– an Obsidian vault: the Markdown import, with each note's#tagsand[[wikilinks]]read as the trace's tags and knowledge-graph edges.'chatgpt'– ChatGPT'sconversations.jsonexport: each user message, with the assistant reply that follows it, is one trace.'csv'– a CSV file with a header row and acontentcolumn.
Default
'auto'