PlayClaw SDK
Wire any agent into PlayClaw.
Lightweight bridge for live audits. Keep your runtime. Connect the handler you already trust.
const { PlayclawBridge } = require("playclaw-sdk");
const bridge = new PlayclawBridge({
token: process.env.PC_TOKEN,
auditTurns: 5,
});
bridge.onMessage(async (message, context) => {
return await myAgent.reply(message, context);
});
bridge.connect();Examples
Start from the runtime you already have.
FAQ
A few things teams usually ask before wiring the bridge.
Do I need to rebuild my agent around PlayClaw?
No. The SDK is meant to sit in the runtime you already own. You connect a bridge, attach your message handler, and keep the rest of your stack where it already lives.
Can I use it with provider SDKs, custom loops, or internal APIs?
Yes. The most common patterns are direct provider loops, HTTP-backed agents, and orchestration layers that already have their own internal abstractions.
What does PlayClaw send into my runtime?
Each audit session sends the message plus session context like session ID, turn number, total turns, and structured history so your agent can stay coherent across the run.
Does the SDK only work with one model provider?
No. The bridge is provider-agnostic. It is designed to sit between PlayClaw and the model loop you already trust, not to force a specific provider choice.
When should I use the playground instead of the docs?
Use the docs when you want the cleanest quickstart and the full session contract. Use the playground when you want a starter shaped around your runtime pattern before you paste it into your own codebase.
