Skip to content

Class UTryllSubsystem

ClassList > UTryllSubsystem

Embedding ClassifyIntent — event_type="intent_classified". Subscribing swallows OnNodeEvent. More...

  • #include <TryllSubsystem.h>

Inherits the following classes: UGameInstanceSubsystem, FTickableGameObject

Classes

Type Name
struct FEmbeddedStorageInfo

Public Types

Type Name
typedef void(FEmbeddedStorageInfo, FTryllError) FTryllOnEmbeddedStorageCreated
typedef void(FTryllError) FTryllOnEmbeddedStorageDestroyed
typedef void(FTryllError) FTryllOnStringStorage

Public Attributes

Type Name
FOnTryllAgentDestroyed OnAgentDestroyed
FOnTryllConnectionChanged OnConnectionChanged
FOnTryllCreateEmbeddedStringStorage OnCreateEmbeddedStringStorageComplete
FOnTryllCreateSession OnCreateSessionComplete
FOnTryllCreateStringStorage OnCreateStringStorageComplete
FOnTryllDestroyEmbeddedStringStorage OnDestroyEmbeddedStringStorageComplete
FOnTryllDestroyStringStorage OnDestroyStringStorageComplete
FOnTryllDownloadComplete OnDownloadComplete
FOnTryllDownloadProgress OnDownloadProgress
FOnTryllEnsureMutableKb OnEnsureMutableKbComplete
FOnTryllEnumerateMutableKbs OnEnumerateMutableKbsComplete
FOnTryllError OnError
FOnTryllGetMemoryConsumption OnGetMemoryConsumptionComplete
FOnTryllIntentClassified OnIntentClassified
FOnTryllIntentLlmClassified OnIntentLlmClassified
FOnTryllListModels OnListModelsComplete
FOnTryllLoadGameMemory OnLoadGameMemoryComplete
FOnTryllLoadModel OnLoadModelComplete
FOnTryllLocalizedTextApplied OnLocalizedTextApplied
FOnTryllLocalizedTextFailed OnLocalizedTextFailed
FOnTryllNodeEvent OnNodeEvent
FOnTryllPaused OnPaused
FOnTryllSaveGameMemory OnSaveGameMemoryComplete
FOnTryllSetSessionLocale OnSetSessionLocaleComplete
FOnTryllToolCall OnToolCall
FOnTryllToolCallDetailed OnToolCallDetailed
FOnTryllToolCallWithId OnToolCallWithId
FOnTryllUnloadModel OnUnloadModelComplete
FString ServerBuildConfig
FString ServerExePath
FString ServerHost = TEXT("127.0.0.1")
int32 ServerIdleTimeoutSeconds = 0
FString ServerMode
int32 ServerPort = 9100
FString ServerRunId
FString ServerVersion
bool bServerManaged = false

Public Functions

