Files
cline/sdk/apps/examples/quickstart/README.md
T
Saoud Rizwan 9bef7613fa feat: add SDK cookbook examples with difficulty progression (#90)
* feat: add SDK cookbook examples with difficulty progression

Add three new example apps to apps/examples/ organized as a
difficulty ladder from beginner to advanced, similar to Cursor's
SDK cookbook. Includes a top-level README linking all examples.

- quickstart: minimal ~15 line agent, send a prompt, stream response
- cli-agent: interactive terminal chat with a shell tool
- code-review-bot: structured code review with custom tools and
  completion lifecycle

* feat: add multi-agent fan-out example with streaming web UI

Spawns three specialist agents in parallel, streams their responses
to the browser via SSE, then a synthesizer agent combines their
findings into a unified answer. Single-file server with inline HTML.

* chore: replace pnpm with bun in example docs and source

* fix: use claude-sonnet-4-6 model ID in examples

* fix(examples): use Cline keys in cookbook

* docs(examples): add SDK build step
2026-05-11 14:31:55 -07:00

696 B

Quickstart

The simplest possible Cline SDK example. Creates one agent, sends a single prompt, and streams the response to stdout.

Getting started

Use Node.js 22 or newer.

Install dependencies:

bun install
bun run build:sdk

Set an API key:

export CLINE_API_KEY="cline_..."

Run:

bun dev

What it does

  1. Creates an Agent with a provider and model
  2. Subscribes to assistant-text-delta events to stream output
  3. Calls agent.run() with a prompt
  4. Prints token usage when done

Notes

For an interactive terminal chat, see cli-agent. For custom tools and structured workflows, see code-review-bot.