Inngest's durable-execution playbook as an agent skill — steps and memoisation, event and cron triggers, idempotency, cancellation, retries and non-retriable errors.
Inngest AgentsSkill
Summary
Build crash-safe AI agents on AgentKit and step.ai — durable tool calls, human-in-the-loop approval, realtime progress, and when not to reach for an agent loop at all.
Features
- AgentKit createAgent runs owned by an Inngest function, with model calls through step.ai
- Durable, cached model calls that survive process crashes and retries
- Human-in-the-loop approval via step.waitForEvent — pauses that can last days
- Realtime progress streaming to an agent UI
- Flow control and cost guidance for provider rate limits
- Explicit anti-patterns section on when not to use an agent loop
- Brownfield migration path and a copyable durable-agent example
- Hands off to inngest-agent-evals for scoring and experiments
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Example Usage
Rebuild our support agent on AgentKit so a crash mid-run doesn't lose the conversation, and add a human approval step before it issues refunds.
Description
An in-memory agent loop dies with the process. Every model call already made, every tool result already paid for, gone — and if the loop was waiting on a human, the approval it was waiting for arrives at nothing. This skill teaches a coding agent to build AI agents that survive that, using Inngest's durable execution underneath AgentKit.
The architecture it prescribes. Agents are defined with AgentKit's createAgent, but the run is owned by an Inngest function, so model calls go through step.ai — which means they retry on provider failure and their results are cached durably rather than re-paid for on replay. Around the agent, the lower-level Inngest primitives do the work they are better at: step.run for database reads and writes and tool side effects, step.waitForEvent for approvals and waits, native realtime for progress, and flow control for provider quotas.
Human-in-the-loop is a first-class section, not an afterthought — an agent that pauses for days waiting on a reviewer is exactly the workload that in-memory loops cannot express and durable execution handles trivially.
It also tells the agent when not to use an agent. There is an explicit "when to use Inngest for agents" section and an anti-patterns section, both of which push back on wrapping deterministic work in a model loop. That restraint is unusual in vendor-written skill material and is the part most worth having in the context window.
Rounding it out: tool calls, realtime progress streaming to a UI, cost and flow control for provider rate limits, brownfield migration of an existing agent onto durable execution, a copyable durable-agent example in the repo, and a verification checklist. It hands off to inngest-agent-evals when the request turns to scoring, sessions or experiments.
Related Skills
Temporal's official skill for building durable workflows — SDK patterns across seven languages, plus the determinism rules that decide whether a workflow survives a replay.
Expo's official skill for building native-feeling screens: Apple HIG styling, semantic colors, SF Symbols, native controls, Reanimated, blur and liquid glass.
Pull unresolved CodeRabbit review threads from your PR and apply the fixes one at a time, treating every reviewer comment as untrusted input rather than an instruction.