Skip to content

Commit

Permalink
docs: update README (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlypoly authored Jan 17, 2025
1 parent 4d6b263 commit dd54d17
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docs/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Overview
description: 'Build test and deploy reliable AI applications at scale.'
description: 'A TypeScript library to create and orchestrate AI Agents.'
---

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.
Expand Down
65 changes: 38 additions & 27 deletions packages/agent-kit/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ![AgentKit by Inngest](./.github/logo.png)

<p align="center">
<a href="https://www.inngest.com/docs/agent-kit/overview?ref=github-agent-kit-readme">Documentation</a>
<a href="https://agentkit.inngest.com/overview">Documentation</a>
<span>&nbsp;·&nbsp;</span>
<a href="https://www.inngest.com/blog?ref=github-agent-kit-readme">Blog</a>
<span>&nbsp;·&nbsp;</span>
Expand All @@ -19,64 +19,75 @@ AgentKit is a framework for creating and orchestrating AI Agents, from single mo

## Overview

A networked agent:
Below is an example of a [Network](https://agentkit.inngest.com/concepts/networks) of three [Agents](https://agentkit.inngest.com/concepts/agents):

```ts
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", step }),
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 }) => {
// Use an agent which figures out the specific agent to call
// based off of the network's history.
return defaultRoutingAgent;
});
const result = await network.run(input);
```

A simple agent:

```ts
const writer = createAgent({
name: "writer",
system:
"You are an expert writer. You write readable, concise, simple content.",
model: openai({ model: "gpt-4o", step }),
});

const { output } = await writer.run(
"Describe the ideas behind the given input into clear topics, and explain any insight: " +
`<content>${content}</content>`,
);
```
The Network will dynamically route the input to the appropriate Agent based on provided `input` and current [Network State](https://agentkit.inngest.com/concepts/state).
AgentKit is flexible and allows for custom routing logic, tools, and the configuration of models at the Agent-level (_Mixture of Models_).

## Installation

Agent kit requires the [Inngest TypeScript SDK](https://github.com/inngest/inngest-js) as a dependency. You can install both via `npm` or similar:
You can install AgentKit via `npm` or similar:

```shell {{ title: "npm" }}
npm install @inngest/agent-kit inngest
```

Follow the [Getting Started](https://agentkit.inngest.com/getting-started/quick-start) guide to learn more about AgentKit.

## Documentation

The full Agent kit documentation is available
[here](https://www.inngest.com/docs/agent-kit/overview). You can also jump to
specific guides and references:

- [Agents and Tools](https://www.inngest.com/docs/agent-kit/ai-agents-tools)
- [Network, state, and routing](https://www.inngest.com/docs/agent-kit/ai-agent-network-state-routing)
- [Agents and Tools](https://agentkit.inngest.com/concepts/agents)
- [Network, State, and Routing](https://agentkit.inngest.com/concepts/networks)

## Examples

See Agent kit in action in fully functioning example projects:

- [Test Writing Network](/demo#readme) - A ready-to-deploy Next.js demo using the Workflow Kit, Supabase, and OpenAI to power some AI content workflows.
- [Hacker News Agent with Render and Inngest](https://github.com/inngest/agentkit-render-tutorial): A tutorial showing how to create a Hacker News Agent using AgentKit Code-style routing and Agents with tools.

- [AgentKit SWE-bench](https://github.com/inngest/agent-kit/tree/main/examples/swebench#readme): 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.

## License

Expand Down

0 comments on commit dd54d17

Please sign in to comment.