plugins/plugin-scape/README.md
First-class agent integration for xRSPS — the TypeScript OSRS private server at xrsps-typescript.
'scape turns a running xRSPS instance into an autonomous-agent playground
for the eliza runtime. When you click 'scape in the apps launcher:
https://scape-client-2sqyc.kinsta.page,
a React/WebGL build hosted as a Sevalla static site. It's wired at
build time to a live game server at wss://scape-96cxt.sevalla.app
and an OSRS cache + map-tile bucket at
https://scape-cache-skrm0.sevalla.storage. Override
SCAPE_CLIENT_URL to point at a local http://localhost:3000 dev
server or your own fork's deployment.ScapeGameService connects to xRSPS's bot-SDK
endpoint — a JSON-encoded WebSocket at
wss://scape-96cxt.sevalla.app/botsdk by default. That's the
production deployment: the bot-SDK shares the main game server's
HTTP port (8080) and is routed by URL path, so TLS is terminated by
Sevalla's ingress and everything flows over a single public
WebSocket endpoint. Spawning creates a first-class agent-player
account using the same scrypt auth + Postgres-backed persistence
human logins use. Override SCAPE_BOT_SDK_URL to
ws://127.0.0.1:8080/botsdk for a local dev stack.The agent isn't a scripted bot glued on top of the client protocol. It's
a PlayerState in the xRSPS world with an optional AgentComponent
attached — same tick loop, same combat rules, same autosave, same
visibility to human players. Human and agent logins share the exact
same account store, save file, and code path. The only differences are:
/botsdk on the shared HTTP
server (default port 8080) instead of the binary game protocol
on /. Both endpoints share a single port so TLS is terminated
once at the ingress.AgentComponent on their PlayerState that holds
perception snapshots, action queues, journal refs, and goals.This is the first step toward turning xRSPS into an ECS-for-agents.
Agents speak JSON — the same structured format used by the native tool-calling
runtime and trajectory viewer,
typically 40–60% cheaper than JSON for the kinds of state snapshots an
agent loop emits every few seconds. The full frame reference lives in
the xRSPS server at
server/src/network/botsdk/BotSdkProtocol.ts.
| Variable | Default | Purpose |
|---|---|---|
SCAPE_CLIENT_URL | https://scape-client-2sqyc.kinsta.page | xRSPS client URL the viewer iframe points at. Set to http://localhost:3000 for local dev. |
SCAPE_BOT_SDK_URL | wss://scape-96cxt.sevalla.app/botsdk | bot-SDK WebSocket endpoint on the xRSPS server. Defaults to the live Sevalla deployment (shared HTTP server, path-routed, TLS by ingress). Override to ws://127.0.0.1:8080/botsdk for local dev. |
SCAPE_BOT_SDK_TOKEN | (unset → autonomous loop disabled) | Shared secret matching xRSPS BOT_SDK_TOKEN. |
SCAPE_AGENT_NAME | scape-agent | In-game display name for the agent. |
SCAPE_AGENT_PASSWORD | (unset → auto-generated + persisted to disk) | Plaintext password for the agent's account. |
SCAPE_LOOP_INTERVAL_MS | 15000 | Autonomous LLM step interval. |
SCAPE_MODEL_SIZE | TEXT_SMALL | eliza model tier for the loop. |
sdk/) + connection manager + empty game
service. Plugin connects to xRSPS and logs agent spawned, but
doesn't do anything afterward.POST /api/apps/scape/prompt.