A TypeScript library to create and orchestrate AI Agents.
import {
createNetwork,
createAgent,
openai,
anthropic,
} from "@inngest/agent-kit";
import { searchWebTool } from "./tools";
const navigator = createAgent({
name: "Navigator",
system: "You are a navigator...",
tools: [searchWebTool],
});
const classifier = createAgent({
name: "Classifier",
system: "You are a classifier...",
model: openai("gpt-3.5-turbo"),
});
const summarizer = createAgent({
model: anthropic("claude-3-5-haiku-latest"),
name: "Summarizer",
system: "You are a summarizer...",
});
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, ({ network }) => {
return defaultRoutingAgent;
});
llms.txt