Inworld API
Sessions
The UInworldApiSubsystem represents the main API to communicate with the Inworld AI platform. It is responsible for managing sessions and messaging.
Start Session
Starts an InworldAI session. Must be called after all Player and Character components have been registered.
To expand blueprint node pins, simply right-click the pin and select 'Split Struct Pin'.
Scene Name
The machine readable id for integration from Inworld Studio.
Example format: 'workspaces/sample-workspace/scenes/my-scene'
Player Profile
Player Profile Name
The name that Inworld Characters will refer to the player as in dialog.
Player Profile Fields
The fields to be specified for the player.
Api Key and Secret
The Api Key and Api Secret generated from studio for the scene's workspace.
The Api Key is 32 characters long, and the Api Secret is 64 characters long.
Saved Session State
Session state to be loaded.
Stop Session
Stops an InworldAI session. Must be called after an InworldAI session has been started.
Pause Session
Pauses an InworldAI session. Must be called after an InworldAI session has been started.
Resume Session
Resumes an InworldAI session. Must be called after an InworldAI session has been paused.
Unitary Session
Starting from version 1.5, our server-side supports Unitary Session, enabling us to perform many operations without the need to restart the session.
Change Scene
Changes the current session scene.
Scene Name
The machine readable id for integration from Inworld Studio.
Example format: 'workspaces/sample-workspace/scenes/my-scene'
Load Characters
Loads characters with the provided Brain Names.
When you load a scene only characters added to this scene are loaded on server. If a character is setup or spawned in Unreal Engine level with a Brain Name provided this function is called and the character is automatically loaded on server even if the character wasn't added to the loaded scene. Use this node if you have custom character setup in an UE scene or when you need a character to be loaded on server before character spawn.
Unload Characters
Unloads characters.
Load Capabilities
Loads capabilities.
Load Player Profile
Loads player profile.
Load Saved State
Loads saved state.
Connection State
UENUM(BlueprintType)
enum class EInworldConnectionState : uint8 {
Idle, // No active connection
Connecting, // Attempting to establish connection with Inworld
Connected, // Actively connected to Inworld
Failed, // Failed to make initial connection to Inworld
Paused, // Connection is paused by the client
Disconnected, // Error - will automatically try to reconnect
Reconnecting // Attempting to reestablish connection with Inworld after disconnect
};
Get Connection State
Retrieves the current EInworldConnectionState for Inworld Api Subsystem.
On Connection State Changed
Bind an event to notify when Inworld Api Subsystem has changed EInworldConnectionState.
Messaging
Send Text Message
Sends a message of type text to the specified agent.
Send Trigger
Sends a trigger to the specified agent.
For information about Name and Params, see Goals Documentation.
Send Audio Message
Sends a message of type audio to the specified agent.
⚠️ An active audio session must exist between the player and agent to send audio events.
The Sound Wave should be streamed in 0.1 second increments.
Start Audio Session
Starts an audio session between the player and the specified agent.
Stop Audio Session
Stops an audio session between the player and the specified agent.
On Custom Trigger
Bind an event to notify when an Inworld Custom Trigger has occurred.
For information about Trigger Name, see Goals Documentation.
Cancel Response
Cancel the specified agent's response for the associated interaction.
Save Session
Save current state of the session. Returns Inworld Save structure to be passed to Start Session.
Send Narration Event
Send a Narrated Action
Send Interaction Feedback
Send feedback for the specified interaction.
- Interaction Id is the Id for the specified interaction.
- Is Like is used to specify if the interaction is perceived well or not.
- Message is to provide specific notes as to why the interaction was perceived well or not.