Type Name
void Connect ()
void CreateSession (FString GameName=TEXT(""), FString Locale=TEXT(""), bool bUseProjectLocaleWhenEmpty=true)
void CreateSessionFromSettings ()
virtual void Deinitialize () override
void Disconnect ()
TSharedPtr< FTryllAgent > FindAgent (uint64 AgentId) const
FTryllConnection * GetLiveConnection () const
int64 GetSessionId () const
virtual TStatId GetStatId () override const
virtual ETickableTickType GetTickableTickType () override const
virtual void Initialize (FSubsystemCollectionBase & Collection) override
bool IsConnected () const
bool IsSessionReady () const
virtual bool IsTickable () override const
virtual bool IsTickableInEditor () override const
virtual bool IsTickableWhenPaused () override const
void NotifyTextLocaleChanged ()
TSharedPtr< FTryllConnection > PinLiveConnection () const
void RegisterAgent (std::uint64_t AgentId, TWeakPtr< FTryllAgent > Agent)
void RegisterVoiceInput (std::uint64_t VoiceInputId, TWeakPtr< FTryllVoiceInput > Voice)
void RelaunchServerForUserCatalog ()
void RequestCreateAgent (const FTryllGraphDescription & Graph, TFunction< FTryllOnAgentCreated > OnComplete, bool bEnableDiagnostics=false, bool bMaintainDialogueHistory=true, const TArray< FTryllVariableDecl > & Variables={}, ETryllKvCacheInitialization KvCacheInitialization=ETryllKvCacheInitialization::AllocateOnly, ETryllWorkload Workload=ETryllWorkload::Interactive, const TOptional< FTryllVoiceProfileData > & Voice={})
void RequestCreateEmbeddedStringStorage (const FString & Name, const FString & ConfigPath, const FString & EmbeddingModel=FString{}, TFunction< FTryllOnEmbeddedStorageCreated > OnComplete=nullptr)
void RequestCreateEmbeddedStringStorageFromStrings (const FString & Name, const TArray< FString > & Strings, const FString & EmbeddingModel, TFunction< FTryllOnEmbeddedStorageCreated > OnComplete=nullptr)
void RequestCreateStringStorage (const FString & Name, const TArray< FString > & Strings, TFunction< FTryllOnStringStorage > OnComplete=nullptr)
void RequestCreateStringStorageFromFile (const FString & Name, const FString & FilePath, uint8 Kind=0, TFunction< FTryllOnStringStorage > OnComplete=nullptr)
void RequestCreateStringStorageKeyed (const FString & Name, const TArray< FString > & Keys, const TArray< FString > & Values, uint8 Kind=1, TFunction< FTryllOnStringStorage > OnComplete=nullptr)
void RequestCreateVoiceInput (const FTryllVoiceInputConfig & Config, TFunction< FTryllOnVoiceInputCreated > OnComplete)
void RequestDestroyAgent (TSharedPtr< FTryllAgent > Agent)
void RequestDestroyEmbeddedStringStorage (const FString & Name, TFunction< FTryllOnEmbeddedStorageDestroyed > OnComplete=nullptr)
void RequestDestroyStringStorage (const FString & Name, TFunction< FTryllOnStringStorage > OnComplete=nullptr)
void RequestDestroyVoiceInput (TSharedPtr< FTryllVoiceInput > Voice)
void RequestDownloadModel (const FString & ModelName)
void RequestEnsureMutableKb (const FString & Name, const FString & Schema, TFunction< FTryllOnEnsureMutableKb > OnComplete)
void RequestEnumerateMutableKbs (TFunction< FTryllOnEnumerateMutableKbs > OnComplete)
void RequestGetMemoryConsumption (TFunction< FTryllOnGetMemoryConsumption > OnComplete)
void RequestListModels (TFunction< FTryllOnListModels > OnComplete)
void RequestLoadGameMemory (const FString & Path, ETryllMutableKbEmbedTiming EmbedTiming, ETryllMutableKbCompatibility Compatibility, TFunction< FTryllOnLoadGameMemory > OnComplete)
void RequestLoadModel (const FString & ModelName, ETryllMemoryPlacement Placement=ETryllMemoryPlacement::Auto, bool bIsOverride=false)
void RequestSaveGameMemory (const FString & Path, const FString & SaveId, TFunction< FTryllOnSaveGameMemory > OnComplete)
void RequestUnloadModel (const FString & ModelName)
void SetInferenceThrottle (float Level)
void SetSessionLocale (FString Locale)
TArray< FTryllRegisteredAgentSnapshot > SnapshotRegisteredAgents () const
virtual void Tick (float DeltaTime) override
void UnregisterAgent (std::uint64_t AgentId)

Public Static Functions

Type Name
TArray< EServerBuildVariant > GetAvailableServerVariants ()
FString GetServerRootDir ()
FString ResolveServerExePath (EServerBuildVariant Preferred)

Detailed Description

