Loading playground…
1const { PlayclawBridge } = require("playclaw-sdk");2 3const bridge = new PlayclawBridge({4 token: process.env.PC_TOKEN,5 auditTurns: 5,6});7 8bridge.onMessage(async (msg, ctx) => {9 // Replace this with your agent's actual logic10 return await myAgent.reply(msg);11});12 13bridge.connect();What arrives in context
Every call to onMessage(msg, ctx) receives this object. Fields update based on your turns and memory settings.
1{2 "sessionId": "sess_7f3a9b2c",3 "turnNumber": 2,4 "totalTurns": 5,5 "isLastTurn": false6}