Constructors
Methods
Interfaces
Module Functions
Constructors
constructor
Parameters
Returns
Graph
Methods
start
outputStream: Async iterator for processing results - executionId: Unique identifier for this execution - variantName: The variant of the graph that was executed Important Changes in 0.8.0: - ✅ start() is now async - always use await - ✅ Returns ExecutionResult object (not just the stream) - ✅ Graph initialization happens on first call Execution Flow: 1. Call await graph.start(input) to begin execution 2. Iterate over outputStream to process results 3. Call stopInworldRuntime() when done
Parameters
Input data for the graph. Type depends on your start node’s expected input. Common types: string, LLMChatRequest, TTSRequest, Audio, or custom objects.
Optional execution context
Returns
Promise<ExecutionResult>
toJSON
Returns
string
stop
Returns
Promise<void>
visualize
Parameters
Path where the PNG visualization should be saved
Returns
Promise<void>
stopRuntime
Returns
Promise<any>
cancelExecution
Parameters
Returns
Promise<void>
getGraphId
Returns
string
Interfaces
ExecutionResult
Result returned from , containing the execution stream and metadata. This interface provides access to the graph execution results through an async iterator, along with execution tracking information.Properties
variantName:string
outputStream: GraphOutputStream
executionId: string
ExecutionContext
Optional context parameters for graph execution. Provides control over execution tracking, user targeting, and initial state. All parameters are optional and have sensible defaults.Properties
executionId?:string
userContext?: UserContextInterface
dataStoreContent?: { [x: string]: any; }
Module Functions
isGraphOptions
Parameters
Returns
boolean