Detailed tool-call event carrying the full owning FTryllToolCall value object (node name and disposition included) alongside the agent id. Fired in addition to — never instead of — OnToolCall / OnToolCallWithId, so a manual handler can tell whether to send results for await_result or plain-resume for other pausing dispositions. ClassifyIntentLLM — event_type="intent_llm_classified". Subscribing swallows OnNodeEvent. Pause typed event — fired for NodeEvent event_type="paused" (the executor paused the turn between nodes; ChangeAgentParam is allowed while paused). Generic NodeEvent fallback — fired for any event_type without a typed delegate (or when the typed delegate has no subscribers). KvPairs preserves wire order. Game-instance subsystem: one TCP session to the Tryll server. Manages the socket connection on a background thread (FTryllConnection) and drains the event queue on Tick(), dispatching to registered agents and delegates.

Default (zero-wiring) path — driven by UTryllRuntimeSettings: * bAutoLaunchServer → spawns the bundled tryll_server.exe on Initialize. * bAutoConnect → Connect() on Initialize (connect-retry covers server startup). * bAutoCreateSession → on Connected, CreateSessionFromSettings() sends the game name, locale and the manifest-derived engine hint. UTryllAgentComponent / UTryllVoiceInputComponent then create themselves once IsSessionReady() — they queue until OnCreateSessionComplete if they spawn earlier. So the common case is: download models in the Model Manager, add the components, press play. There is no engine to pick: each model's catalog entry names it.

Manual path — turn those flags off to drive the session yourself: * Connect() — open TCP session to ServerHost:ServerPort. * OnConnectionChanged(bConnected=true) — bind to continue; or poll IsConnected(). * CreateSession(GameName, Locale) — configure explicitly (overrides settings). Completion arrives on OnCreateSessionComplete; IsSessionReady() is true thereafter. * CreateAgent — attach a UTryllAgentComponent (auto-creates once the session is ready) or call RequestCreateAgent(). * SendMessage(Text) — drive one turn; chunks on OnAnswerText, the turn ends with OnTurnComplete(Status). * RequestDestroyAgent / Disconnect — tear down when done.

All delegates fire on the game thread from Tick(); it is safe to touch UObjects and UI directly from callbacks.

Public Types Documentation

typedef FTryllOnEmbeddedStorageCreated

using UTryllSubsystem::FTryllOnEmbeddedStorageCreated = void(FEmbeddedStorageInfo, FTryllError);

typedef FTryllOnEmbeddedStorageDestroyed

using UTryllSubsystem::FTryllOnEmbeddedStorageDestroyed = void(FTryllError);

typedef FTryllOnStringStorage

using UTryllSubsystem::FTryllOnStringStorage = void(FTryllError);

Public Attributes Documentation

variable OnAgentDestroyed

FOnTryllAgentDestroyed UTryllSubsystem::OnAgentDestroyed;

variable OnConnectionChanged

FOnTryllConnectionChanged UTryllSubsystem::OnConnectionChanged;

variable OnCreateEmbeddedStringStorageComplete

FOnTryllCreateEmbeddedStringStorage UTryllSubsystem::OnCreateEmbeddedStringStorageComplete;

variable OnCreateSessionComplete

FOnTryllCreateSession UTryllSubsystem::OnCreateSessionComplete;

variable OnCreateStringStorageComplete

FOnTryllCreateStringStorage UTryllSubsystem::OnCreateStringStorageComplete;

variable OnDestroyEmbeddedStringStorageComplete

FOnTryllDestroyEmbeddedStringStorage UTryllSubsystem::OnDestroyEmbeddedStringStorageComplete;

variable OnDestroyStringStorageComplete

FOnTryllDestroyStringStorage UTryllSubsystem::OnDestroyStringStorageComplete;

variable OnDownloadComplete

FOnTryllDownloadComplete UTryllSubsystem::OnDownloadComplete;

variable OnDownloadProgress

FOnTryllDownloadProgress UTryllSubsystem::OnDownloadProgress;

