Skip to content

Overview

Duclaw SDK is the public TypeScript API exposed by duclaw-cli.

Use it when you want to build an agent runtime from explicit contracts instead of importing Duclaw product defaults.

What the SDK Provides

AreaWhat to use
Agent loopcreateAgent, SdkAgentConfig, SdkRunResult
Model accessLLMClient, anthropic
StateStorage<T>, memoryStorage
Capabilitiestool, Tool
Runtime activityRuntimeEventBus, RuntimeEvent
ChannelsChannelPlugin, ChannelRegistry

Package Boundary

Generic SDK integrations should import from the core entrypoint:

ts
import { createAgent } from "duclaw-cli/sdk";

Duclaw product composition is opt-in:

ts
import { duclawPreset } from "duclaw-cli/sdk/duclaw";

Runtime Shape

An SDK consumer owns composition:

txt
Your app
  |-- createAgent(config).run(input)
  |-- LLMClient
  |-- Storage<Message[]>
  |-- Tool[] + ToolExecutor
  |-- RuntimeEventBus
  `-- ChannelPlugin optional

Next Steps

Released as part of the duclaw-cli package.