Documentation · Blog · Community
AgentKit is a framework for creating and orchestrating AI Agents, from single model inference calls to multi-agent systems that use tools. Designed with orchestration at it’s core, AgentKit enables developers to build, test, and deploy reliable AI applications at scale.
Below is an example of a Network of three Agents:
import {
createNetwork,
createAgent,
openai,
anthropic,
} from "@inngest/agent-kit";
const navigator = createAgent({
name: "Navigator",
system: "You are a navigator...",
});
const classifier = createAgent({
name: "Classifier",
system: "You are a classifier...",
model: openai("gpt-3.5-turbo"),
});
const summarizer = createAgent({
name: "Summarizer",
system: "You are a summarizer...",
model: anthropic("claude-3-5-haiku-latest"),
});
// Create a network of agents with separate tasks and instructions
// to solve a specific task.
const network = createNetwork({
agents: [navigator, classifier, summarizer],
defaultModel: openai({ model: "gpt-4o" }),
});
const input = `Classify then summarize the latest 10 blog posts
on https://www.deeplearning.ai/blog/`;
const result = await network.run(input);
The Network will dynamically route the input to the appropriate Agent based on provided input
and current Network State.
AgentKit is flexible and allows for custom routing logic, tools, and the configuration of models at the Agent-level (Mixture of Models).
You can install AgentKit via npm
or similar:
npm install @inngest/agent-kit inngest
Follow the Getting Started guide to learn more about AgentKit.
The full Agent kit documentation is available here. You can also jump to specific guides and references:
See Agent kit in action in fully functioning example projects:
-
Hacker News Agent with Render and Inngest: A tutorial showing how to create a Hacker News Agent using AgentKit Code-style routing and Agents with tools.
-
AgentKit SWE-bench: This AgentKit example uses the SWE-bench dataset to train an agent to solve coding problems. It uses advanced tools to interact with files and codebases.