Your personal memory, across sessions, agents, and devices.

Inngest for AI Agents: Durable Execution and Memory

memU Team memU Team

Inngest is a workflow platform that makes long-running code durable. Each step's result is saved, so a crash or a retry does not repeat finished work. Agents need this because model calls are slow and sometimes fail, and you do not want to pay for the same one twice. Inngest also ships AgentKit, its TypeScript framework for building agent networks. Saved step results are easy to mistake for memory, and the last sections explain where one ends and the other begins.

What is Inngest durable execution, in one sentence?

Inngest durable execution splits a function into named steps, saves each step's result as a checkpoint, and replays the function from those checkpoints so finished steps never run twice.

Per the execution docs, a trigger such as an event or a schedule starts a run. Inngest saves each successful step's result outside your function. On the next call to your handler, the SDK returns those saved results and skips the code that produced them. The run can resume on a different machine.

Inngest has SDKs for four languages, including TypeScript and Python. The SDKs are Apache 2.0. Per its GitHub repository, the server uses the Server Side Public License, with delayed publication under Apache 2.0. You can self-host the server or use Inngest Cloud.

How does Inngest differ from a plain agent loop?

Most agent code is a loop in one process: call the model, run a tool, repeat. Inngest moves the loop's progress out of process memory.

Plain agent loop in one process Inngest function with steps
Where progress lives Process memory Inngest's run state, outside your app
After a crash Starts over Resumes from the last saved step
Retries Whatever you code Per step, only the failed step reruns
Waiting for a human Holds a process or needs your own queue step.waitForEvent pauses without holding compute
Paying for model latency Your server waits on the provider step.ai.infer offloads the wait to Inngest
Memory across runs None by default None by default. Bring a history store or memory provider

Sources: Inngest's execution docs and AI orchestration docs.

How does Inngest handle AI model calls?

Inngest has two AI-specific step types (AI orchestration docs).

step.ai.infer sends the inference request through Inngest's infrastructure and pauses your function until the response comes back. On serverless platforms your function stops during that wait, so you pay nothing while the model thinks. Supported providers include OpenAI-compatible APIs and Anthropic, among others. Requests and responses appear in the run's trace. Inngest says it does not log or store your API keys.

step.ai.wrap is TypeScript only. It wraps an existing SDK call, such as an OpenAI or Anthropic client, so each call becomes a step with tracing. Streaming responses are not supported yet.

Anything outside a step runs again on every replay, which hurts most in agent code full of model and tool calls. Put those calls inside steps. A step can also finish its side effect before Inngest saves the result. Make steps like refunds idempotent.

What does AgentKit add for history and memory?

AgentKit builds on agents, each with a system prompt and its tools, which can include MCP servers. Networks combine agents, and a router picks which agent runs next. The docs call the shared state of a network its memory. Everything in the network reads and writes it during a run.

That network state lasts for one run. For conversations that continue, AgentKit has a history adapter. The history docs define four optional methods. One creates or upserts a thread and one loads earlier results. The other two append the user's message and the new results. AgentKit is database-agnostic, and its starter uses PostgreSQL.

For facts that should outlive a thread, the memory docs show an integration with Mem0. The agent gets tools to save and recall memories, plus tools to update or delete them. Write tools send an Inngest event, and a separate background function calls Mem0. The agent can reply right away, and Inngest retries failed memory writes.

What does Inngest cost?

The pricing page meters executions per function run and per step. A function with five step.run calls uses six executions. The free plan includes 50,000 executions a month with 24 hours of trace history. Pro starts at $99 a month with 1 million executions and 7 days of history. Agent workflows are step-heavy, so count model calls and tool calls when you estimate usage.

What is the difference between durable state and agent memory?

Durable state is the saved result of each step in one run. Memory is what a later run can read about earlier ones.

Inngest's saved step results let one run finish despite crashes and long waits. A new run starts with none of them. Say a support agent learns on Monday that a customer prefers email. On Tuesday's run it will not know, unless something saved that fact where the next run reads it. AgentKit's history adapter keeps one thread. Its Mem0 integration keeps the facts you choose to save, and you wire up both yourself.

The bottom line

Use Inngest when an agent workflow has slow model calls or tool calls that must not run twice after a failure. Put every model and tool call inside a step, and make side-effecting steps idempotent. Add AgentKit's history adapter for multi-turn threads. Treat long-term memory as a separate design decision with its own store.

How do coding agents remember your Inngest conventions between sessions?

Inngest has rules that are easy to forget: code outside a step reruns on every replay, and a step with side effects must be idempotent. A coding agent writing your Inngest functions has to learn these rules for your repository. By default it learns them again in every new session. If you use two hosts, each one learns them on its own.

memU is a memory system for those agent hosts. It does not plug into AgentKit as a memory provider. A scheduled background task slices new session logs into jobs. The agent decides what is worth keeping and writes memory or skill Markdown, for example a skill for "how we write Inngest steps." memU itself makes no LLM or chat calls. It stores and retrieves what the agent wrote. A standing instruction in CLAUDE.md or AGENTS.md tells the agent to retrieve before answering. All hosts share one backend, so a rule learned in Codex is available in Claude Code.

To try the hosted version, which is free and syncs across devices, get an API key from memu.so and send your agent one message:

Read https://memu.pro/SKILL.md, follow its instructions to install and configure memU, API Key is YOUR_MEMU_API_KEY.

The self-hosted setup and the list of supported hosts are in the memU GitHub repository.

FAQ

Is Inngest good for AI agents?

It fits agents with slow or flaky model calls and long waits. Inngest saves each step's result and retries a failed step on its own. AgentKit adds agent networks and conversation history on top.

What is Inngest AgentKit?

AgentKit is Inngest's TypeScript framework for building agents and multi-agent networks. It adds routers and shared network state. A history adapter keeps threads, and an optional Mem0 integration keeps long-term facts.

Does Inngest store agent memory?

Inngest stores run state, meaning each completed step's result, so a run can resume. Memory across runs needs a history store or a memory provider such as Mem0.

Is Inngest open source?

The SDKs are Apache 2.0. The server and CLI use the Server Side Public License with delayed publication under Apache 2.0, and you can self-host the server.

How does Inngest count executions?

Each function run counts as one execution and each step as another. A function with five steps uses six executions.