Cette page est affichée en anglais. Une traduction française est en cours.
WorkflowsMay 7, 2026·3 min de lecture

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.

Inngest
Inngest · Community
Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Needs Confirmation · 52/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : New
Point d'entrée
Asset
Commande CLI universelle
npx tokrepo install 56ac925d-060c-4d74-9169-0593d6e87408
Introduction

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

🙏

Source et remerciements

Built by Inngest. Licensed under Apache-2.0.

inngest/agent-kit — ⭐ Active

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires