
OpenClaw Cookbook
https://github.com/openclaw/cookbook- Category
- Education
- Rank
- No. 1468Tools index
Previous survey · No. 1476 ·
- Pricing
- Open Source
- Type
- TOOL
- Builder
- openclaw
- GitHub
- 32 stars
- Date
About
Example apps and reference recipes for the OpenClaw SDK, demonstrating common agent-coding patterns.
What it does
OpenClaw Cookbook is a copyable learning workspace for turning SDK concepts into working programs. Small TypeScript recipes cover runs, event streams, cancellation, persistent sessions, model readiness, and offline transport testing. Larger starters show the same ideas in terminal and React applications.
Why it's ranked here
Its practical scope is unusually clear. Each recipe isolates one behavior, while the starters demonstrate how those behaviors fit into usable interfaces. A shared quality gate checks formatting, types, lint, tests, documentation, starter builds, and smoke runs. The main reservation is that the public SDK package is not yet available.
What's good
The examples teach operational details, not just prompt submission. They cover terminal events, timeouts, client cleanup, session continuity, cancellation, credentials, model selection, and protected Gateway connections. The command wrapper also redacts fields whose names suggest tokens, passwords, secrets, authorization data, or keys before printing results.
Tradeoffs
The repository currently depends on a private workspace shim because the public SDK package is still pending. That makes it useful for learning and validation, but weaker as a direct production dependency. Most connected recipes also require an OpenClaw Gateway and suitable credentials; only the in-memory transport example runs without one.
How to use it well
Use it when evaluating the SDK, learning one workflow at a time, or bootstrapping a terminal tool, control surface, or operations dashboard. Begin with the smallest matching recipe, run the full quality gate, then copy a standalone starter and replace the workspace dependency when the public package exists. It does not replace the Gateway or the SDK itself.
Technical notes+
The root package.json defines a private ESM package for Node 22 or newer, managed with pnpm, and composes formatting, typechecking, linting, Vitest, documentation checks, example checks, and smoke runs under one gate. packages/openclaw-sdk-shim/src/index.ts supplies typed transport, run, session, agent, model-status, event-normalization, cancellation, and waiting behavior while the public package is pending. recipes/_shared/config.ts centralizes Gateway credentials, agent, session, model, and timeout resolution. recipes/_shared/run-main.ts handles JSON output, failures, circular values, and sensitive-field redaction. scripts/check-docs.mjs validates recipe documentation, manifest entries, starter structure, check scripts, and README links.
Observed
- License
- MIT
- Primary language
- TypeScript
- Packaging
- Private ESM package managed with pnpm; the SDK dependency is supplied through the workspace
- Interfaces
- Library-style recipes, command-line applications, and React web applications
- Runtime
- Node.js 22 or newer
- Quality checks
- The root gate covers formatting, typechecking, linting, Vitest, documentation validation, starter checks, and smoke runs
Read from README.md, package.json, packages/openclaw-sdk-shim/src/index.ts, vitest.config.ts, scripts/check-docs.mjs, recipes/_shared/config.ts, recipes/_shared/run-main.ts, sdk/run-board/vite.config.ts, recipes/cancel-a-run/index.ts, recipes/model-status/index.ts, recipes/run-an-agent/index.ts, recipes/reuse-session/index.ts, recipes/stream-events/index.ts, recipes/custom-transport/index.ts, sdk/agent-workbench/vite.config.ts.
What it can do
Provide code examples for agent development
Developer request for implementation patterns → Working code examples and templates
Demonstrate SDK integration patterns
OpenClaw SDK components → Reference implementation code
Generate agent coding templates
Agent functionality requirements → Structured code templates
Showcase common agent workflows
Agent use case scenarios → Complete workflow implementations
Provide SDK API usage examples
OpenClaw SDK methods and functions → Documented code snippets with API calls
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.