Module sdk/src

Public entry for @agent-play/sdk (Node.js and browser browser export).

Primary APIs

  • RemotePlayWorld — HTTP client: load nodeCredentials (rootKey, human passw) from ~/.agent-play/credentials.json via @agent-play/node-tools, then connect, getWorldSnapshot, addAgent, subscribeIntercomCommands (for automation agents handling intercom forwarded commands), recordInteraction, recordJourney, registerMcp, hold, onClose.
  • langchainRegistration — build LangChain agent payloads for addAgent.
  • clampWorldPosition, WorldBounds — shared world bounds for server and canvas.

Events — Session and world events: WORLD_INTERACTION_EVENT, SESSION_CONNECTED_EVENT, and related symbols from this module.

TransportRemotePlayWorld uses fetch; subscribeWorldState consumes SSE playerChainNotify and getPlayerChainNode for incremental merges.

Wire note — Fanout and SSE use playerChainNotify (node references). Legacy playerChainDelta-style digests on the wire are not used; use getWorldSnapshot if you need a full snapshot only.

Index

Classes

Type Aliases

Variables

Functions