AgentKit by Inngest

Framework · Last verified 2026-09-30

TL;DR

AgentKit is Inngest's Apache-2.0 TypeScript library for agent networks: agents share typed state, and a router, written as code or as an LLM routing agent, picks which agent runs next. Durable execution, retries and waits for human input come from the Inngest platform. It suits TypeScript teams already on Inngest. The newest release dates from November 2025.

Key facts

AgentKit by Inngest key facts. Data as of 2026-09-30.
Type Framework
Languages / SDKs TypeScript
License Apache-2.0
Pricing model Open core
Orchestration pattern Supervisor
GitHub stars 938 (as of 2026-09-30)
GitHub forks 146
Last push 2026-04-29
Latest release @inngest/agent-kit@0.13.2
Repository inngest/agent-kit
Website agentkit.inngest.com
Documentation agentkit.inngest.com
Last verified 2026-09-30

Key features

  • createAgent() defines an agent from a name, a system prompt, tools, lifecycle hooks and an optional per-agent model. (source)
  • createNetwork() runs agents in a loop around shared state until the router returns nothing, with a maxIter cap. (source)
  • Routers can be plain functions over state, an LLM-based routing agent (the default), or a mix of both. (source)
  • Typed state (createState<T>()) plus message history, used for deterministic state-based routing. (source)
  • MCP servers attached to an agent through mcpServers, over Streamable HTTP, SSE or WebSocket transports. (source)
  • Human-in-the-loop tools that pause on Inngest's step.waitForEvent() until a matching event arrives or a timeout passes. (source)
  • History adapters (HistoryConfig) that load and save conversation threads in any database. (source)
  • Deployment on Inngest for retries, concurrency and throttling per tenant, and step-level traces. (source)

Architecture and orchestration pattern

Pattern: Supervisor

AgentKit's unit of orchestration is the network. A network holds a list of agents, a shared state object and a router. On each loop iteration the router is called with the network, its state, the call stack and the last result; it returns the next agent to run or undefined to stop. If no router is given, a default LLM-based routing agent chooses. The docs recommend starting with code-based routers so that the order of agents follows explicit rules.

State has two parts: the message history of the run and a typed data object that tools and lifecycle hooks can read and write. The docs describe this as deterministic state-based routing, where agents fill in fields such as a plan or a done flag and the router reacts to them. State lasts only for one run(); persistence across runs comes from a history adapter that loads and saves threads, and long-term memory is shown through an integration with Mem0.

AgentKit can run as a plain library, but durable behaviour comes from Inngest. When a network runs inside an Inngest function, tool calls become retriable steps, LLM requests can be offloaded, tools can wait for external events, and runs appear with step-level traces in the Inngest dev server or cloud.

Human in the loop

Human input is implemented as a tool. Inside the tool handler, Inngest's step.waitForEvent() pauses the network until an event with a matching field (for example a ticket ID) arrives or a timeout such as four hours passes; the event's data then becomes the tool result. This requires the network to run inside an Inngest function, since the handler receives step only in that context. The docs show a support network in which a technical-support agent waits for a developer's reply.

For chat UIs, the useAgent React hook exposes approveToolCall() and denyToolCall() for tool calls in an awaiting-approval state, plus cancel() to stop the current run. Code-based routers also let the application decide when a run should stop.

Protocols

MCP, A2A and AG-UI support for AgentKit by Inngest. See the full matrix.
ProtocolSupportNote
MCP Yes evidence
checked 2026-09-30
Client: agents list MCP servers in mcpServers and use their tools over Streamable HTTP, SSE or WebSocket; no MCP server mode is documented.
A2A Unknown
checked 2026-09-30
No mention in the README, the full docs text (llms-full.txt) or repository code; code search hits for 'a2a' were only lockfiles.
AG-UI Unknown
checked 2026-09-30
Not mentioned in the docs, README or repository code, and AgentKit is not listed in the AG-UI README; the docs describe AgentKit's own streaming protocol and useAgent hooks instead.

Best for

  • TypeScript services that already use Inngest for background jobs
  • Support networks where a router sends tickets to customer or technical support agents and waits on a developer's reply
  • Coding agents that plan and edit code in sandboxes such as E2B or Daytona
  • Agent flows whose order must follow explicit, testable routing rules

