Skip to content

Quickstart

This guide walks you through installing the CKP SDK, validating a manifest against the spec, and running conformance tests against an agent.

Terminal window
npm install @clawkernel/sdk

Current npm release: @clawkernel/[email protected].

The SDK has zero runtime dependencies. It provides the full protocol stack: JSON-RPC 2.0 routing, lifecycle state machine, heartbeat, and the L2 tool execution pipeline (quota, policy, sandbox, approval, execute with timeout).

Build a conformant agent in under 10 lines

Section titled “Build a conformant agent in under 10 lines”
import { createAgent } from "@clawkernel/sdk";
const agent = createAgent({
name: "my-agent",
version: "1.0.0",
// Add tools, memory, swarm, telemetry for L2/L3
});
agent.listen(); // stdio JSON-RPC — ready for ckp-test

You write the handlers. The SDK handles the wire.

Use the conformance harness to validate any claw.yaml against the protocol schema:

Terminal window
# Clone the conformance harness
git clone https://github.com/angelgalvisc/ckp-test.git
cd ckp-test && npm install && npm run build
# Validate any claw.yaml
node dist/cli.js validate path/to/claw.yaml

Run the test vectors against a running agent to verify its conformance level:

Terminal window
# Run L1 vectors against a stdio agent
node dist/cli.js run \
--target "node path/to/your/agent.js" \
--manifest path/to/claw.yaml \
--level 1
# Expected output: 13/13 PASS → L1 CONFORMANT

Bump --level to 2 or 3 to test higher conformance levels (10 L2 vectors, 8 L3 vectors).

If you want to build the SDK locally or run the example agents:

Terminal window
cd sdk && npm install
# Build library (dist/index.js)
npm run build
# Build library + examples (for testing)
npm run build:dev
# Run the L1 example agent: 13/13 PASS
node dist/examples/l1-agent.js
# Run the L3 example agent: 31 PASS + 0 SKIP -> L3 CONFORMANT
node dist/examples/l3-agent.js

The sdk/examples/ directory contains complete L1, L2, and L3 example agents with their manifests, plus an optional world-model.claw.yaml example for CKP 0.3.0 planning manifests.