Edge works in the graph node system.
Run the Template
- Go to Assets/InworldRuntime/Scenes/Nodesand play theEdgeDemoscene. 
- The overall experience is the same as in the LLM Node Demo. Type your text; the AI agent will respond.

Understanding the Graph
NodeConnectionCanvas contains an InworldGraphExecutor.

TextToLLM and an LLMNode, connected by an edge Edge_SampleText_To_LLM.
TextToLLM is the StartNode and LLMNode is the EndNode.


CustomNode details
This node is aTxtToPromptSampleNodeAsset, implemented by inheriting from CustomNodeAsset.
In its overridden ProcessBaseData(), it inspects the input InworldBaseData, wraps it into an LLMChatRequest (the type accepted by LLMNode), and sends it onward.
TxtToPromptSampleNodeAsset.cs
Edge
This edge uses the default behavior: it simply forwards all output from the previous node to the next node.InworldController
TheInworldController is also simple; it contains only one primitive module: LLM.

Workflow
- When the game starts, InworldControllerinitializes its only module,LLMModule, which creates theLLMInterface.
- Next, InworldGraphExecutorinitializes its graph asset by calling each component’sCreateRuntime().
TextToPromptNode initializes immediately.
When LLMNode.CreateRuntime() is called, it uses the created LLMInterface as input.
- 
After initialization, the graph calls Compile()and returns the executor handle.
- 
After compilation, the OnGraphCompiledevent is invoked.
NodeConnectionTemplate subscribes to it and enables the UI components. Users can then interact with the graph system.
CustomNodeAsset.cs
NodeConnectionTemplate.cs
- After the UI is initialized, send the input text to the graph.
- 
Calling ExecuteGraphAsync()eventually produces a result and invokesOnGraphResult(), whichNodeConnectionTemplatesubscribes to in order to receive the data.
NodeConnectionTemplate.cs