TypeScript SDK v4 is now available! See what's new

Inngest Functions

Inngest functions are durable, retriable units of background logic that run on your own compute and are triggered by events, cron schedules, or webhooks. Use them for background jobs, scheduled work, and multi-step workflows that need automatic retries, step-level state, and observability without adding a queue or workflow engine.

You write standard TypeScript, Python, or Go code, then expose functions with serve() or Connect so Inngest can invoke and coordinate runs from the platform.

What are Inngest functions?

An Inngest function is a regular function wrapped with Inngest trigger and execution metadata. Inngest starts a run when a matching event, schedule, or webhook arrives, then records each step so failed work can retry from the last successful checkpoint instead of restarting from scratch.

At a high level, an Inngest function has three core parts:

inngest.createFunction({
    id: "sync-systems",
    // A Function is triggered by events
    triggers: { event: "auto/sync.request" },
    // Easily add Throttling with Flow Control
    throttle: { limit: 3, period: "1min"},
  },
  async ({ step }) => {
    // step is retried if it throws an error
    const data = await step.run("get-data", async () => {
      return getDataFromExternalSource();
    });

    // Steps can reuse data from previous ones
    await step.run("save-data", async () => {
      return db.syncs.insertOne(data);
    });
  }
);

Using Inngest Functions

Start using Inngest Functions by using the pattern that fits your use case:

Learn more about Functions and Steps

Functions and Steps are powered by Inngest's Durable Execution Engine. Learn about its inner working by reading the following guides:

SDK References