Run the Template
- Go to Assets/InworldRuntime/Scenes/Primitivesand play theCharacterInteractionTemplatescene. 
- Once loaded, select your preferred character icon and enter the name, role, description, and motivation.
- Click Proceed.
- Type your message and press Enteror clickSendto submit text.
- Hold the Recordbutton to record, then release to send the audio.
Understanding the Template
Structure
This demo combines all primitives using the API approach. CheckInworldController; it contains all primitive modules provided in the Inworld Unity AI Runtime SDK.

AudioManager also contains all AudioModules showcased in the STT Primitive Demo.

Character Creation Panel
In this demo, theCharacterCreationPanel holds a ConversationalCharacterData asset.
All input and edits modify this data asset.
When you press Proceed, the panel invokes its Proceed function, which switches to the next panel, CharacterInteractionPanel, passing the ConversationalCharacterData.
CharacterCreationPanel.cs
Conversation Prompt
This data is located underAssets/InworldRuntime/Data/General.

Proceed, the character data is inserted into this prompt.
The prompt, character data, and player name are required for this asset.

Register Events for All Primitive Modules
In this demo, theCharacterInteractionPanel starts by registering each module’s events.
This lets the panel handle responses from each primitive.
For example, when STT responds, it captures the text and calls PlayerSpeaks(),
which composes the message in the dialog so that the dialog history can be used to generate the LLM prompt.
CharacterInteractionPanel.cs
Workflow
- 
The InworldControllerinitializes all modules in sequence. 
- Each module creates its factory, which then creates its interfaces.
Text to the Character
Submitting text in the input field callsSubmit(), which:
1. PlayerSpeaks()
adds the incoming message to the dialog (rendered as bubbles in the panel).2. RequestResponse()
- 
adds this message to SpeechEventsin the conversation prompt’s event history.
- 
uses InworldFrameworkUtil.RenderJinja()to incorporate the knowledge, character data, and speech history, rendering the template prompt into a Jinja prompt that is sent to the LLM. 
- 
This eventually calls InworldController.LLM.GenerateTextAsync().
CharacterInteractionPanel.cs
Speak to the Character
Releasing the record button sends audio and triggers the audio thread process (see STT Primitive Demo); it eventually callsInworldController.STT.RecognizeSpeechAsync.
Then it follows the same flow as PlayerSpeaks() and RequestResponse() in “Text to the Character”.
CharacterInteractionPanel.cs
Get Response from the Character
After callingInworldController.LLM.GenerateTextAsync(), the LLM Module starts to work.
It frequently invokes the OnTask event to send generated data, which is captured by OnLLMProcessing to render bubbles in the UI.
When finished, it invokes OnTaskFinished to notify the panel.
It then sends the generated LLM chunks to the TTS module to synthesize audio.
CharacterInteractionPanel.cs