Inngest AgentKit
Type: full-code · Vendor: Inngest · Language: TypeScript · License: Apache-2.0 · Status: active · Status in practice: emerging · First released: 2024-11-22
TypeScript framework for composing multi-agent networks where a Router decides which Agent runs next over a shared State, running on Inngest's durable-execution engine for fault-tolerance and human-in-the-loop pauses.
Description. Inngest AgentKit is an open-source TypeScript framework built on top of the Inngest workflow engine. The core primitives are Agent (an LLM call with prompts, tools, and MCP), Tool, Network (a system of agents sharing State), and Router (code-based, LLM-based, or hybrid logic that picks the next Agent each loop). The execution model is a while-loop over State; when AgentKit functions run inside Inngest, each step becomes a durable, replayable unit and `step.waitForEvent` lets agents pause for hours waiting on a human reply.
Agent loop shape. Network-as-while-loop. Each iteration: Router reads State and picks an Agent (or returns undefined to stop); the chosen Agent makes an inference call with its tools and any MCP servers; tool results and messages are appended to shared State; the loop continues until the Router stops or `maxIter` is hit. When deployed on Inngest, every Agent and tool call is wrapped in `step.*` so the run survives crashes, restarts, and arbitrary `waitForEvent` pauses.
Primary use cases
- multi-agent networks with deterministic or hybrid routing
- tool-using agents over MCP server registries
- long-running agent workflows with human-in-the-loop approval
- fault-tolerant production agents on Inngest durable execution
Key concepts
- Agent → tool-use (docs) — Stateless wrapper around a model with a goal, prompts, and tools (including MCP).
- Network → supervisor (docs) — While-loop with shared State that calls Agents and Tools until the Router stops.
- Router → supervisor (docs) — Code-based, LLM-based (default routing agent / ReAct), or hybrid; decides the next Agent.
- State (docs) — Shared kv store + message history; typed; used by Router for routing decisions.
- MCP-as-tools → tool-use (docs) — Any MCP server (Streamable HTTP / SSE / WS) plugs in as a tool source.
- waitForEvent / human-in-the-loop → approval-queue (docs) — Inngest step that pauses an Agent's tool for hours waiting for an event.
Patterns this full-code implements —
- ★★Agent Resumption
When deployed on Inngest, AgentKit agents become fault-tolerant durable workflows that survive restarts; `step.waitForEvent` can pause for hours.
- ★★Approval Queue
Human-in-the-loop tools built on Inngest `waitForEvent` pause the network until a matching event arrives.
- ★★Event-Driven Agent
Agents react to and wait on Inngest events; the Inngest engine triggers and resumes runs on event arrival.
- ★★Step Budget
Networks support a `maxIter` option to cap loop iterations and avoid infinite loops; networks are while-loops that the router exits when work is done.
- ★★Supervisor
Router is the supervisor primitive: code, LLM-based (default routing agent), or hybrid.
- ★★Tool Use
Tools are built via function-calling; AgentKit also exposes any MCP server as a tool source.
- ★★Model Context Protocol
First-class MCP client; Streamable HTTP / SSE / WS transports; Smithery registry integration.
- ★★Scheduled Agent
Scheduling is inherited from Inngest (cron functions with timezones and jitter), not surfaced as a first-class AgentKit primitive in the AgentKit docs themselves; honest downgrade from first-class.
Neighbourhood
Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.