Durable execution for workflows & AI. Write ordinary functions, split them into steps, and ship reliable background jobs, workflows and agents — with automatic retries and step-level observability.
import { Inngest } from "inngest"; const inngest = new Inngest({ id: "acme-app" }); export default inngest.createFunction( { id: "onboard-user", retries: 4 }, { event: "user/signed.up" }, async ({ event, step }) => { // each step is checkpointed & retried on its own const customer = await step.run("create-stripe-customer", () => stripe.customers.create({ email: event.data.email }) ); const profile = await step.run("enrich-profile", () => clearbit.enrich(event.data.email) ); await step.sleep("await-onboarding", "1h"); await step.waitForEvent("await-payment", { event: "stripe/payment.succeeded", timeout: "24h", match: "data.email", }); await step.run("send-welcome-email", () => resend.emails.send({ to: event.data.email }) ); } );