Inngest Documentation

website·Indexed 36 days ago

https://inngest.com/docs

Durable workflow engine for AI applications and background jobs. Features include durable execution, step-based checkpointing, and flow control (concurrency, rate limiting, batching, and debounce). Supports TypeScript SDK v3 and Python (Flask, FastAPI, Django), providing tools for durable agents, agent evaluations, and durable endpoints.

Tokens
102.5K
Snippets
435
Records
650
Agent score
73%

What's inside Inngest

  1. Overview of Inngest Flow Control mechanisms

    Inngest provides several flow control methods to manage how functions are executed, preventing system overload and ensuring reliability. The available mechanisms include:

    • Multi-tenancy: Groups queued work by tenant or resource to reduce head-of-line blocking and ensure best-effort fairness.
    • Concurrency: Limits the number of executing steps across function runs. Useful for limiting workloads by user, resource, or globally.
    • Throttling: Limits the throughput of function execution over a specific period, typically used to comply with third-party API rate limits.
    • Rate Limiting: Prevents excessive runs by skipping events that exceed a specific limit over a time period, protecting against abuse.
    • Debounce: De-duplicates events over a sliding time window to avoid unnecessary invocations when functions are triggered in quick succession.
    • Priority: Dynamically adjusts the execution order of functions to move critical work to the front of the queue.
  2. Overview of Inngest Model Context Protocol (MCP)

    Inngest provides MCP servers that allow AI coding agents to inspect and operate Inngest apps, functions, events, runs, and traces. There are two available servers: Inngest Cloud (for deployed environments and production data) and the Dev Server (for local development and embedded documentation). The MCP tools are based on the Inngest REST API v2 and Inngest CLI commands.
  3. Overview of Inngest Functions

    Inngest functions are durable, retriable units of background logic that run on your own compute. They are triggered by events, cron schedules, or webhooks and are used for background jobs, scheduled work, and multi-step workflows. Unlike standard functions, Inngest records each step of execution, allowing failed work to retry from the last successful checkpoint rather than restarting from the beginning. To make functions available for invocation by the Inngest platform, they must be exposed via serve() or Connect.
  4. Overview of Inngest Steps

    Inngest Steps are checkpointed, retriable units of work used within Inngest functions and Durable Endpoints. They allow developers to wrap side effects, API calls, and long-running processes so that Inngest can memoize results and resume execution from the last successful checkpoint without re-running completed work. This ensures reliability and efficient error recovery, as failing steps can be retried independently of other successful steps.
  5. Overview of Inngest Realtime (SDK v4)

    v4

    Inngest Realtime allows streaming real-time updates from Inngest functions to client applications using typed channels and topics. It is built directly into the TypeScript SDK v4, so no separate package is required.

    Key concepts include:

    • Channels: Named scopes for messages. They can be static or parameterized (e.g., using a contentId).
    • Topics: Typed message streams within a channel, each defined by a schema.
    • Publishing: Sending data to a topic. Use step.realtime.publish() inside functions for durable, memoized publishes. Use inngest.realtime.publish() for non-durable messages (which will fire again if the function retries).
    • Subscribing: Consuming messages via useRealtime, subscribe(), or client aliases like inngest.realtime.subscribe() and inngest.realtime.token().
  6. Overview of Inngest Connect API

    The connect API allows an application to create persistent outbound WebSocket connections to Inngest. This is the lowest-latency option for executing functions and is ideal for container runtimes (like Kubernetes or ECS) because it does not require a load balancer for inbound traffic. Key benefits include elastic horizontal scaling, execution not bound by HTTP timeouts, and automatic syncing of function configurations upon connection.
  7. Overview of Inngest Durable Endpoints

    Durable Endpoints transform standard HTTP handlers into fault-tolerant endpoints by wrapping critical logic into durable steps. They provide tracing, observability, and automatic retry logic from the point of failure. If a step fails, the endpoint resumes from that specific step rather than restarting the entire request. This is particularly useful for endpoints with multiple sequential steps where repeating early successful work is wasteful.
  8. Overview of Durable Endpoints Streaming

    Durable Endpoints allow streaming incremental responses back to clients using Server-Sent Events (SSE). This is particularly useful for AI inference tokens or long-running status updates. Streaming is integrated with durable steps: if a step fails and retries, any data streamed during that specific step is automatically rolled back on the client. This feature is currently only available in the TypeScript SDK.
  9. Overview of Agent Evals for AI Workflows

    Agent Evals is a production evaluation framework built into Inngest (not a separate SDK) used to measure the performance of AI agents. It allows developers to score function runs, group related work into sessions, preserve execution details via traces, and compare different prompt or model versions using experiments. It is particularly useful for scoring based on guardrails, model confidence, user feedback, or human review.
  10. Overview of Inngest Checkpointing

    Checkpointing is a performance optimization for Inngest functions that executes steps eagerly on the client-side (your server) rather than waiting for internal orchestration from the Inngest platform. This dramatically lowers latency, making it ideal for real-time AI workflows. When a step fails and requires a retry, the engine automatically falls back to standard orchestration to ensure safety and reliability.
  11. Overview of Inngest TypeScript SDK v4 Features

    v4

    Inngest TypeScript SDK v4 provides a durable execution platform for background jobs, scheduled tasks, and multi-step workflows. Key improvements in v4 include:

    • Rewritten Middleware: More intuitive hooks for cross-cutting concerns.
    • Enhanced Schemas: Runtime event data validation with Standard Schema support (including Zod).
    • Performance Optimizations: Parallel step optimization and checkpointing are enabled by default to reduce latency and requests.
    • Structured Logging: Pino-style logging with clear separation between internal and application logs.
    • API Refinements: Triggers are now located in the options object, and lazy initialization is supported for edge runtimes.
  12. Overview of Inngest Workflow Kit

    Inngest Workflow Kit is a framework for building configurable, user-defined workflow engines. It provides a Workflow Engine to compose workflow actions on the backend with durable execution, and a set of pre-built React components to create a Workflow Editor UI on the frontend.