v1.0 stable โ€” 32 packages on npm

Composable utilities
for Cloudflare Workers

Type-safe, composable utilities for every Cloudflare Workers binding. KV, D1, R2, Queues, Durable Objects, Browser Rendering, AI โ€” plus higher-level primitives for agents, memory, MCP servers, durable workflows, and approval flows.

Get Started
bunx workkit init

Less boilerplate. More types.

See the difference between raw Cloudflare APIs and workkit's composable utilities.

import { parseEnvSync } from "@workkit/env"
import { kv } from "@workkit/kv"
import { z } from "zod"

const env = parseEnvSync(rawEnv, {
  API_KEY: z.string().min(1),
  CACHE: z.any(),
})

const cache = kv<User>(env.CACHE, {
  prefix: "user:",
  defaultTtl: 3600,
})

const user = await cache.get("alice")
// ^? User | null โ€” fully typed

32 packages. One ecosystem.

Install only what you need. Every package works standalone or composes with others.

๐Ÿ“
@workkit/types
Shared TypeScript types
โš ๏ธ
@workkit/errors
Structured retry classes
๐Ÿ”
@workkit/env
Type-safe env validation
๐Ÿ“ฆ
@workkit/kv
Typed KV with serialization
๐Ÿ—„๏ธ
@workkit/d1
Query builder & migrations
โ˜๏ธ
@workkit/r2
Streaming & presigned URLs
โšก
@workkit/cache
SWR & tagged invalidation
๐Ÿ“จ
@workkit/queue
Typed producer/consumer
๐Ÿค–
@workkit/do
State machines & alarms
โฐ
@workkit/cron
Declarative task routing
๐Ÿšฆ
@workkit/ratelimit
Fixed, sliding & token bucket
๐Ÿ”‘
@workkit/crypto
AES-256-GCM & hashing
๐Ÿง 
@workkit/ai
Workers AI with streaming
๐ŸŒ
@workkit/ai-gateway
Multi-provider routing
๐Ÿค
@workkit/agent
Tool loops, handoffs, hooks
๐Ÿงฌ
@workkit/memory
Edge-native agent memory
๐Ÿ› ๏ธ
@workkit/mcp
MCP servers + REST + OpenAPI
๐Ÿชข
@workkit/workflow
Durable execution & saga
โœ‹
@workkit/approval
Policies, tokens, audit
๐Ÿ””
@workkit/notify
Email, in-app, WhatsApp
โœ‰๏ธ
@workkit/mail
Send, receive, route, parse
๐Ÿ’ฌ
@workkit/chat
Real-time chat over WebSockets
๐ŸชŸ
@workkit/browser
Browser Rendering primitive
๐Ÿ“„
@workkit/pdf
HTML โ†’ PDF via Browser Rendering
๐Ÿ›‚
@workkit/turnstile
Server-side CAPTCHA verify
๐ŸŽš๏ธ
@workkit/features
KV-backed feature flags
โค๏ธโ€๐Ÿฉน
@workkit/health
Binding health probes
๐Ÿ“‹
@workkit/api
OpenAPI generation
๐Ÿ›ก๏ธ
@workkit/auth
JWT & session management
๐Ÿ“
@workkit/logger
Structured JSON logging
๐Ÿงช
@workkit/testing
In-memory binding mocks
โŒจ๏ธ
@workkit/cli
Scaffolding & code generation