Catamorphic Workflows is a framework you embed inside your SaaS so your users can build their own automations, with an AI agent doing the heavy lifting and real code underneath. Pair it with Apps to give those automations a frontend, and the Copilot to put an agent in front of both. It's the same engine that powers Work for desktop, the framework's reference implementation.
Installable packages are coming soon. The full source code is open source and available on GitHub.
/**
* @displayname Welcome New User
* @description Onboard a new user
*/
export const welcomeUser = defineWorkflow(({ defineBoundary }) => ({
steps: [
defineBoundary({
run: async ({ input }: BoundaryContext<NewUserInput>) => {
const user = await createUser({ ...input });
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 programs: full IO, real npm dependencies, executed with Bun in an isolated sandbox. They live as code in the project's git repo, beside whatever else the project holds: docs, data, apps. Branches, history, and review come for free.
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 AI SDK, Claude Code, and Codex harnesses.
Persisted continuation, retries, pauses, signals, rate budgets, and batch processing, all backed by Postgres with SKIP LOCKED. No extra infrastructure.
Your product defines trigger kinds and workflows subscribe to them, so real events start real runs. Any workflow can also opt in as an MCP tool: its input type becomes the tool's schema, and an agent can call a workflow it wrote on the very next turn.
Every dependency has a light end: network Postgres or embedded pglite, cloud sandboxes, local ones, or plain processes for internal tools, S3 or plain folders. Our desktop app runs the whole engine serverless, by design, as proof.
// 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, or in embedded pglite when there's no server at all. Sandboxes execute the code.
Every layer instruments against the OTel API. Register your SDK and exporters, get full traces for free.
// agent-native
Catamorphic is built to be integrated by coding agents, not only documented for humans. Point Claude Code, Cursor, or Codex at catamorphic.ai/llms.txt and the source guidance to explore the architecture and reference implementations. Installable packages are coming soon.
Catamorphic is completely free and open source: no paid tiers, no usage meters, no strings. Installable packages are coming soon. Explore the source and architecture on GitHub today.