cookbook/sdk/quickstart
Peter Steinberger 66a698207f
Some checks failed
Check / Cookbook and examples (push) Has been cancelled
chore: update TypeScript tooling
2026-05-04 01:54:17 +01:00
..
src feat: add standalone sdk examples 2026-04-30 01:03:02 +01:00
package.json chore: update TypeScript tooling 2026-05-04 01:54:17 +01:00
README.md feat: add standalone sdk examples 2026-04-30 01:03:02 +01:00
tsconfig.json feat: add standalone sdk examples 2026-04-30 01:03:02 +01:00

OpenClaw SDK Quickstart

A minimal Node.js example that creates one agent run, streams normalized events to stdout, and waits for the final result.

Getting Started

Use Node.js 22 or newer.

pnpm install
export OPENCLAW_GATEWAY=auto
pnpm dev

Build and run the compiled example:

pnpm build
pnpm start

Notes

Set OPENCLAW_AGENT_ID, OPENCLAW_SESSION_KEY, or OPENCLAW_MODEL to override the defaults.