Catamorphic is a framework you embed inside your SaaS so your users can build their own workflow automations and apps — with an AI agent doing the heavy lifting, and real code underneath.
/**
* @displayname Welcome New User
* @description Onboard a new user
*/
export async function welcomeUser({ email, name }: NewUserInput) {
"use workflow";
const user = await createUser({ email, name });
await sendWelcomeEmail({ to: user.email });
if (user.plan === "premium") {
await assignPremiumBenefits({ userId: user.id });
}
return { status: "complete", userId: user.id };
}
// why catamorphic
Workflows and apps are stored as TypeScript in a git repository — never a proprietary DSL or a pile of JSON. The parser renders that code as a visual graph for non-technical users, while engineers and AI agents work directly with the code.
User workflows run like normal apps — full IO, real dependencies, no crippled JS runtime. Executed with Bun inside an isolated sandbox.
A project is just a git repo of TypeScript. Branches, history, and review come for free — for humans and agents alike.
The AST parser turns code into an intuitive React Flow canvas, so non-technical users can read, run, and reshape automations.
Coding agents write and edit workflows from natural language, driving a dev sandbox remotely. Ships with Vercel AI SDK and Codex plugins.
Persisted continuation, retries, pauses, signals, rate budgets, and batch processing — all backed by Postgres with SKIP LOCKED. No extra infrastructure.
Auth, database, storage, sandbox and LLM credentials, telemetry — all injected by your app. No default identity, no hidden tenant model.
// how it works
Catamorphic ships as libraries your application mounts in-process. Your auth, your user model, your database, your deployment surface.
Point createCatamorphic at your Postgres and a sandbox provider. It manages its own schema-scoped tables and migrations.
One Fastify plugin exposes the standard API to your frontend, carrying identity from your auth context on every request.
Ready-made React components for the workflow canvas and run history, headless hooks underneath, and shadcn-style registry components when you want to own the source.
They describe what they want; the agent writes the workflow; the graph shows them exactly what it does. Runs execute durably in sandboxes.
// the developer surface
Install only what you use. Every layer is opt-in, from the full editor UI down to the headless kernel.
@catamorphic/server-sdkThe core SDK for your Node or Bun backend — projects, workflows, file I/O, and durable execution on your Postgres.@catamorphic/fastify-pluginA mountable plugin exposing the standard HTTP API, plus a standalone factory for sidecar deployments.@catamorphic/reactHeadless React bindings: provider, TanStack Query hooks, and jotai atoms for fully custom UIs.@catamorphic/uiReady-made components — the React Flow workflow canvas, detail panel, history sidebar, and AI bar.@catamorphic/registryshadcn-style copy-paste components for hosts that want to own and customize the source.@catamorphic/workflowTyped workflow-authoring primitives: boundaries, batches, signals, correlation keys, rate budgets.Eject any time — your users' automations are ordinary code in an ordinary repository, readable without Catamorphic.
Queues, retries, pauses, schedules, and batch state live in the database you already run. Sandboxes execute the code.
Every layer instruments against the OTel API. Register your SDK and exporters, get full traces for free.
Catamorphic is completely free and open source — no paid tiers, no usage meters, no strings. Star the repo, read the integration guide, and embed it in an afternoon.