Documentation Index
Fetch the complete documentation index at: https://docs.runflow.ai/llms.txt
Use this file to discover all available pages before exploring further.
Observability Exports
Conversation Messages
message(data, options?)
Emit a conversation_message trace. The portal renders these as chat bubbles and uses them to populate the thread sidebar preview. See Conversation Messages for the full guide and examples.
MessageData):
| Name | Type | Description |
|---|---|---|
role | 'user' | 'assistant' | 'system' | 'tool' | string | Speaker. Custom strings are accepted. |
content | string | Record<string, any> | Plain text or a structured object with a type field (e.g. { type: 'buttons', items: [...] }). |
metadata | Record<string, any> | Optional extra fields (citations, confidence, custom flags). |
parentId | string | Optional explicit parent span’s traceId. Falls back to the active startSpan() context. |
LogOptions:
| Name | Type | Description |
|---|---|---|
parentId | string | Same as data.parentId. Provided for symmetry with log() / logError(). |
@runflow-ai/sdk@1.1.10.
Business Events Tracking
track(eventName, properties?, options?)
Emit a business event for the portal dashboard.
| Name | Type | Description |
|---|---|---|
eventName | string | Event name (e.g. 'order_placed') |
properties | Record<string, any> | Key-value event data |
options | TrackOptions | Optional overrides |
TrackOptions:
| Name | Type | Description |
|---|---|---|
threadId | string | Override auto-resolved thread ID |
executionId | string | Override auto-resolved execution ID |
timestamp | string | ISO-8601 timestamp (defaults to now) |
flushTrackEvents()
Manually flush all buffered events. Returns a Promise<void>.
Next Steps
API Client
View API client exports
Standalone Modules
View standalone modules