Home

Awesome

Inngest

Latest release Test Status Discord Twitter Follow

Inngest is a developer platform that combines event streams, queues, and durable execution into a single reliability layer.

<div align="center"> <a href="https://www.inngest.com/uses/durable-workflows?ref=org-readme"> Durable workflows </a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="https://www.inngest.com/ai?ref=org-readme"> AI & LLM Chaining </a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="https://www.inngest.com/uses/serverless-queues?ref=org-readme"> Serverless Queues </a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="https://www.inngest.com/uses/workflow-engine?ref=org-readme"> Workflow Engines </a> </div> <br/>

Build and ship durable functions and workflows in your current codebase without any additional infrastructure. Using Inngest, your entire team can ship reliable products.

SDKs: TypeScript/JavaScriptPythonGo


<br />

The Inngest Dev Server

npx inngest-cli@latest dev

Inngest Dev Server screenshot

<br />

Overview

Inngest makes it easy to develop durable functions and workflows in your existing codebase, without any new infrastructure. Inngest Functions are triggered via events — decoupling your code within your application.

  1. You define your Inngest functions using the Inngest SDK and serve them through a simple API endpoint.
  2. Inngest automatically invokes your functions via HTTPS whenever you send events from your application.

Inngest abstracts the complex parts of building a robust, reliable, and scalable architecture away from you, so you can focus on building applications for your users.

Read more about our vision and why Inngest exists


SDKs

Getting started

👉 Follow the full quick start guide here

A brief example

Here is an example of an Inngest function that sends a welcome email when a user signs up to an application. The function sleeps for 4 days and sends a second product tips email:

import { Inngest } from 'inngest';

const inngest = new Inngest({ id: 'my-app' });

// This function will be invoked by Inngest via HTTP any time
// the "app/user.signup" event is sent to to Inngest
export default inngest.createFunction(
  { id: 'user-onboarding-emails' },
  { event: 'app/user.signup' },
  async ({ event, step }) => {
    await step.run('send-welcome-email', async () => {
      await sendEmail({ email: event.data.email, template: 'welcome' });
    });

    await step.sleep('delay-follow-up-email', '7 days');

    await step.run('send-tips-email', async () => {
      await sendEmail({ email: event.data.email, template: 'product-tips' });
    });
  }
);

// Elsewhere in your code (e.g. in your sign up handler):
await inngest.send({
  name: 'app/user.signup',
  data: {
    email: 'test@example.com',
  },
});

Some things to highlight about the above code:

Learn more about writing Inngest functions in our documentation.

<br />

Project Architecture

Fundamentally, there are two core pieces to Inngest: events and functions. Functions have several subcomponents for managing complex functionality (eg. steps, edges, triggers), but high level an event triggers a function, much like you schedule a job via an RPC call to a queue. Except, in Inngest, functions are declarative. They specify which events they react to, their schedules and delays, and the steps in their sequence.

<br /> <p align="center"> <img src=".github/assets/architecture-0.5.0.png" alt="Open Source Architecture" width="660" /> </p>

Inngest’s architecture is made up of 6 core components:

And, in this CLI:

For specific information on how the DevServer works and how it compares to production read this doc.

<br />

Community

Contributing

We’re excited to embrace the community! We’re happy for any and all contributions, whether they’re feature requests, ideas, bug reports, or PRs. While we’re open source, we don’t have expectations that people do our work for us — so any contributions are indeed very much appreciated. Feel free to hack on anything and submit a PR.

Check out our contributing guide to get started.