Soul Module

View as Markdown

Soul workflows in the UE plugin mirror the current core/node SDKs: local export builds an FSoul from store state, while remote export/import/list/verify use API-backed thunks.

Core Types

1USTRUCT(BlueprintType)
2struct FSoul {
3 UPROPERTY(BlueprintReadOnly) FString Id;
4 UPROPERTY(BlueprintReadOnly) FString Version;
5 UPROPERTY(BlueprintReadOnly) FString Name;
6 UPROPERTY(BlueprintReadOnly) FString Persona;
7 UPROPERTY(BlueprintReadOnly) TArray<FMemoryItem> Memories;
8 UPROPERTY(BlueprintReadOnly) FAgentState State;
9 UPROPERTY(BlueprintReadOnly) FString Signature;
10};
11
12USTRUCT(BlueprintType)
13struct FSoulVerifyResult {
14 UPROPERTY(BlueprintReadOnly) bool bValid;
15 UPROPERTY(BlueprintReadOnly) FString Reason;
16};

FSoulVerifyResult is the UE-normalized verification result shape used by verifySoulThunk(...).

Local Export

Local export does not call the API. It builds an FSoul from the selected NPC plus the current MemorySlice.

1#include "RuntimeStore.h"
2#include "CLI/CliOperations.h"
3
4auto Store = createSDKStore();
5FSoul LocalSoul = SDKOps::LocalExportSoul(Store, TEXT("npc_1"));

If no NPC id is passed, the active NPC is used.

Remote Export

Remote export uploads a signed Soul payload through the API and Arweave flow.

1#include "RuntimeStore.h"
2#include "CLI/CliOperations.h"
3#include "RuntimeConfig.h"
4
5auto Store = createSDKStore();
6SDKConfig::SetApiConfig(TEXT("https://api.forboc.ai"), ApiKey);
7
8FSoulExportResult Exported = SDKOps::ExportSoul(Store, TEXT("npc_1"));
9UE_LOG(LogTemp, Display, TEXT("%s"), *Exported.TxId);

Remote export requires an API key.

Import, List, And Verify

1#include "RuntimeStore.h"
2#include "CLI/CliOperations.h"
3
4auto Store = createSDKStore();
5FSoul Imported = SDKOps::ImportSoul(Store, TEXT("arweave_tx_id"));
6FImportedNpc ImportedNpc =
7 SDKOps::ImportNpcFromSoul(Store, TEXT("arweave_tx_id"));
8
9TArray<FSoulListItem> Souls = SDKOps::ListSouls(Store, 20);
10FSoulVerifyResult Check = SDKOps::VerifySoul(Store, TEXT("arweave_tx_id"));
  • ImportSoul returns a portable FSoul
  • ImportNpcFromSoul also writes the imported NPC into NPCSlice
  • ListSouls populates SoulSlice::AvailableSouls
  • VerifySoul returns bValid and Reason

Slice State

SoulSlice tracks:

  • remote export status and last export
  • import status and last import
  • available soul list
  • error state

Direct Thunks

For direct store usage, dispatch:

  • rtk::localExportSoulThunk(NpcId)
  • rtk::remoteExportSoulThunk(NpcId)
  • rtk::importSoulFromArweaveThunk(TxId)
  • rtk::importNpcFromSoulThunk(TxId)
  • rtk::getSoulListThunk(Limit)
  • rtk::verifySoulThunk(TxId)