variable OnEnsureMutableKbComplete

FOnTryllEnsureMutableKb UTryllSubsystem::OnEnsureMutableKbComplete;

variable OnEnumerateMutableKbsComplete

FOnTryllEnumerateMutableKbs UTryllSubsystem::OnEnumerateMutableKbsComplete;

variable OnError

FOnTryllError UTryllSubsystem::OnError;

variable OnGetMemoryConsumptionComplete

FOnTryllGetMemoryConsumption UTryllSubsystem::OnGetMemoryConsumptionComplete;

variable OnIntentClassified

FOnTryllIntentClassified UTryllSubsystem::OnIntentClassified;

variable OnIntentLlmClassified

FOnTryllIntentLlmClassified UTryllSubsystem::OnIntentLlmClassified;

variable OnListModelsComplete

FOnTryllListModels UTryllSubsystem::OnListModelsComplete;

variable OnLoadGameMemoryComplete

FOnTryllLoadGameMemory UTryllSubsystem::OnLoadGameMemoryComplete;

variable OnLoadModelComplete

FOnTryllLoadModel UTryllSubsystem::OnLoadModelComplete;

variable OnLocalizedTextApplied

FOnTryllLocalizedTextApplied UTryllSubsystem::OnLocalizedTextApplied;

A language change reached a live agent: the server acknowledged every Localized prompt that changed, or none needed to change. Wait for this before work that must see the new prompts, such as a KV prefill. An AgentBusy reply delays it until the running turn ends.


variable OnLocalizedTextFailed

FOnTryllLocalizedTextFailed UTryllSubsystem::OnLocalizedTextFailed;

A language change could not update a live agent's Localized prompts. Fires once per agent and language change. If a Text ID is empty or missing in the new language, nothing was sent, so the agent keeps every prompt in the previous language. If the server rejected an update, the error is the first rejection, and nodes the server accepted already run the new language. Voice and {{language}} follow the new language either way. Fix the table, or recreate the agent.


variable OnNodeEvent

FOnTryllNodeEvent UTryllSubsystem::OnNodeEvent;

Broadcast for any NodeEvent whose event_type has no typed delegate (or whose typed delegate has no subscribers). Untyped fallback.


variable OnPaused

FOnTryllPaused UTryllSubsystem::OnPaused;

Broadcast when the executor pauses a turn between nodes (Pause node, or pausing ToolCall dispositions).


variable OnSaveGameMemoryComplete

FOnTryllSaveGameMemory UTryllSubsystem::OnSaveGameMemoryComplete;

variable OnSetSessionLocaleComplete

FOnTryllSetSessionLocale UTryllSubsystem::OnSetSessionLocaleComplete;

Fired when SetSessionLocale completes. Locale is the requested tag (empty when clearing); bSuccess is false only for a malformed tag, in which case the previous locale is untouched.


variable OnToolCall

FOnTryllToolCall UTryllSubsystem::OnToolCall;

Broadcast when a ToolCallNode emits a tool_call NodeEvent (notifying dispositions).


variable OnToolCallDetailed

FOnTryllToolCallDetailed UTryllSubsystem::OnToolCallDetailed;

Detailed tool-call event carrying the full owning FTryllToolCall (node + disposition).


variable OnToolCallWithId

FOnTryllToolCallWithId UTryllSubsystem::OnToolCallWithId;

Call-ID-aware tool-call event used to correlate Resume tool results.


variable OnUnloadModelComplete

FOnTryllUnloadModel UTryllSubsystem::OnUnloadModelComplete;

variable ServerBuildConfig

FString UTryllSubsystem::ServerBuildConfig;

Server build configuration ("Debug" | "Release" | "ClientDev" | "ClientProd").


variable ServerExePath

FString UTryllSubsystem::ServerExePath;

Canonical path of the connected server executable (empty if unknown).


variable ServerHost

FString UTryllSubsystem::ServerHost;

Host name or IP address of the Tryll server. Defaults to localhost.


