SDK
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
bash
pnpm i txtclaw

Agent docs: /agents.md · /openapi.yaml

SDK Example

Published as the txtclaw package.

Install
bash
pnpm i txtclaw
Usage
ts
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

Text us: +1 (629) 229-0114

Message and data rates may apply. Reply STOP to opt out. Reply HELP for help.

Privacy Policy|Terms and Conditions