Log inGet started

agentSessions

The agentSessions namespace — the engine's Luau API reference for agentSessions.

The agentSessions namespace — 3 functions.

agentSessions/forget

agentSessions.forget(worldGuid, slot)

Drop this machine's record for (world, dock slot), so the next launch of that slot starts a fresh conversation instead of resuming. Succeeds whether or not a record was there. The claude transcript itself stays on disk. Editor profile only.

Parameters

  • worldGuid string — Guid of the world the agent belongs to
  • slot number — Agent dock slot, a positive integer

agentSessions/get

agentSessions.get(worldGuid, slot) -> {sessionId, name, workspace, lastSpawn} | nil

The claude session this machine recorded for (world, dock slot), or nil when there is none. Only meaningful on the machine holding the transcript; another computer has its own conversations for the same world. Editor profile only.

Parameters

  • worldGuid string — Guid of the world the agent belongs to
  • slot number — Agent dock slot, a positive integer

Returns { sessionId: string, name: string, workspace: string, lastSpawn: string }? — The recorded session, or nil

agentSessions/put

agentSessions.put(worldGuid, slot, {sessionId, name, workspace})

Record the claude session now occupying (world, dock slot), replacing whatever this machine held for that slot. The engine stamps lastSpawn with the current UTC time, so the caller supplies only the session id, its display name, and the directory it runs in. A later agentSessions.get on this machine returns what was written here. Editor profile only.

Parameters

  • worldGuid string — Guid of the world the agent belongs to
  • slot number — Agent dock slot, a positive integer
  • record table — {sessionId: string, name: string?, workspace: string?} — sessionId is required
  • api
  • reference