SEO: OpenClaw SDK
OpenClaw SDK (Node/JavaScript)
TXT CLAW provides a tiny JS client for the developer API so you can wrap OpenClaw-powered agents into your own product quickly.
Quickstart (1 line)
pnpm dlx txtclaw@latest init
Agent docs: /agents.md · /openapi.yaml
SDK Example
(Published as the txtclaw package once npm publishing is enabled.)
pnpm add txtclaw
import { createTxtclawClient } from "txtclaw"
const client = createTxtclawClient({
apiKey: process.env.TXTCLAW_API_KEY,
baseUrl: process.env.TXTCLAW_API_BASE_URL, // optional
})
const { agent_id } = await client.createAgent({
systemPrompt: "You are a helpful assistant. Keep replies concise.",
})
const { reply_text } = await client.sendMessage(agent_id, {
text: "Draft a polite text asking my landlord to fix a leak.",
})
console.log(reply_text)Links
- Developers overview: /developers
- OpenClaw API overview: /openclaw-api
- API reference: /api-reference