> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.forboc.ai/ue/welcome/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.forboc.ai/_mcp/server. # Unreal Engine SDK The current Unreal Engine plugin mirrors `@forbocai/core` and `@forbocai/node`: a shared store, slice state, selectors, and thunks. The public runtime is centered on `FSDKState`, `createSDKStore()`, `SDKOps`, and `rtk::*Thunk` APIs. > **Note** > > This page reflects the current `sdk-ue-5.7.3` source. It does not describe the older factory-style integration examples that still exist in parts of the historical demo project. ## What Ships * `RuntimeStore.h`: `FSDKState`, `createSDKStore()`, `ConfigureSDKStore()` * `NPC/NPCSlice.h`: NPC entity state, selectors, history, block state * `Protocol/ProtocolThunks.h`: `rtk::processNPC(...)` multi-turn protocol execution * `Memory/MemoryThunks.h`: remote memory and local node-backed memory * `Cortex/CortexThunks.h`: local llama.cpp and remote cortex helpers * `Bridge/BridgeThunks.h`: validation, presets, and rulesets * `Soul/SoulThunks.h`: local export, remote export/import, list, verify * `Ghost/GhostThunks.h`: Ghost session start/status/results/history * `CLI/CliOperations.h`: synchronous `SDKOps::*` wrappers over the same thunks * `RuntimeBlueprintLibrary.h`: Blueprint-callable wrappers for a smaller subset ## Canonical Runtime Pattern Use `createSDKStore()` when you want your own store instance in C++. The synchronous `SDKOps` helpers are thin adapters over store dispatch and match the CLI/test workflow in the plugin. ```cpp #include "RuntimeStore.h" #include "RuntimeConfig.h" #include "CLI/CliOperations.h" auto Store = createSDKStore(); SDKConfig::SetApiConfig(TEXT("https://api.forboc.ai"), ApiKey); FNPCInternalState Npc = SDKOps::CreateNpc( Store, TEXT("A cautious merchant who protects rare inventory.")); SDKOps::InitNodeMemory(Store, TEXT("/tmp/merchant.db")); SDKOps::InitCortex(Store, TEXT("smollm2-135m")); FAgentResponse Response = SDKOps::ProcessNpc(Store, Npc.Id, TEXT("Do you sell keys?")); UE_LOG(LogTemp, Display, TEXT("%s"), *Response.Dialogue); ``` ## Important Protocol Behavior * `SDKOps::ProcessNpc(...)` and `rtk::processNPC(...)` run the API-directed multi-turn protocol, not a single completion call. * `rtk::LocalProtocolRuntime()` is the default runtime used by the synchronous helpers. * If the API asks for memory recall/store and local memory is not initialized, processing fails fast. * If the API asks for inference and local cortex is not initialized, processing fails fast. * A successful finalize step updates NPC state, last action, history, and any returned memory instructions. ## Access Layers ### Direct store/thunks Best when you want parity with `packages/core` and `packages/node`. ```cpp #include "RuntimeStore.h" #include "NPC/NPCSlice.h" #include "Memory/MemoryThunks.h" #include "Cortex/CortexThunks.h" #include "Protocol/ProtocolThunks.h" ``` ### `SDKOps` Best for commandlets, tests, and synchronous tooling. ```cpp #include "CLI/CliOperations.h" ``` ### Blueprints Best for simple wrapper calls such as `CreateNpc`, `ProcessNpc`, `ExportSoul`, and config access. ```cpp #include "RuntimeBlueprintLibrary.h" ``` ## Next Pages #### [Installation](/ue/installation) Install the plugin, wire module dependencies, and configure runtime settings. #### [Architecture](/ue/architecture) See how `FSDKState`, slices, middleware, and thunks fit together. #### [NPC](/ue/npc) Register NPCs, inspect selectors, and run the protocol loop. #### [Memory](/ue/memory) Work with remote NPC memory and local node-backed recall. #### [Bridge](/ue/bridge) Validate actions, load presets, and manage rulesets. #### [Soul](/ue/soul) Export, import, list, and verify portable Souls. > Store/thunk runtime for Unreal Engine 5.7