Skip to content

Commit e35c72c

Browse files
authored
Convert docs to Astro Starlight (#310)
* Convert docs to Astro Starlight * Add llms.txt * Design improvements * Update header. Add redirect * Add copy as md
1 parent fc28437 commit e35c72c

104 files changed

Lines changed: 14677 additions & 3015 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
.astro/

docs/README.md

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,77 @@
1-
# AgentKit documentation
1+
# AgentKit Documentation
22

3-
This documentation is built using MDX and Mintlify. Run the following commands to get started:
3+
Built with [Astro Starlight](https://starlight.astro.build/). Deployed on Vercel.
4+
5+
## Setup
6+
7+
```sh
8+
cd docs
9+
npm install
10+
```
11+
12+
## Development
13+
14+
```sh
15+
npm run dev
16+
```
17+
18+
Opens a local server at `http://localhost:4321`.
19+
20+
## Build
21+
22+
```sh
23+
npm run build
24+
npm run preview # preview the build locally
25+
```
26+
27+
## Project structure
428

529
```
6-
npm i -g mintlify
7-
mintlify dev
30+
docs/
31+
astro.config.mjs # Starlight config (sidebar, theme, redirects, analytics)
32+
vercel.json # Vercel redirect rules
33+
public/
34+
brand/ # Logos and favicon
35+
graphics/ # Images used in docs
36+
src/
37+
content/docs/ # All MDX content pages
38+
components/
39+
ParamField.astro # API parameter documentation component
40+
Update.astro # Changelog entry component
41+
styles/custom.css # Theme overrides (green accent, component styles)
42+
content.config.ts # Astro content collection config
843
```
944

10-
## Deploying
45+
## Adding content
46+
47+
Pages are MDX files in `src/content/docs/`. The file path determines the URL (e.g. `concepts/agents.mdx` becomes `/concepts/agents`).
48+
49+
Sidebar navigation is configured manually in `astro.config.mjs` under the `sidebar` array.
50+
51+
### Available components
52+
53+
```mdx
54+
import { LinkCard, CardGrid } from '@astrojs/starlight/components';
55+
import { Steps } from '@astrojs/starlight/components';
56+
import { Tabs, TabItem } from '@astrojs/starlight/components';
57+
import ParamField from '../../components/ParamField.astro';
58+
import Update from '../../components/Update.astro';
59+
```
60+
61+
Admonitions use markdown syntax:
62+
63+
```md
64+
:::note
65+
Note content.
66+
:::
67+
68+
:::tip[Optional title]
69+
Tip content.
70+
:::
71+
```
72+
73+
## Deployment
74+
75+
Deployed via Vercel with the project root set to `docs/`. Framework preset: Astro.
1176

12-
The docs site is always updated whenever the `main` branch is updated in this repo.
77+
Redirects are defined in both `astro.config.mjs` (for dev/build) and `vercel.json` (for Vercel edge).

docs/advanced-patterns/retries.mdx

Lines changed: 0 additions & 71 deletions
This file was deleted.

docs/astro.config.mjs

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
import { defineConfig } from "astro/config";
2+
import starlight from "@astrojs/starlight";
3+
import starlightLlmsTxt from "starlight-llms-txt";
4+
import starlightCopyButton from "starlight-copy-button";
5+
6+
export default defineConfig({
7+
site: "https://agentkit.inngest.com",
8+
trailingSlash: "never",
9+
integrations: [
10+
starlight({
11+
title: "AgentKit by Inngest",
12+
plugins: [
13+
starlightLlmsTxt(),
14+
starlightCopyButton({
15+
label: "Copy as markdown",
16+
}),
17+
],
18+
logo: {
19+
light: "./public/brand/logo-light.svg",
20+
dark: "./public/brand/logo-dark.svg",
21+
replacesTitle: true,
22+
},
23+
favicon: "/brand/favicon.png",
24+
social: [
25+
{
26+
icon: "github",
27+
label: "GitHub",
28+
href: "https://github.com/inngest/agent-kit",
29+
},
30+
{
31+
icon: "discord",
32+
label: "Community",
33+
href: "https://www.inngest.com/discord",
34+
},
35+
{
36+
icon: "x.com",
37+
label: "X",
38+
href: "https://x.com/inngest",
39+
},
40+
],
41+
customCss: ["./src/styles/custom.css"],
42+
head: [
43+
{
44+
tag: "script",
45+
attrs: {
46+
async: true,
47+
src: "https://www.googletagmanager.com/gtag/js?id=G-PPJW3MPTNX",
48+
},
49+
},
50+
{
51+
tag: "script",
52+
content:
53+
"window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag('js',new Date());gtag('config','G-PPJW3MPTNX');",
54+
},
55+
],
56+
components: {
57+
SocialIcons: "./src/components/SocialIcons.astro",
58+
},
59+
sidebar: [
60+
{
61+
label: "Get Started",
62+
items: [
63+
{ label: "Overview", slug: "" },
64+
{ label: "Quick Start", slug: "getting-started/quick-start" },
65+
{ label: "Installation", slug: "getting-started/installation" },
66+
{
67+
label: "Local Development",
68+
slug: "getting-started/local-development",
69+
},
70+
],
71+
},
72+
{
73+
label: "Concepts",
74+
items: [
75+
{ label: "Agents", slug: "concepts/agents" },
76+
{ label: "Tools", slug: "concepts/tools" },
77+
{ label: "Networks", slug: "concepts/networks" },
78+
{ label: "State", slug: "concepts/state" },
79+
{ label: "Routers", slug: "concepts/routers" },
80+
{ label: "History", slug: "concepts/history" },
81+
{ label: "Memory", slug: "concepts/memory" },
82+
{ label: "Models", slug: "concepts/models" },
83+
{ label: "Deployment", slug: "concepts/deployment" },
84+
],
85+
},
86+
{
87+
label: "Streaming",
88+
items: [
89+
{ label: "Overview", slug: "streaming/overview" },
90+
{ label: "Usage Guide", slug: "streaming/usage-guide" },
91+
{ label: "Events", slug: "streaming/events" },
92+
{ label: "Transport", slug: "streaming/transport" },
93+
{ label: "Provider", slug: "streaming/provider" },
94+
],
95+
},
96+
{
97+
label: "Advanced Patterns",
98+
items: [
99+
{ label: "Routing", slug: "advanced-patterns/routing" },
100+
{ label: "MCP", slug: "advanced-patterns/mcp" },
101+
{
102+
label: "Human in the Loop",
103+
slug: "advanced-patterns/human-in-the-loop",
104+
},
105+
{
106+
label: "Multi-step Tools",
107+
slug: "advanced-patterns/multi-steps-tools",
108+
},
109+
{ label: "Retries", slug: "advanced-patterns/retries" },
110+
{
111+
label: "Multitenancy",
112+
slug: "advanced-patterns/multitenancy",
113+
},
114+
{
115+
label: "Legacy UI Streaming",
116+
slug: "advanced-patterns/legacy-ui-streaming",
117+
},
118+
],
119+
},
120+
{
121+
label: "Guided Tour",
122+
items: [
123+
{ label: "Overview", slug: "guided-tour/overview" },
124+
{ label: "AI Workflows", slug: "guided-tour/ai-workflows" },
125+
{
126+
label: "Agentic Workflows",
127+
slug: "guided-tour/agentic-workflows",
128+
},
129+
{ label: "AI Agents", slug: "guided-tour/ai-agents" },
130+
],
131+
},
132+
{
133+
label: "Integrations",
134+
items: [
135+
{ label: "E2B", slug: "integrations/e2b" },
136+
{ label: "Browserbase", slug: "integrations/browserbase" },
137+
{ label: "Smithery", slug: "integrations/smithery" },
138+
{ label: "Daytona", slug: "integrations/daytona" },
139+
],
140+
},
141+
{
142+
label: "Examples",
143+
items: [{ label: "Examples", slug: "examples/overview" }],
144+
},
145+
{
146+
label: "Reference",
147+
items: [
148+
{ label: "Introduction", slug: "reference/introduction" },
149+
{ label: "createAgent", slug: "reference/create-agent" },
150+
{ label: "createTool", slug: "reference/create-tool" },
151+
{ label: "createNetwork", slug: "reference/create-network" },
152+
{ label: "State", slug: "reference/state" },
153+
{ label: "Network Router", slug: "reference/network-router" },
154+
{ label: "useAgent", slug: "reference/use-agent" },
155+
{ label: "OpenAI", slug: "reference/model-openai" },
156+
{ label: "Anthropic", slug: "reference/model-anthropic" },
157+
{ label: "Gemini", slug: "reference/model-gemini" },
158+
{ label: "Grok", slug: "reference/model-grok" },
159+
],
160+
},
161+
{
162+
label: "React Hooks",
163+
items: [
164+
{
165+
label: "Overview",
166+
slug: "reference/react-hooks/overview",
167+
},
168+
{
169+
label: "AgentProvider",
170+
slug: "reference/react-hooks/agent-provider",
171+
},
172+
{
173+
label: "useAgent",
174+
slug: "reference/react-hooks/use-agent",
175+
},
176+
{
177+
label: "useChat",
178+
slug: "reference/react-hooks/use-chat",
179+
},
180+
],
181+
},
182+
{
183+
label: "Changelog",
184+
items: [{ label: "Changelog", slug: "changelog/overview" }],
185+
},
186+
],
187+
}),
188+
],
189+
redirects: {
190+
"/overview": "/",
191+
"/reference/create-typed-tool": "/reference/create-tool",
192+
"/ai-agents-in-practice/overview": "/guided-tour/overview",
193+
"/ai-agents-in-practice/ai-agents": "/guided-tour/ai-agents",
194+
"/ai-agents-in-practice/ai-workflows": "/guided-tour/ai-workflows",
195+
"/ai-agents-in-practice/agentic-workflows":
196+
"/guided-tour/agentic-workflows",
197+
},
198+
});

docs/concepts/architecture.mdx

Whitespace-only changes.

0 commit comments

Comments
 (0)