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.
Scene Name
The machine readable id for integration from Inworld Studio.
Example format: 'workspaces/sample-workspace/scenes/my-scene'
Player Name
The name that Inworld Characters will refer to the player as in dialog.
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.
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.
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 Custom Event
Sends a custom event to the specified agent.
Name refers to the Goal Trigger ID in Inworld Studio.
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.
Name refers to the User-defined event in Inworld Studio.
Cancel Response
Cancel the specified agent's response for the associated interaction.