Integration
Long-term memory for Inngest AgentKit
Inngest AgentKit builds durable agents that survive restarts, retries, and queue shifts via Inngest's step engine, but the model's working memory still resets on every fresh run. `@lumetra/engram-agentkit` ships six AgentKit-compatible tools through `createEngramTools({...})`. Pass them to `createAgent` and the agent's durability-across-restarts now extends to what it actually knows, not just its execution graph.
Install
Three steps: sign up for an Engram API key, paste a BYOK LLM-provider key on /models, then drop the snippet below into Inngest AgentKit.
Three steps to memory in your agent
- Sign up. Free, no card. You'll land on a Getting Started page that walks the next two steps.
- Add your LLM key. Engram is BYOK. Paste an OpenAI / Anthropic / Groq / Together / Fireworks key and we'll route every extraction and query call through your provider. You pay your provider directly. We never see your inference.
- Paste the snippet below into your agent and restart it. Use
Authorization: Bearer <api-key>with the API key from your portal.
@lumetra/engram-agentkit: six tools for any createAgent
createEngramTools({ ... }) returns AgentKit-compatible tools you pass into createAgent. Pairs Inngest's durable step engine with durable memory. Source: github.com/lumetra-io/engram-agentkit.
- Install:
- Wire the tools into an AgentKit agent:
- For self-hosted Engram, pass
baseUrl: "https://engram.internal.example.com"tocreateEngramTools.
npm install @lumetra/engram-agentkit @inngest/agent-kitimport { createAgent, anthropic } from "@inngest/agent-kit";
import { createEngramTools } from "@lumetra/engram-agentkit";
const agent = createAgent({
name: "researcher",
system: "Use engram_query_memory before answering. Store stable facts.",
model: anthropic({ model: "claude-sonnet-4-5" }),
tools: createEngramTools({
apiKey: process.env.ENGRAM_API_KEY!,
bucket: "my-app",
}),
// AgentKit 0.13.2 Anthropic adapter bug — keep maxIter at 1 for tool flows.
maxIter: 1,
});What you can do once memory's wired in
- `tools: createEngramTools({ apiKey, bucket: 'my-app' })` on a `createAgent({...})` and the agent gets store/query/list/delete out of the box
- Pair Inngest's `step.run` retries with Engram's idempotent stores — a retried step can re-check memory instead of double-writing
- Per-user buckets via `createEngramTools({ apiKey, bucket: `user-${userId}` })` constructed per event
- Use the exported `EngramClient` directly inside a non-agent Inngest function for ETL-style memory ingestion
FAQ
Why is `maxIter: 1` recommended in the README?
AgentKit 0.13.2's Anthropic adapter throws `tool_use blocks can only be in assistant messages` when `maxIter >= 2` mid-loop. The bug is in how AgentKit serializes the tool-result message back to Claude — it's upstream, not in `@lumetra/engram-agentkit`. Keep `maxIter: 1` for Anthropic + tool flows until AgentKit fixes it; OpenAI / Gemini loops are unaffected.
Can I bring my own `EngramClient`?
Yes. `createEngramTools({ client })` accepts a pre-built `EngramClient` instead of `apiKey`. Handy when you want one shared client across Inngest functions, or a custom `fetch` for tracing.
Self-hosted Engram?
Pass `baseUrl: 'https://engram.internal.example.com'` to `createEngramTools(...)` (or to the underlying `EngramClient` constructor). Same six tools, your endpoint.
Related integrations
Ship durable memory in Inngest AgentKit today
Free tier: 10K memories and 50K retrievals per month. No credit card. Same Engram backend powers all 41 integrations, so memories you write from one client are immediately queryable from the rest.