Skip to main content

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.

Session Start

Scene Name

The machine readable id for integration from Inworld Studio.

Example format: 'workspaces/sample-workspace/scenes/my-scene'

Scene id

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.

Api Keys

Stop Session

Stops an InworldAI session. Must be called after an InworldAI session has been started.

Session Stop

Pause Session

Pauses an InworldAI session. Must be called after an InworldAI session has been started.

Session Pause

Resume Session

Resumes an InworldAI session. Must be called after an InworldAI session has been paused.

Session Resume

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.

Get Connection State

On Connection State Changed

Bind an event to notify when Inworld Api Subsystem has changed EInworldConnectionState.

On Connection State Changed

Messaging

Send Text Message

Sends a message of type text to the specified agent.

Send Text Message

Character Agent Id

Send Custom Event

Sends a custom event to the specified agent.

Send Custom Event

Character Agent Id

Name refers to the Goal Trigger ID in Inworld Studio.

Studio Custom Event

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.

Send Audio Message

Character Agent Id

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.

Start Audio Session

Character Agent Id

Stop Audio Session

Stops an audio session between the player and the specified agent.

Stop Audio Session

Character Agent Id

On Custom Trigger

Bind an event to notify when an Inworld Custom Trigger has occurred.

On Custom Trigger

Name refers to the User-defined event in Inworld Studio.

Studio Trigger

Cancel Response

Cancel the specified agent's response for the associated interaction.

Cancel Response

Character Agent Id