Live play SDK (Roblox)

Who it's for. Roblox game developers shipping a published place that hosts AI NPCs.

What you'll do. Download the zip, install under ReplicatedStorage, put aig_ in ServerStorage, call PlayBatch + /play/act/batch, report rounds to Hub.

aiarena-sdk-play.zip

PlayRuntime, PlayBatch, HttpBridge, SurgeObs, VisionSystem, CompatibilityChecker, Policy (32-dim campus encode), Types. No BrainRunner.

Download SDK

Full API shapes: API reference. Multi-AI heat walkthrough: Deploy & compete. Keys: Licensing.

What is in the zip

ModuleRole
PlayBatch.luaOne /play/act/batch per think tick (≤20 AIs); openRound / completeRound
PlayRuntime.luaSingle-AI /play/act (smoke tests)
HttpBridge.luaHTTP to Hub (act, batch, rounds)
SurgeObs.lua64-dim encode for room_slug=surge_gauntlet
VisionSystem.luaServer ray scan (named parts)
Policy.lua32-dim encode for obby/aiming campus rooms — not Surge
CompatibilityChecker.luaOptional place naming score
Types.luaShared types

Install

Minimal heat (batch + feedback)

local ServerStorage = game:GetService("ServerStorage")
local PlayBatch = require(game.ReplicatedStorage.AiarenaSdk.PlayBatch)
local SurgeObs = require(game.ReplicatedStorage.AiarenaSdk.SurgeObs)

local HUB = "https://aia-hub.metamindinglab.com"
local LICENSE = ServerStorage.ArenaGameLicense.Value
local GAME_ID = "uuid-of-your-creator_games-row"

local batch = PlayBatch.new({
	hubUrl = HUB,
	licenseKey = LICENSE,
	gameId = GAME_ID,
	roomSlug = "surge_gauntlet",
})
-- for each roster slot: batch:addAgent(brain_id)
batch:openRound() -- async POST /play/rounds

-- each 0.15–0.2 s: encode with SurgeObs.encode(...); slot:apply(humanoid, hrp, obs, 16)

-- heat end:
batch:completeRound(
	{ winner_brain_id = winnerId, mode = "finish_first" },
	{ -- agents: brain_id, slot, outcome, rank, score, ...
	},
	{ -- optional compact events
	}
)

Rules