variable ServerIdleTimeoutSeconds

int32 UTryllSubsystem::ServerIdleTimeoutSeconds;

Server idle-shutdown grace period in seconds (0 when standalone).


variable ServerMode

FString UTryllSubsystem::ServerMode;

Deployment mode ("tryll-dev" | "client-dev" | "client-prod").


variable ServerPort

int32 UTryllSubsystem::ServerPort;

TCP port the Tryll server is listening on (default: 9100).


variable ServerRunId

FString UTryllSubsystem::ServerRunId;

Per-process server run id (UUID).


variable ServerVersion

FString UTryllSubsystem::ServerVersion;

Server version string.


variable bServerManaged

bool UTryllSubsystem::bServerManaged;

True when the server runs in managed (idle-self-exit) mode.


Public Functions Documentation

function Connect

void UTryllSubsystem::Connect () 

Open a TCP session to ServerHost:ServerPort. Asynchronous — completion is reported via OnConnectionChanged(bConnected=true). Errors fire OnError. Calling Connect() while already connected is a no-op.


function CreateSession

void UTryllSubsystem::CreateSession (
    FString GameName=TEXT(""),
    FString Locale=TEXT(""),
    bool bUseProjectLocaleWhenEmpty=true
) 

Send CreateSessionRequest. Must be called after Connected and before CreateAgent. Result is delivered via OnCreateSessionComplete delegate.

Parameters:

  • GameName Integration identifier for telemetry grouping (e.g. "tryll-roleplay-demo"). Leave empty to omit; the server defaults to the project name, then "unknown", when telemetry is on. Pass UTryllRuntimeSettings::GameName to drive this from the project settings asset.
  • Locale Session language as a BCP-47 tag (e.g. "de", "pt-BR"). See UTryllRuntimeSettings::Locale for everything it drives. Empty uses the project setting unless bUseProjectLocaleWhenEmpty is false; a malformed tag is rejected with InvalidLocale (2004).
  • bUseProjectLocaleWhenEmpty When true, an empty Locale adopts the text provider's current language, then UTryllRuntimeSettings::Locale. Set false with an empty Locale to explicitly disable session language. The four engine parameters this took through protocol v12 are gone. The engine set is derived from the models registered in UTryllModelManifest — each model's catalog entry already states which engine runs it, so there is nothing for a caller to choose, and nothing that can drift out of step with the models the project references.

Storage root is process-wide (set when the server launches via storage-root), not per session — protocol v24 removed CreateSessionRequest.storage_data_folder.


function CreateSessionFromSettings

void UTryllSubsystem::CreateSessionFromSettings () 

Configure the session from project settings (UTryllRuntimeSettings): game name, locale, and the engine warm-up hint derived from UTryllModelManifest. Storage root is process-wide (set at server launch).

This is the "use settings" path. It runs automatically once connected when UTryllRuntimeSettings::bAutoCreateSession is true; call it yourself if you connected with that flag disabled and still want the settings-driven config. To override settings, call CreateSession() with explicit parameters instead.


function Deinitialize

virtual void UTryllSubsystem::Deinitialize () override

function Disconnect

void UTryllSubsystem::Disconnect () 

Close the active session. OnConnectionChanged(bConnected=false) fires once the socket is down.


function FindAgent

TSharedPtr< FTryllAgent > UTryllSubsystem::FindAgent (
    uint64 AgentId
) const

function GetLiveConnection

FTryllConnection * UTryllSubsystem::GetLiveConnection () const

function GetSessionId

int64 UTryllSubsystem::GetSessionId () const

Server-assigned session id, or 0 when not connected.


function GetStatId

virtual TStatId UTryllSubsystem::GetStatId () override const

function GetTickableTickType

virtual ETickableTickType UTryllSubsystem::GetTickableTickType () override const

function Initialize

virtual void UTryllSubsystem::Initialize (
    FSubsystemCollectionBase & Collection
) override

