Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cline.bot/llms.txt

Use this file to discover all available pages before exploring further.

The SDK is split into layered packages. Dependencies flow downward: core depends on agents, llms, and shared; agents depends on llms and shared; llms depends on shared.

Package Stack

Your application / CLI / VS Code / JetBrains


@cline/core
Sessions, storage, built-in tools, hub, automation, telemetry

          ├── @cline/agents
          │   Browser-compatible AgentRuntime / Agent loop

          ├── @cline/llms
          │   Provider handlers, gateway, model catalogs

          └── @cline/shared
              Types, schemas, tools, hooks, extension contracts

Packages

@cline/core

Node runtime/orchestration layer. Key exports include:
ExportDescription
ClineCoreMain runtime entry point
ClineCoreOptionsConstructor options
ClineCoreStartInputSession start input
CoreSessionConfigSession configuration
SessionRecordPersisted session metadata
AgentPluginPublic plugin type
createToolRe-export from shared
Capabilities include:
  • local/hub/remote runtime backends
  • session manifests and message artifacts
  • built-in tools
  • tool approvals
  • automation/scheduling services
  • telemetry hooks
  • plugin/extension loading
  • team/sub-agent tools
Depends on: @cline/shared, @cline/llms, @cline/agents.

@cline/agents

Browser-compatible agent execution loop. Key exports include:
ExportDescription
AgentRuntimeCore runtime class
AgentAlias for AgentRuntime
createAgentRuntime, createAgentFactory functions
AgentRuntimeConfigConstructor config union
AgentRunInput, AgentEventListenerRuntime helper types
createToolRe-export from @cline/shared
Methods on AgentRuntime include run, continue, abort, subscribe, restore, and snapshot. Depends on: @cline/shared, @cline/llms.

@cline/llms

Provider and model layer. Key exports include:
ExportDescription
DefaultGateway, createGatewayGateway for creating provider-backed agent models
createHandler, createHandlerAsyncProvider handler factories
getAllProviders, getProviderIds, getModelsForProviderCatalog helpers
registerProvider, registerModelRuntime registry extension
ModelInfo, ProviderInfoProvider/model metadata
Depends on: @cline/shared.

@cline/shared

Foundation package for shared contracts and utilities. Key exports include:
ExportDescription
createToolHelper for creating typed tools
AgentTool, AgentToolContext, ToolPolicyTool interfaces
AgentEvent, AgentResult, AgentConfigHost-facing agent types
AgentRuntimeEvent, AgentRunResultRuntime-facing agent types
HookEngine, HookStage, HookPoliciesHook contracts and engine
ContributionRegistry, AgentExtensionApiExtension registration contracts
ModelInfo, Message, ContentBlockModel/message types
BasicLogger, noopBasicLoggerLogging contracts
No higher-layer dependencies.

Install

npm install @cline/sdk
@cline/sdk re-exports everything from @cline/core. Install @cline/agents or @cline/llms directly only if you need lower-level control.

Design Principles

Strict dependency direction

Dependencies flow downward only. Lower layers stay embeddable without pulling in the full runtime.

Browser-compatible agent loop

@cline/agents exposes a browser-compatible runtime. It does not own session storage, built-in file/shell tools, hub transports, or Node-specific orchestration.

Core as orchestration layer

@cline/core owns Node runtime integration: session persistence, built-in tools, automation, hub/remote transports, telemetry, and extension loading.