Class: ObsidianExporter
Defined in: packages/agentos/src/memory/io/ObsidianExporter.ts:62
Exports memory traces as an Obsidian-compatible Markdown vault.
Usage:
const exporter = new ObsidianExporter(brain);
await exporter.export('/path/to/obsidian-vault');
Extends
Constructors
Constructor
new ObsidianExporter(
brain):ObsidianExporter
Defined in: packages/agentos/src/memory/io/MarkdownExporter.ts:67
Parameters
brain
The SqliteBrain instance to read from.
Returns
ObsidianExporter
Inherited from
Properties
brain
protectedreadonlybrain:SqliteBrain
Defined in: packages/agentos/src/memory/io/MarkdownExporter.ts:67
The SqliteBrain instance to read from.
Inherited from
Methods
buildFileContent()
protectedbuildFileContent(trace):string
Defined in: packages/agentos/src/memory/io/ObsidianExporter.ts:95
Build Obsidian-flavoured Markdown for a trace.
Additions over the base implementation:
- Tags are rendered as
#tagNameinline hashtags in the body. - Related knowledge nodes (found via
knowledge_edges) are rendered as[[Node Label]]wikilinks appended at the bottom of the note.
Parameters
trace
TraceRow
Parsed trace row.
Returns
string
Full Markdown file content with front-matter.
Overrides
MarkdownExporter.buildFileContent
export()
export(
outputDir,options?):Promise<void>
Defined in: packages/agentos/src/memory/io/ObsidianExporter.ts:76
Export all memory traces as Obsidian-flavoured .md files.
Delegates to the parent export() method — directory creation and file
writing are handled there; only buildFileContent is overridden.
Parameters
outputDir
string
Root directory to write the Obsidian vault into.
options?
Optional export configuration.
Returns
Promise<void>
Overrides
traceRelativePath()
protectedtraceRelativePath(trace):string
Defined in: packages/agentos/src/memory/io/MarkdownExporter.ts:136
Determine the relative file path for a trace within the output directory.
Default: {scope}/{type}/{id}.md
Parameters
trace
TraceRow
The trace row.
Returns
string
Relative path string (no leading slash).