function IsConnected

bool UTryllSubsystem::IsConnected () const

True while the background connection is in the Connected state.


function IsSessionReady

bool UTryllSubsystem::IsSessionReady () const

True once the current connection has a successfully configured session (CreateSession completed OK). Agent / VoiceInput creation must wait for this — creating against an unconfigured session is rejected by the server.


function IsTickable

virtual bool UTryllSubsystem::IsTickable () override const

function IsTickableInEditor

inline virtual bool UTryllSubsystem::IsTickableInEditor () override const

function IsTickableWhenPaused

inline virtual bool UTryllSubsystem::IsTickableWhenPaused () override const

function NotifyTextLocaleChanged

void UTryllSubsystem::NotifyTextLocaleChanged () 

Tell Tryll the text provider's language changed (custom providers call this). Sends SetSessionLocale unless CreateSession was given an explicit locale, then re-resolves Localized prompts on live agents. Also reaches the editor session.


function PinLiveConnection

TSharedPtr< FTryllConnection > UTryllSubsystem::PinLiveConnection () const

function RegisterAgent

void UTryllSubsystem::RegisterAgent (
    std::uint64_t AgentId,
    TWeakPtr< FTryllAgent > Agent
) 

function RegisterVoiceInput

void UTryllSubsystem::RegisterVoiceInput (
    std::uint64_t VoiceInputId,
    TWeakPtr< FTryllVoiceInput > Voice
) 

function RelaunchServerForUserCatalog

void UTryllSubsystem::RelaunchServerForUserCatalog () 

Restart the auto-launched packaged server after the custom catalog path changes. No-op in the editor (the shared launcher owns that process) and when no server is running.


function RequestCreateAgent

void UTryllSubsystem::RequestCreateAgent (
    const FTryllGraphDescription & Graph,
    TFunction< FTryllOnAgentCreated > OnComplete,
    bool bEnableDiagnostics=false,
    bool bMaintainDialogueHistory=true,
    const TArray< FTryllVariableDecl > & Variables={},
    ETryllKvCacheInitialization KvCacheInitialization=ETryllKvCacheInitialization::AllocateOnly,
    ETryllWorkload Workload=ETryllWorkload::Interactive,
    const TOptional< FTryllVoiceProfileData > & Voice={}
) 

Begin create-agent; completion is delivered via OnComplete on the game thread.

Parameters:

  • Graph Workflow graph description to send to the server.
  • bEnableDiagnostics When true the server populates TurnComplete.debug_info.
  • bMaintainDialogueHistory When true (default) the agent keeps its full dialogue history; when false the history is discarded after each turn (stateless agent — for classification/routing/tool-picking agents).
  • Voice The agent's voice (protocol v27). Required when any node speaks (FTryllGraphDescription::UsesTts): the server fails creation with AgentVoiceRequired (3025) without one. Unset for a silent agent.

function RequestCreateEmbeddedStringStorage

void UTryllSubsystem::RequestCreateEmbeddedStringStorage (
    const FString & Name,
    const FString & ConfigPath,
    const FString & EmbeddingModel=FString{},
    TFunction< FTryllOnEmbeddedStorageCreated > OnComplete=nullptr
) 

Create an EmbeddedStringStorage from a server-side *.fig.json. Path A: config file + optional embeddingModel override.


function RequestCreateEmbeddedStringStorageFromStrings

void UTryllSubsystem::RequestCreateEmbeddedStringStorageFromStrings (
    const FString & Name,
    const TArray< FString > & Strings,
    const FString & EmbeddingModel,
    TFunction< FTryllOnEmbeddedStorageCreated > OnComplete=nullptr
) 

Create an EmbeddedStringStorage from inline strings. Path B: requires EmbeddingModel.


function RequestCreateStringStorage

void UTryllSubsystem::RequestCreateStringStorage (
    const FString & Name,
    const TArray< FString > & Strings,
    TFunction< FTryllOnStringStorage > OnComplete=nullptr
) 

