Documentation Index
Fetch the complete documentation index at: https://dev.docs.inworld.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview > Inworld Graph
Class: UInworldGraph | Inherits from: UObject
Represents a blueprintable and programmable runtime graph. Provides functionality for creating, compiling, and executing graphs asynchronously using callbacks. The graph can manage nodes, edges, and execution states for real-time execution purposes.
Methods
Reference
CancelAllExecutions
Cancels all ongoing and pending executions
Examples
void CancelAllExecutions()
CancelExecution
Cancels an ongoing graph execution
Examples
void CancelExecution(const FString& ExecutionId)
Parameters
| Parameter | Type | Description |
|---|
| ExecutionId | const FString& | The identifier of the execution to cancel |
CheckNodeByName
Utility function for determining if a node exists in the graph
Examples
Returns
Type: bool
Description: true if a node with the name exists, false otherwise
GetAllExecutions
Gets all current executions (running and pending)
Examples
TArray<FInworldGraphExecution> GetAllExecutions()
Returns
Type: TArray<FInworldGraphExecution>
Description: Array of all current executions
GetExecutionInfo
Gets information about a specific execution
Examples
FInworldGraphExecution GetExecutionInfo(const FString& ExecutionId)
Parameters
| Parameter | Type | Description |
|---|
| ExecutionId | const FString& | The identifier of the execution |
Returns
Type: FInworldGraphExecution
Description: The execution information, or empty struct if not found
GetExecutionMode
Gets the current execution mode
Examples
EInworldGraphExecutionMode GetExecutionMode()
Returns
Type: EInworldGraphExecutionMode
Description: The current execution mode
GetExecutionStatus
Gets the status of a specific execution
Examples
EInworldGraphExecutionStatus GetExecutionStatus(const FString& ExecutionId)
Parameters
| Parameter | Type | Description |
|---|
| ExecutionId | const FString& | The identifier of the execution |
Returns
Type: EInworldGraphExecutionStatus
Description: The current status of the execution
GetGraphInstance
Creates and compile an instance of the given InworldGraph asset.
Examples
void GetGraphInstance(FOnGraphCompiled Callback)
Parameters
| Parameter | Type | Description |
|---|
| Callback | FOnGraphCompiled | Called when the graph initialization is finished |
GetGraphInstance
Examples
GetNodeByName
Utility function for grabbing a member node by its unique id
Examples
UInworldNode* GetNodeByName(
const FString& NodeName,
TSubclassOf<UInworldNode> NodeClass
)
Parameters
| Parameter | Type | Description |
|---|
| NodeName | const FString& | unique id of the node to look for |
| NodeClass | TSubclassOf<UInworldNode> | The class to convert the node to on return |
Returns
Type: UInworldNode*
Description: Pointer to the node with the given name, or nullptr if not found
GetNodeByName
Examples
Returns
Type: return
GetNodeByName
Examples
UInworldNode* GetNodeByName()
Returns
Type: UInworldNode*
GetPendingExecutionsCount
Gets the number of pending executions
Examples
int32 GetPendingExecutionsCount()
Returns
Type: int32
Description: Number of pending executions
GetRunningExecutionsCount
Gets the number of currently running executions
Examples
int32 GetRunningExecutionsCount()
Returns
Type: int32
Description: Number of running executions
IsCompiled
Checks if the graph has been compiled
Examples
Returns
Type: bool
Description: True if the graph is compiled, false otherwise
IsExecutionCanceled
Checks if an execution is canceled
Examples
bool IsExecutionCanceled(const FString& ExecutionId)
Parameters
| Parameter | Type | Description |
|---|
| ExecutionId | const FString& | The identifier of the execution to check |
Returns
Type: bool
Description: True if the execution is canceled, false otherwise
Lock
Examples
Returns
Type: FScopeLock
SetExecutionMode
Sets the execution mode for the graph
Examples
void SetExecutionMode(EInworldGraphExecutionMode Mode)
Parameters
| Parameter | Type | Description |
|---|
| Mode | EInworldGraphExecutionMode | The execution mode to set |
SetGraphId
Utility function for changing the graph’s string identifier
Examples