IntentNode.
Run the Template
- Go to Assets/InworldRuntime/Scenes/Nodesand play theIntentNodescene. 
- Once the graph is compiled, enter text.

Understanding the Graph
IntentNodeCanvas contains an InworldGraphExecutor whose graph asset includes only a single IntentNode.
The graph is very simple. It contains a single node, IntentNode, with no edges.
IntentNode is both the StartNode and the EndNode.

IntentData
TheIntentData is defined directly within the IntentNodeAsset.

IntentSample entries to help the AI module recognize those categories.

InworldController
InworldController includes only one primitive module: TextEmbedder.

IntentNode requires a TextEmbedder interface during CreateRuntime().
IntentNodeAsset.cs
Workflow
- When the game starts, InworldControllerinitializes its only module,TextEmbedderModule, which creates theTextEmbedderInterface.
- Next, InworldGraphExecutorinitializes its graph asset by calling each component’sCreateRuntime(). In this case, onlyIntentNode.CreateRuntime()is called, using the createdTextEmbedderInterfaceas input.
- After initialization, the graph calls Compile()and returns the executor handle.
- After compilation, the OnGraphCompiledevent is invoked. In this demo,IntentNodeTemplatesubscribes to it and enables the UI components. Users can then interact with the graph system.
IntentNodeTemplate.cs
- 
After the UI is initialized, pressing Enteror theSENDbutton sends the input text to the graph.
- 
Calling ExecuteGraphAsync()eventually produces a result and invokesOnGraphResult(), whichIntentNodeTemplatesubscribes to in order to receive the data.
IntentNodeTemplate.cs