Documentation index · Browse by responsibility

Look up only what you need

This page is a lookup entry, not a beginner reading list. If you have not produced your first answer yet, begin with the visual quick start.

Complete structure tree

LiteRT-LM Unreal
├── Scenario APIs
│   ├── Quick Start / Single Conversation
│   ├── Conversations / Multiple
│   ├── Conversations / Memory
│   ├── Conversations / Tools
│   ├── Conversations / Actor Component
│   └── MCP / Gateway + Routing + Schema
├── Runtime services
│   ├── Shared strict-GPU model
│   ├── Serial inference queue
│   ├── Runtime status and readiness
│   └── Detailed JSONL diagnostics
├── Model lifecycle
│   ├── Project Settings model path
│   ├── Lazy initialization on first conversation
│   └── Async model download helpers
├── Development surfaces
│   ├── Blueprint nodes and UObject events
│   ├── Unreal C++ UObject API
│   └── Native SDK: C ABI + C++ convenience/RAII
├── Platforms
│   ├── Win64
│   └── Android
└── Demo scenarios
    └── Multi-conversation Werewolf game

Conversation system

Beginner facade

Quick Chat

Create Quick Chat creates one underlying Agent automatically. Use Ask Once or Ask Streaming, bind On Answer, and keep the object alive. Escape to the Agent later with Get Conversation.

Follow the Quick Chat tutorial →

Full scenario object

Agent

Create Conversation (Advanced) or Runtime Create Agent creates an independent conversation with its own prompt, tools, memory, and request state. Use one Agent for each role that must remember independently.

Follow the multi-conversation tutorial →

CapabilityQuick ChatAgent
CreationSystem prompt or configured AgentFull Agent config
Final-only answerAsk OnceAsk and ignore chunks
StreamingAsk StreamingOn Text Chunk
Advanced memory/toolsVia Get ConversationDirectly available
Recommended lifetimeOne per chat surfaceOne per independent role

Memory, correction, and tools

Memory API

An Agent stores canonical JSON message memory. It supports append, replace, delete, clear, import/export, message count, named save/load snapshots, and Reject Last Response. Memory changes are rejected while mutation would conflict with an outstanding request.

Tool API

Declare OpenAI-compatible tools in ToolDeclarationsJson. The model returns structured Tool Calls in the final result; game code validates and executes them. Use Submit Tool Result when the model must continue after seeing the result, or Append Tool Result to Memory when game code consumes the action immediately.

Small helpers

Try Get Tool String Argument and Try Get Tool Integer Argument read validated fields from a tool call’s Arguments JSON. Precise and reasoned decision option factories reduce repeated sampling setup.

MCP Gateway

Use Create MCP Gateway when the model-visible tools need external MCP routing. The Gateway owns one underlying Agent, emits On Tool Call, and waits for your transport/game subsystem to call Submit MCP Result.

ChangeAPIConversation impact
Route a tool to another serverSet Tool Route, Set Default Server RouteHot routing change; model history/KV is preserved.
Remove a routeRemove Tool RouteRouting registry changes only.
Change model-visible tool schemaRebuild Tool SchemaRecreates the native conversation and replays canonical history; rejected while calls are pending.
Transport cancelled outstanding workDiscard Pending Tool CallsForgets dispatches; it does not cancel a remote server for you.

Actor Component workflow

Add LiteRT-LM Component when the conversation naturally belongs to an Actor. Configure AgentConfig in Details. BeginPlay creates one Agent, component events forward Agent events, and EndPlay retires the conversation.

Use it for: talkative NPC Actors, companions, interactable terminals, or any reusable Actor class that should carry its own prompt and memory. Use a manager + Agent array when roles are data-driven and not represented by Actors.

Runtime, project settings, and diagnostics

ULiteRtLmSubsystem is an Engine Subsystem. It owns the process-wide model, queue, all active Agents, and runtime status. Blueprint can obtain it with Get LiteRT-LM Runtime.

AreaControls / readsWhen users care
ModelModel Path, native conversation options, optional preloadBefore first run and during packaging
ContextMax context tokensWhen memory/context size must be bounded
SamplingTemperature, Top P, Top K, random/fixed seedDefault behavior for normal asks
ObservabilityMetrics, runtime state, readiness, diagnostics pathLoading UI and performance/error investigation
Detailed diagnosticsProject default or runtime enable/disableTemporarily inspect complete-context JSONL; disable when not needed

Model delivery

The model must exist at the resolved runtime path. Choose one product strategy:

  • Ship the model with your product: include it in a staged non-asset directory and configure a path that resolves in the package.
  • Download on first run: use the async Download LiteRT-LM Model node (or the Gemma 4 E2B convenience node), verify hash when provided, then persist the resulting path.
  • Developer-local model: useful for Editor iteration, but do not assume the same absolute path exists on another machine or Android device.

Shipping: Win64 and Android

The plugin declares Win64 and Android runtime support. A successful Editor test is not a target-device test. Before release:

  1. Confirm the platform binaries and model are present in the staged build.
  2. Log the final model path and runtime status.
  3. Run one minimal Quick Chat request before opening a large gameplay scene.
  4. On Android, capture Logcat and the plugin diagnostics path for startup crashes; do not classify a crash as “out of VRAM” without the device log.
  5. Test first-load memory usage, cancellation, background/resume, and a second request in the same conversation.

Open the existing shipping reference →

Public C++ header directory

HeaderPrimary responsibility
LiteRtLmUnrealApi.hShared enums, structs, request/result types, delegates, config.
LiteRtLmBlueprintLibrary.hScenario factories, runtime lookup, bulk conversation and JSON helpers.
LiteRtLmQuickChat.hBeginner single-conversation facade.
LiteRtLmAgent.hFull conversation, memory, tools, state, events, lifecycle.
LiteRtLmSubsystem.hShared engine runtime, C++ CreateAgent overloads, status, diagnostics.
LiteRtLmMcpGateway.hMCP conversation, routes, pending calls, schema rebuild.
LiteRtLmComponent.hActor-owned Agent convenience component.
LiteRtLmModelDownloader.hAsync model download Blueprint actions.
LiteRtLmProjectSettings.hConfig-backed project defaults.
LiteRtLmNativeSdk.hStable native C ABI plus C++ convenience/RAII surface.

Open the C++ integration guide →

Reference library

Use these after a scenario is working:

Reference pages describe implementation layers and historical surfaces. For new Blueprint work, the scenario tutorials and the current public headers are authoritative for choosing entry nodes.