# AgentKit by Inngest: features, protocols, quickstart

## 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

| Field | Value |
| --- | --- |
| Type | Framework |
| Languages / SDKs | TypeScript |
| License | Apache-2.0 |
| Pricing model | [Open core](https://www.inngest.com/pricing) |
| 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](https://github.com/inngest/agent-kit) |
| Website | [agentkit.inngest.com](https://agentkit.inngest.com) |
| Documentation | [agentkit.inngest.com](https://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](https://agentkit.inngest.com/concepts/agents))
- `createNetwork()` runs agents in a loop around shared state until the router returns nothing, with a `maxIter` cap. ([source](https://agentkit.inngest.com/concepts/networks))
- Routers can be plain functions over state, an LLM-based routing agent (the default), or a mix of both. ([source](https://agentkit.inngest.com/concepts/routers))
- Typed state (`createState<T>()`) plus message history, used for deterministic state-based routing. ([source](https://agentkit.inngest.com/advanced-patterns/routing))
- MCP servers attached to an agent through `mcpServers`, over Streamable HTTP, SSE or WebSocket transports. ([source](https://agentkit.inngest.com/advanced-patterns/mcp))
- Human-in-the-loop tools that pause on Inngest's `step.waitForEvent()` until a matching event arrives or a timeout passes. ([source](https://agentkit.inngest.com/advanced-patterns/human-in-the-loop))
- History adapters (`HistoryConfig`) that load and save conversation threads in any database. ([source](https://agentkit.inngest.com/concepts/history))
- Deployment on Inngest for retries, concurrency and throttling per tenant, and step-level traces. ([source](https://agentkit.inngest.com/concepts/deployment))

## 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

| Protocol | Support | Evidence | Note |
| --- | --- | --- | --- |
| MCP | Yes (checked 2026-09-30) | [link](https://agentkit.inngest.com/advanced-patterns/mcp) | 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

```sh
npm install @inngest/agent-kit inngest
```

Install not yet verified by this site.

```ts
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: https://agentkit.inngest.com/getting-started/installation

## Pros

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

## 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](https://github.com/inngest/agent-kit))
- The docs changelog stops at v0.5.0 (March 2025), so later changes must be read from GitHub releases. ([source](https://agentkit.inngest.com/changelog/overview))
- 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](https://www.inngest.com/pricing))
- The MCP guide covers only Streamable HTTP, SSE and WebSocket transports; local stdio servers are not described. ([source](https://agentkit.inngest.com/advanced-patterns/mcp))
- Still on 0.x versions, and minor releases have included breaking changes, such as moving `max_tokens` in v0.4.0. ([source](https://agentkit.inngest.com/changelog/overview))

## Alternatives

- [Mastra](https://multiagentguide.top/tools/mastra.md)
- [VoltAgent](https://multiagentguide.top/tools/voltagent.md)
- [OpenAI Agents SDK (JavaScript/TypeScript)](https://multiagentguide.top/tools/openai-agents-js.md)
- [LangGraph.js](https://multiagentguide.top/tools/langgraphjs.md)
- [KaibanJS](https://multiagentguide.top/tools/kaibanjs.md)

## 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

- [AgentKit GitHub repository](https://github.com/inngest/agent-kit)
- [AgentKit README](https://github.com/inngest/agent-kit/blob/main/packages/agent-kit/README.md)
- [@inngest/agent-kit package.json](https://github.com/inngest/agent-kit/blob/main/packages/agent-kit/package.json)
- [AgentKit LICENSE](https://github.com/inngest/agent-kit/blob/main/LICENSE.md)
- [AgentKit releases](https://github.com/inngest/agent-kit/releases)
- [@inngest/agent-kit 0.13.2 release](https://github.com/inngest/agent-kit/releases/tag/%40inngest/agent-kit%400.13.2)
- [AgentKit docs](https://agentkit.inngest.com/)
- [Agents (docs)](https://agentkit.inngest.com/concepts/agents)
- [Networks (docs)](https://agentkit.inngest.com/concepts/networks)
- [Routers (docs)](https://agentkit.inngest.com/concepts/routers)
- [Deterministic state routing (docs)](https://agentkit.inngest.com/advanced-patterns/routing)
- [State (docs)](https://agentkit.inngest.com/concepts/state)
- [History (docs)](https://agentkit.inngest.com/concepts/history)
- [Memory with Mem0 (docs)](https://agentkit.inngest.com/concepts/memory)
- [Models (docs)](https://agentkit.inngest.com/concepts/models)
- [MCP as tools (docs)](https://agentkit.inngest.com/advanced-patterns/mcp)
- [Human in the loop (docs)](https://agentkit.inngest.com/advanced-patterns/human-in-the-loop)
- [Deployment (docs)](https://agentkit.inngest.com/concepts/deployment)
- [useAgent React hook reference](https://agentkit.inngest.com/reference/use-agent)
- [Installation (docs)](https://agentkit.inngest.com/getting-started/installation)
- [Quick start (docs)](https://agentkit.inngest.com/getting-started/quick-start)
- [Changelog (docs)](https://agentkit.inngest.com/changelog/overview)
- [Inngest pricing](https://www.inngest.com/pricing)
- [AG-UI README, supported integrations](https://github.com/ag-ui-protocol/ag-ui/blob/main/README.md)

## 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.

---

Data as of 2026-09-30. Not affiliated with listed projects. HTML version: https://multiagentguide.top/tools/inngest-agentkit
