Skip to content
DesktopCloudIDECLISDKClinePassDocs
SpecDrivenPlanEnterpriseBlogAI Coding Uni.MCP MarketplaceModelsFAQCareersSupportContact SalesGitHub
Sign In71k
DesktopCloudIDECLISDKClinePassDocs
SpecDrivenPlanEnterpriseBlogLearnMCP MarketplaceModelsFAQCareersSupportContact SalesGitHub
Sign In71k

Product

  • Docs
  • Models
  • Blog
  • Enterprise
  • MCP marketplace
  • IDE
  • CLI
  • Cloud
  • SDK
  • Changelog

Community

  • Discord
  • Reddit
  • GitHub Discussions

Support

  • GitHub issues
  • Feature requests
  • Contact

Company

  • Careers
  • Brand
  • Terms
  • Privacy

Stay in touch

DiscordXLinkedInRedditGitHub
Color theme

© 2026 Cline Bot Inc. All rights reserved.

Open Source · TypeScript

Build with the Cline agent runtime.

The same agent harness that powers Cline in the IDE and CLI, now an open source SDK you can embed in your own scripts, services, and products. Tools, plugins, model providers, and session management all included.

$npm install @cline/sdk

Requires Node.js 22+

Read the docsView on GitHub
agent.ts@cline/sdk
import { Agent } from "@cline/sdk"

const agent = new Agent({
  providerId: "anthropic",
  modelId: "claude-sonnet-4-6",
  apiKey: process.env.ANTHROPIC_API_KEY,
})

agent.subscribe((event) => {
  if (event.type === "assistant-text-delta") {
    process.stdout.write(event.text ?? "")
  }
})

await agent.run("Review the diff on this branch.")

See it in action

A few lines of TypeScript. A real agent.

Watch how an SDK agent runs end to end: streaming model output, calling tools, and finishing the task.

One install. Five composable packages.

Take the whole harness, or pull in only the pieces you need. The SDK is modular so you can vendor as little or as much as fits your stack.

PUBLIC SURFACE

@cline/sdk

The umbrella package. Re-exports the runtime, agent, providers, and helpers.

FULL HARNESS

@cline/core

Sessions, built in tools, persistence, hub support, scheduling, plugin loading.

STATELESS LOOP

@cline/agents

The agent execution loop on its own. Browser compatible, lightweight, no built ins.

MODEL GATEWAY

@cline/llms

Provider clients and model catalogs. Drop in to plug into your own routing layer.

PRIMITIVES

@cline/shared

Types, schemas, tool helpers, hooks, and storage primitives shared across packages.

Requires Node.js 22+

Why teams build on the Cline SDK

A complete agent runtime, packaged so you can ship it inside your own workflows and products.

PRODUCTION HARNESS

The same runtime that powers Cline

Sessions, message history, tool approval, persistence, hub support, scheduling. The pieces we battle test in the Cline IDE and CLI ship with the SDK.

PLUGINS & TOOLS

Extend the agent for your stack

Add custom tools with a zod schema, register lifecycle hooks for policy and observability, or bundle everything into a reusable plugin you can share.

MODEL AGNOSTIC

Bring any provider

Route through Anthropic, OpenAI, Google, Bedrock, Vertex, Ollama, OpenRouter, or any OpenAI compatible endpoint. Switch providers without rewriting your agent.

BUILT FOR AUTOMATION

Run agents anywhere

Embed the SDK in CI/CD pipelines, queue workers, cron jobs, internal tools, Tauri desktop apps, or your own product. Streaming events let you wire any UI.

OPEN SOURCE

No lock-in. No black box.

Read the source, fork the runtime, or vendor the packages you need. The SDK is part of the same open source repository as Cline.

MCP READY

Native MCP and skills support

Load MCP servers, use the built in tool suite for files, search, shell, web, and skills, or compose your own. The agent treats them all uniformly.

From install to first agent in 60 seconds

Pick the surface area you need. Everything else is opt in.

A stateless agent loop. Send a prompt, stream events, get a result. Perfect for one shot tasks, scripts, and lightweight in process use.

import { Agent } from "@cline/sdk"
 
const agent = new Agent({
providerId: "anthropic",
modelId: "claude-sonnet-4-6",
apiKey: process.env.ANTHROPIC_API_KEY,
})
 
agent.subscribe((event) => {
if (event.type === "assistant-text-delta") {
process.stdout.write(event.text ?? "")
}
})
 
const result = await agent.run(
"Summarize the changes in this branch."
)
 

Ship real things with the SDK

Working examples in the repo. Clone, run, modify.

quickstart

Beginner

Send one prompt, stream the response. The smallest possible SDK app, roughly 15 lines of TypeScript.

View on GitHub

cli-agent

Beginner

An interactive terminal chat with a shell tool. A great template for building scriptable agents.

View on GitHub

code-review-bot

Intermediate

An AI code reviewer that defines custom tools, structures its output, and exits cleanly. Wire it into CI.

View on GitHub

multi-agent

Advanced

Parallel agents with a streaming web UI. Demonstrates fan out, fan in patterns and live event streams.

View on GitHub

desktop-app

Advanced

A full Tauri plus Next.js desktop application built on the SDK. Production grade reference architecture.

View on GitHub

What teams build with it

Internal developer tools

Build a Slackbot that triages bug reports, a CLI that scaffolds services, or a queue worker that grooms backlogs.

CI/CD automations

Run code review, dependency audits, migration generators, or release note drafters on every pull request.

Customer facing AI features

Ship an agent inside your product. Wire its events into your own UI, persistence, and approval flows.

Resources

Documentation

Full API reference, guides for building agents, tools, plugins, and runtime modes.

Read the docs

Source on GitHub

Read the runtime, file an issue, or contribute. The SDK lives in the main Cline repo.

View on GitHub

SDK Skill for AI agents

Install the Cline SDK skill in Claude Code, Codex, or Cline so your coding agent scaffolds with SDK best practices.

Add the skill

Bring the agent into your stack.

The Cline SDK is open source and free to use. Install, build, and ship.

Read the docsView on GitHub

npm install @cline/sdk