Not for

  • Projects that do not want to depend on Inngest for durability, retries and human-input waits
  • Teams that need frequent releases; the latest release is 0.13.2 from 2025-11-13 and the last push was 2026-04-29
  • Python codebases

Quickstart

npm install @inngest/agent-kit inngest

Install not yet verified by this site. What this means

import { createAgent, createNetwork, createState, createTool, openai } from "@inngest/agent-kit";
import { z } from "zod";

interface QAState { answer?: string }

const saveAnswer = createTool({
  name: "save_answer",
  description: "Store the final answer",
  parameters: z.object({ answer: z.string() }),
  handler: async ({ answer }, { network }) => { network.state.data.answer = answer; return "saved"; },
});
const researcher = createAgent({ name: "researcher", system: "Answer, then call save_answer.", tools: [saveAnswer] });
const network = createNetwork<QAState>({
  name: "qa", agents: [researcher], defaultModel: openai({ model: "gpt-4o-mini" }),
  router: ({ network }) => (network.state.data.answer ? undefined : researcher),
});

const state = createState<QAState>({});
await network.run("What does an AgentKit router do?", { state });
console.log(state.data.answer);

Common pitfalls

  • inngest is a required peer dependency (>=3.43.1 in package.json); the installation page says so from v0.8.0 and the README from v0.9.0. zod must be version 4.
  • Model adapters read provider keys from the environment, for example ANTHROPIC_API_KEY in the quick start.
  • Local runs with tracing use the Inngest dev server (npx inngest-cli@latest dev).
  • Human-in-the-loop tools only work when the network runs inside an Inngest function, because step is undefined otherwise.
  • Typed state lasts for a single run(); pass a history adapter or your own state to continue a conversation.
  • v0.4.0 moved anthropic() max_tokens into defaultParameters, a breaking change for older code.

Official quickstart

Pros

  • Code-based routers make the order of agents explicit and testable instead of relying only on LLM choices. (source)
  • A human-input tool can wait hours for an event without keeping a process alive, because the wait is an Inngest step. (source)
  • MCP servers attach directly to an agent, including servers from the Smithery registry. (source)
  • Each agent in a network can use a different model; adapters cover OpenAI, Anthropic, Gemini and Grok. (source)
  • React hooks (useAgent) handle streaming, threads and tool-call approval in the browser. (source)

Cons

  • Activity has slowed: the last push was on 2026-04-29, and the newest release, @inngest/agent-kit 0.13.2, is from 2025-11-13. (source)
  • The docs changelog stops at v0.5.0 (March 2025), so later changes must be read from GitHub releases. (source)
  • Durable execution, retries and human-input waits depend on Inngest; the managed Inngest Cloud has usage limits on its free tier and paid plans above them. (source)
  • The MCP guide covers only Streamable HTTP, SSE and WebSocket transports; local stdio servers are not described. (source)
  • Still on 0.x versions, and minor releases have included breaking changes, such as moving max_tokens in v0.4.0. (source)

Alternatives

FAQ

Does AgentKit support MCP?

Yes, as a client. Agents list MCP servers in mcpServers and use their tools over Streamable HTTP, SSE or WebSocket. No MCP server mode is documented.

Do I need Inngest to use AgentKit?

inngest is a required peer dependency. Networks can run as a library, but retries, durable steps, traces and human-in-the-loop waits come from running inside Inngest functions.

Is AgentKit free?

The library is Apache-2.0. Inngest, the vendor, sells Inngest Cloud plans with a free tier and paid tiers for higher execution volumes.

Is AgentKit still maintained?

The latest release, 0.13.2, came out on 2025-11-13, and the last push to the repository was on 2026-04-29.

How does AgentKit decide which agent runs next?

A router is called after each agent. It can be a function that reads the network's typed state, or the default LLM routing agent; returning undefined stops the run.

Sources

Unknown fields: protocols.a2a: searched the package README, the complete docs (https://agentkit.inngest.com/llms-full.txt) and a GitHub code search of inngest/agent-kit; only lockfile hits. protocols.agui: same sources plus the AG-UI README integration list; no mention.