Create a named StringStorage on the server from an inline string array. Completion is broadcast via OnCreateStringStorageComplete.


function RequestCreateStringStorageFromFile

void UTryllSubsystem::RequestCreateStringStorageFromFile (
    const FString & Name,
    const FString & FilePath,
    uint8 Kind=0,
    TFunction< FTryllOnStringStorage > OnComplete=nullptr
) 

Create a named StringStorage on the server from a server-side file path.

Parameters:

  • Kind 0=List (default), 1=Map, 2=Multimap. When Kind is Map or Multimap the file must be a JSON array of {id, text} objects. Completion is broadcast via OnCreateStringStorageComplete.

function RequestCreateStringStorageKeyed

void UTryllSubsystem::RequestCreateStringStorageKeyed (
    const FString & Name,
    const TArray< FString > & Keys,
    const TArray< FString > & Values,
    uint8 Kind=1,
    TFunction< FTryllOnStringStorage > OnComplete=nullptr
) 

Create a named StringStorage on the server from inline key/value pairs.

Parameters:

  • Kind 1=Map (default; keys must be unique), 2=Multimap (duplicate keys allowed). Completion is broadcast via OnCreateStringStorageComplete.

function RequestCreateVoiceInput

void UTryllSubsystem::RequestCreateVoiceInput (
    const FTryllVoiceInputConfig & Config,
    TFunction< FTryllOnVoiceInputCreated > OnComplete
) 

Create a server-side VoiceInput (STT) handle. Completion is delivered via OnComplete on the game thread with a TSharedPtr<FTryllVoiceInput> on success.


function RequestDestroyAgent

void UTryllSubsystem::RequestDestroyAgent (
    TSharedPtr< FTryllAgent > Agent
) 

Queue destroy for the given agent.


function RequestDestroyEmbeddedStringStorage

void UTryllSubsystem::RequestDestroyEmbeddedStringStorage (
    const FString & Name,
    TFunction< FTryllOnEmbeddedStorageDestroyed > OnComplete=nullptr
) 

Destroy a named EmbeddedStringStorage on the server. Nodes that already hold the storage are unaffected.


function RequestDestroyStringStorage

void UTryllSubsystem::RequestDestroyStringStorage (
    const FString & Name,
    TFunction< FTryllOnStringStorage > OnComplete=nullptr
) 

Destroy a named StringStorage on the server. Nodes that already hold the storage are unaffected.


function RequestDestroyVoiceInput

void UTryllSubsystem::RequestDestroyVoiceInput (
    TSharedPtr< FTryllVoiceInput > Voice
) 

Queue destroy for the given VoiceInput handle.


function RequestDownloadModel

void UTryllSubsystem::RequestDownloadModel (
    const FString & ModelName
) 

Start downloading a model. Progress is broadcast via OnDownloadProgress (name, bytesDownloaded, totalBytes, percent 0–100); completion via OnDownloadComplete (name, bSuccess, errorMessage — empty on success).


function RequestEnsureMutableKb

void UTryllSubsystem::RequestEnsureMutableKb (
    const FString & Name,
    const FString & Schema,
    TFunction< FTryllOnEnsureMutableKb > OnComplete
) 

Experimental: get-or-create a named session mutable knowledge base.


function RequestEnumerateMutableKbs

void UTryllSubsystem::RequestEnumerateMutableKbs (
    TFunction< FTryllOnEnumerateMutableKbs > OnComplete
) 

Experimental: list session mutable knowledge bases.


function RequestGetMemoryConsumption

void UTryllSubsystem::RequestGetMemoryConsumption (
    TFunction< FTryllOnGetMemoryConsumption > OnComplete
) 

Pull a server-wide RAM/VRAM snapshot. Session-scoped (rejected with SessionNotReady before CreateSession) but the numbers cover every session on this process. Never returns AgentBusy. Not a UFUNCTION — Blueprint binds OnGetMemoryConsumptionComplete after a C++ call.


