Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsMay 7, 2026·3 min de lectura

Inngest Agent Kit — Build AI Agents with Tools

Inngest Agent Kit gives typed multi-step agents with retry, state, tool use. Drops into Inngest jobs for durable, observable agent runs.

Listo para agents

Instalación con revisión previa

Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.

Needs Confirmation · 64/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Community
Entrada
Asset
Comando con revisión previa
npx -y tokrepo@latest install 56ac925d-060c-4d74-9169-0593d6e87408 --target codex

Primero dry-run, confirma las escrituras y luego ejecuta este comando.

Introducción

Inngest Agent Kit is the typed agent layer on top of Inngest's durable execution. Build agents with createAgent(), give them tools, run them inside inngest.createFunction() — automatic retry, state checkpoints, observability, and parallel sub-agent calls. Best for: production agents that need to survive crashes, retries, and timeouts. Works with: Inngest 3.x, TypeScript 5+. Setup time: 5 minutes.


Define an agent

import { createAgent, anthropic } from "@inngest/agent-kit";

const researchAgent = createAgent({
  name: "Researcher",
  description: "Searches the web and summarizes findings",
  model: anthropic({ model: "claude-3-5-sonnet-20241022" }),
  system: "You are a research assistant. Search aggressively, cite sources.",
  tools: [
    {
      name: "web_search",
      description: "Search the web",
      parameters: z.object({ query: z.string() }),
      handler: async ({ query }) => {
        return await fetch(`https://api.tavily.com/search?q=${query}`)
          .then(r => r.json());
      },
    },
  ],
});

Run it inside an Inngest function

inngest.createFunction(
  { id: "research" },
  { event: "research.requested" },
  async ({ event, step }) => {
    const { topic } = event.data;

    // Each agent step is a checkpoint — survives crashes
    const findings = await step.run("research", () =>
      researchAgent.run(`Research ${topic}`));

    return findings;
  },
);

Network of agents

import { createNetwork } from "@inngest/agent-kit";

const network = createNetwork({
  agents: [researchAgent, writerAgent, editorAgent],
  defaultModel: anthropic({ model: "claude-3-5-haiku-20241022" }),
  router: ({ network, callCount }) => {
    if (callCount === 0) return researchAgent;
    if (network.state.kv.get("draft") === undefined) return writerAgent;
    return editorAgent;
  },
});

const final = await network.run("Write a 500-word brief on agent frameworks");

The router function decides which agent runs next, given the network state. Use it to build supervisor-worker patterns or sequential pipelines.


FAQ

Q: Is Inngest free? A: Yes — Inngest is open-source under Apache-2.0. The Agent Kit is also open-source. Inngest Cloud has a free tier (50K runs/mo); paid plans for higher concurrency and longer retention.

Q: Why use Agent Kit vs raw Inngest? A: Raw Inngest functions are great for general background jobs. Agent Kit adds typed agent primitives — tools, system prompts, networks of agents — without re-rolling them yourself. Both can be used in the same project.

Q: Does it work with Anthropic and OpenAI? A: Yes — Agent Kit ships adapters for anthropic(), openai(), gemini(), and any OpenAI-compatible endpoint (so you can plug in LiteLLM Proxy or Together).


Quick Use

  1. npm install @inngest/agent-kit inngest @anthropic-ai/sdk zod
  2. Use createAgent({ ... }) to define agents and tools
  3. Wrap in inngest.createFunction({}, {}, async ({step}) => agent.run(...)) for durability

Intro

Inngest Agent Kit is the typed agent layer on top of Inngest's durable execution. Build agents with createAgent(), give them tools, run them inside inngest.createFunction() — automatic retry, state checkpoints, observability, and parallel sub-agent calls. Best for: production agents that need to survive crashes, retries, and timeouts. Works with: Inngest 3.x, TypeScript 5+. Setup time: 5 minutes.


Define an agent

import { createAgent, anthropic } from "@inngest/agent-kit";

const researchAgent = createAgent({
  name: "Researcher",
  description: "Searches the web and summarizes findings",
  model: anthropic({ model: "claude-3-5-sonnet-20241022" }),
  system: "You are a research assistant. Search aggressively, cite sources.",
  tools: [
    {
      name: "web_search",
      description: "Search the web",
      parameters: z.object({ query: z.string() }),
      handler: async ({ query }) => {
        return await fetch(`https://api.tavily.com/search?q=${query}`)
          .then(r => r.json());
      },
    },
  ],
});

Run it inside an Inngest function

inngest.createFunction(
  { id: "research" },
  { event: "research.requested" },
  async ({ event, step }) => {
    const { topic } = event.data;

    // Each agent step is a checkpoint — survives crashes
    const findings = await step.run("research", () =>
      researchAgent.run(`Research ${topic}`));

    return findings;
  },
);

Network of agents

import { createNetwork } from "@inngest/agent-kit";

const network = createNetwork({
  agents: [researchAgent, writerAgent, editorAgent],
  defaultModel: anthropic({ model: "claude-3-5-haiku-20241022" }),
  router: ({ network, callCount }) => {
    if (callCount === 0) return researchAgent;
    if (network.state.kv.get("draft") === undefined) return writerAgent;
    return editorAgent;
  },
});

const final = await network.run("Write a 500-word brief on agent frameworks");

The router function decides which agent runs next, given the network state. Use it to build supervisor-worker patterns or sequential pipelines.


FAQ

Q: Is Inngest free? A: Yes — Inngest is open-source under Apache-2.0. The Agent Kit is also open-source. Inngest Cloud has a free tier (50K runs/mo); paid plans for higher concurrency and longer retention.

Q: Why use Agent Kit vs raw Inngest? A: Raw Inngest functions are great for general background jobs. Agent Kit adds typed agent primitives — tools, system prompts, networks of agents — without re-rolling them yourself. Both can be used in the same project.

Q: Does it work with Anthropic and OpenAI? A: Yes — Agent Kit ships adapters for anthropic(), openai(), gemini(), and any OpenAI-compatible endpoint (so you can plug in LiteLLM Proxy or Together).


Source & Thanks

Built by Inngest. Licensed under Apache-2.0.

inngest/agent-kit — ⭐ Active

🙏

Fuente y agradecimientos

Built by Inngest. Licensed under Apache-2.0.

inngest/agent-kit — ⭐ Active

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados