createSomaEventWriter()
createSomaEventWriter(
config):EventWriter
Defined in: soma-event-writer.ts:203
Create a Soma event writer that persists events as Curator-compatible Markdown files.
Each event is written to {type}-{agentId}-{compact-ISO-timestamp}.md in the
configured inbox directory. The Curator picks up these files on its 60-second cycle.
Parameters
| Parameter | Type | Description |
|---|---|---|
config | SomaEventWriterConfig | Writer configuration with inbox directory path. |
Returns
An EventWriter that writes Markdown files to the Soma inbox.
Example
const writer = createSomaEventWriter({ inboxDir: '~/.openclaw/workspace/inbox' });
const emitter = createEventEmitter({ writers: [writer] });
await emitter.emit(createExecutionEvent(graph));
// Creates: ~/.openclaw/workspace/inbox/execution-alfred-20260314T083502.md