function RequestListModels

void UTryllSubsystem::RequestListModels (
    TFunction< FTryllOnListModels > OnComplete
) 

List models available for the session's inference engine.


function RequestLoadGameMemory

void UTryllSubsystem::RequestLoadGameMemory (
    const FString & Path,
    ETryllMutableKbEmbedTiming EmbedTiming,
    ETryllMutableKbCompatibility Compatibility,
    TFunction< FTryllOnLoadGameMemory > OnComplete
) 

Experimental: load a TMKB session snapshot. EmbedTiming must be Now or Lazy.


function RequestLoadModel

void UTryllSubsystem::RequestLoadModel (
    const FString & ModelName,
    ETryllMemoryPlacement Placement=ETryllMemoryPlacement::Auto,
    bool bIsOverride=false
) 

Pin a model into memory on the server (LoadAndPin). Completion is broadcast via OnLoadModelComplete. Placement applies to this load only and overrides any per-model hint the session declared; bIsOverride = false (the default) means "no opinion".


function RequestSaveGameMemory

void UTryllSubsystem::RequestSaveGameMemory (
    const FString & Path,
    const FString & SaveId,
    TFunction< FTryllOnSaveGameMemory > OnComplete
) 

Experimental: write every store in this session to a TMKB path.


function RequestUnloadModel

void UTryllSubsystem::RequestUnloadModel (
    const FString & ModelName
) 

Demote a pinned model to on-demand and evict it if no contexts hold it. Completion is broadcast via OnUnloadModelComplete.


function SetInferenceThrottle

void UTryllSubsystem::SetInferenceThrottle (
    float Level
) 

Report how hard the server should yield the GPU back to the game (the manual inference throttle knob). Fire-and-forget: no response, no error surfaced locally. Never sent automatically — a session that never calls this runs unthrottled.

Parameters:

  • Level 0 = full speed (default), 1 = maximum yielding. Clamped server-side; out-of-range values do not fail here.

function SetSessionLocale

void UTryllSubsystem::SetSessionLocale (
    FString Locale
) 

Change the session language without tearing the session down. Pass an empty Locale to clear it.

Applies to every agent, existing and future, from its next turn: TTS language and the locale template keys are read per turn, not captured at agent creation. A new voice input picks up the new STT language hint; one already open keeps its recognizer. Storage paths re-resolve on the next load, but content already bound to a node (a Retrieve KB, canned lines) does NOT swap - those params are structural, so switching authored content still means recreating agents.

Not turn-atomic: a turn already running may render its prompt under the old locale and synthesize under the new one.

Completion is broadcast via OnSetSessionLocaleComplete.


function SnapshotRegisteredAgents

TArray< FTryllRegisteredAgentSnapshot > UTryllSubsystem::SnapshotRegisteredAgents () const

function Tick

virtual void UTryllSubsystem::Tick (
    float DeltaTime
) override

function UnregisterAgent

void UTryllSubsystem::UnregisterAgent (
    std::uint64_t AgentId
) 

Public Static Functions Documentation

function GetAvailableServerVariants

static TArray< EServerBuildVariant > UTryllSubsystem::GetAvailableServerVariants () 

Variant subfolders (Default/Release) whose target resolves on disk.


function GetServerRootDir

static FString UTryllSubsystem::GetServerRootDir () 

<PluginBaseDir>/Binaries/ThirdParty/TryllServer; empty if the plugin is not found.


function ResolveServerExePath

static FString UTryllSubsystem::ResolveServerExePath (
    EServerBuildVariant Preferred
) 

Server exe to launch for Preferred; see .cpp for the editor/packaged resolution.


Friends Documentation

friend FTryllConnectionEpochSpec

class UTryllSubsystem::FTryllConnectionEpochSpec (
    FTryllConnectionEpochSpec
) 


The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllSubsystem.h