Hosted Execution Platform

Stop rebuilding execution infrastructure

Clockwork gives you a persistent execution graph, scheduling engine, resource manager, human collaboration system, and constraint optimizer — so you can focus on your product.

Core Platform Capabilities

Capability 1

Persistent Execution Graph

Execution exists as a persistent graph — not in memory. Pause, resume, inspect state, and recover after crashes across any number of sessions.

  • Survives crashes and restarts
  • Inspect state at any point
  • Dynamic graph mutation at runtime
  • Full execution history
TypeScript
const workflow = await clockwork.instances.create({
  template: 'customer-onboarding',
})

// Resumable across any session
const state = await workflow.getState()
Sign Up
Verify Email
Create Workspace
Complete
Capability 2

Scheduling & Orchestration

Clockwork schedules work — not just tracks it. Dependencies, critical paths, deadlines, and parallel execution are managed automatically.

  • Automatic critical path detection
  • Deadline-aware scheduling
  • Parallel work coordination
  • Automatic replanning on change
TypeScript
workflow.onResourceUnavailable('doctor', () => {
  workflow.reschedule()
  // All dependents move automatically
})
Verify Insurance
Book Appointment
Send Reminder
Patient Check-in
Capability 3

Constraint Optimization

Execution satisfies business constraints — budgets, deadlines, capacity limits, and custom rules — and continuously re-optimizes as constraints change.

  • Capacity and budget constraints
  • Priority-based optimization
  • Instant re-planning on change
  • Feasibility detection
TypeScript
sprint.addConstraint({
  capacity: 40,
  deadline: 'Friday 5:00 PM',
})

await sprint.optimize()
Sprint Capacity45/40 pts

This Sprint

Auth Refactor (8)
API Impl (13)
Frontend (8)
Analytics (5)
Capability 4

Multi-Resource Coordination

Coordinate humans, AI agents, APIs, and shared resources from one execution graph. Automatic reassignment when resources change.

  • Humans, AI, and services unified
  • Automatic conflict detection
  • Dynamic reassignment
  • Real-time resource tracking
TypeScript
workflow.assign(task, resource)

workflow.on('severity_change', async () => {
  await workflow.reassign({ priority: 'critical' })
})

👤 Support Engineer

Notify Customer

🤖 AI Triage

Classify SeverityCollect LogsVerify Recovery

⚡ PagerDuty

Notify Engineer
Capability 5

Human-in-the-Loop

Humans participate directly inside execution. Approvals, reviews, and decisions are first-class execution events — not webhook hacks.

  • Native approval steps
  • Execution pauses automatically
  • Resumes on human decision
  • Artifact-based reviews
TypeScript
await workflow.requestApproval({
  reviewer: editor.email,
  artifact:  'blog-post-draft.md',
  deadline:  addHours(new Date(), 24),
})
Generate Article
Editorial Review
Apply Changes
Publish
Awaiting editorial approval

See it in action

Five primitives. Every feature you've had to build from scratch.

Each demo below shows a common SaaS feature built on top of one platform capability. The SDK panel, execution graph, and application UI stay synchronized.

Persistent Execution

SDK
1import { clockwork } from '@clockwork/sdk'
2
3// Create a persistent workflow instance
4const onboarding = await clockwork.instances.create({
5 template: 'customer-onboarding',
6 customer: {
7 id: user.id,
8 email: user.email,
9 plan: 'pro',
10 },
11 metadata: {
12 signupSource: 'web',
13 referral: req.query.ref,
14 },
15})
16
17// State is durable — survives crashes, restarts, and weeks-long pauses
18const state = await onboarding.getState()
19// { stepId: 'verify-email', completedSteps: ['signup'] }
20
21// Real-time UI sync via task events
22onboarding.on('task.completed', (event) => {
23 updateChecklist(event.taskId, { status: 'completed' })
24})
25
26// The graph mutates dynamically at runtime based on user choices
27if (user.connectsGitHub) {
28 await onboarding.insertAfter('import-data', [
29 { id: 'import-repos', label: 'Import Repositories' },
30 { id: 'analyze-code', label: 'Analyze Codebase' },
31 ])
32}
33
34// Resume from the exact step the user left off
35// No resume flags, no state machines — Clockwork tracks all of it
36await onboarding.resume()
37
38// Mark steps complete — idempotent and safe to call multiple times
39await onboarding.completeTask('verify-email', {
40 method: 'email-link',
41 verifiedAt: new Date(),
42})
Execution Plan
Execution graph will appear here
pending
running
review
done

Get started

The execution graph is the source of truth.

Scheduling, optimization, human collaboration, and resource coordination are built into the platform. Everything else is your product.