Class: ObsidianImporter
Defined in: packages/agentos/src/memory/io/ObsidianImporter.ts:80
Imports an Obsidian vault (directory of Markdown files) into a SqliteBrain.
Usage:
const importer = new ObsidianImporter(brain);
const result = await importer.import('/path/to/obsidian-vault');
Extends
Constructors
Constructor
new ObsidianImporter(
brain):ObsidianImporter
Defined in: packages/agentos/src/memory/io/ObsidianImporter.ts:84
Parameters
brain
The target SqliteBrain to import into.
Returns
ObsidianImporter
Overrides
Properties
brain
protectedreadonlybrain:SqliteBrain
Defined in: packages/agentos/src/memory/io/MarkdownImporter.ts:59
The target SqliteBrain to import into.
Inherited from
Methods
import()
import(
sourceDir):Promise<ImportResult>
Defined in: packages/agentos/src/memory/io/MarkdownImporter.ts:74
Recursively walk sourceDir, parse every .md file, and insert traces.
Non-Markdown files are silently ignored. Files that fail to parse are
recorded in result.errors and processing continues.
Parameters
sourceDir
string
Directory to recursively scan for .md files.
Returns
Promise<ImportResult>
ImportResult with counts of imported, skipped, and errored items.
Inherited from
postProcess()
protectedpostProcess(_filePath,_frontmatter,body,result,traceId):Promise<void>
Defined in: packages/agentos/src/memory/io/ObsidianImporter.ts:105
Post-process a successfully imported Markdown file:
- Warn about any embedded images (
![[...]]). - Extract inline
#hashtagsand merge them into the trace's tag list. - Parse
[[wikilinks]]and createknowledge_edgesentries.
Parameters
_filePath
string
Absolute path of the source file (unused here).
_frontmatter
TraceFrontmatter
Parsed front-matter data.
body
string
Markdown body (content after front-matter).
result
Mutable ImportResult accumulator.
traceId
string
The ID of the just-inserted trace.
Returns
Promise<void>