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

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'

Scene id

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.

Api Keys

Saved Session State

Session state to be loaded.

Save Session

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

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.

Change 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.

Change Scene

Unload Characters

Unloads characters.

Change Scene

Load Capabilities

Loads capabilities.

Change Scene

Load Player Profile

Loads player profile.

Change Scene

Load Saved State

Loads saved state.

Change Scene

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 Trigger

Sends a trigger to the specified agent.

Send Trigger

Character Agent Id

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.

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.

Trigger

For information about Trigger Name, see Goals Documentation.

Cancel Response

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

Cancel Response

Character Agent Id

Save Session

Save current state of the session. Returns Inworld Save structure to be passed to Start Session.

Save Session

Send Narration Event

Send a Narrated Action

Send 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.

Send Interaction Feedback