Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
704b002
[docs] Add AI Agent docs
VaguelySerious Nov 26, 2025
0a65357
Fix scrolling of left sidebar
VaguelySerious Nov 26, 2025
eb49e18
Polish
VaguelySerious Nov 26, 2025
e83bbf3
Empty changeset
VaguelySerious Nov 26, 2025
8e8acab
Polish
VaguelySerious Nov 26, 2025
51e7aac
Move to new section
VaguelySerious Nov 26, 2025
108ac78
Polish
VaguelySerious Nov 26, 2025
b04412d
Show more code snippets and full state
VaguelySerious Nov 26, 2025
4811a94
Fix
VaguelySerious Nov 26, 2025
da6e94e
Delete previous
VaguelySerious Nov 26, 2025
2b3c672
fix
VaguelySerious Nov 26, 2025
7f3514f
Fix routing
VaguelySerious Nov 26, 2025
11edb5b
Add nice graphic
VaguelySerious Nov 26, 2025
64d7265
Polish
VaguelySerious Nov 26, 2025
afdb0b1
Package install polish
VaguelySerious Nov 26, 2025
465c18d
CHanges
VaguelySerious Nov 26, 2025
5dada91
Human in the loop polish
VaguelySerious Nov 27, 2025
6db66ec
Polish sleep docs
VaguelySerious Nov 27, 2025
596f7ad
Tool polish
VaguelySerious Nov 27, 2025
756a11c
Move sections
VaguelySerious Nov 27, 2025
739f732
love these graphs
VaguelySerious Nov 27, 2025
dad2a63
remove auto-close example
VaguelySerious Nov 27, 2025
249bf54
Queueing
VaguelySerious Nov 27, 2025
634df7f
prepareStep, queueing, and modeling
VaguelySerious Nov 27, 2025
bbe7df9
Small polish
VaguelySerious Nov 27, 2025
7e50e2e
remove unneeded file
VaguelySerious Nov 27, 2025
e97a2b3
Polish pass
VaguelySerious Nov 27, 2025
9a1a2b5
Update multi-turn example
VaguelySerious Nov 27, 2025
87aa49f
Empty commit
VaguelySerious Nov 27, 2025
719700e
Merge branch 'main' into peter/agent-docs
VaguelySerious Nov 27, 2025
1bb9007
Merge branch 'main' into peter/agent-docs
VaguelySerious Nov 29, 2025
e7da651
Polish
VaguelySerious Nov 29, 2025
6a083cb
Rename and link
VaguelySerious Nov 29, 2025
a07664d
Make web the default viewer for observability in getting-started guide
VaguelySerious Nov 30, 2025
5d7907e
Remove "defining tools" page in favor of adding a small section to th…
VaguelySerious Nov 30, 2025
7656c9c
Highlight selected header items
VaguelySerious Nov 30, 2025
239c671
New example query for docs search
VaguelySerious Nov 30, 2025
ee0ed68
Add all of the example and setup code
VaguelySerious Nov 30, 2025
1db89f9
Split out section about streaming updates from tools
VaguelySerious Nov 30, 2025
36229c7
Updates
VaguelySerious Nov 30, 2025
57b1f08
Merge branch 'main' into peter/agent-docs
VaguelySerious Dec 1, 2025
730ae6b
Fix discrepancy
VaguelySerious Dec 1, 2025
7fee408
Merge branch 'main' into peter/agent-docs
VaguelySerious Dec 1, 2025
d97aa96
Updates
VaguelySerious Dec 1, 2025
4c73e4c
Move section
VaguelySerious Dec 1, 2025
a3332c3
Move from Guides to Docs
VaguelySerious Dec 1, 2025
e40b1f1
Fix
VaguelySerious Dec 1, 2025
2e3619b
fix
VaguelySerious Dec 1, 2025
0a92f19
Remove leftover code from guides tab
VaguelySerious Dec 1, 2025
98ff14a
Fix links
VaguelySerious Dec 1, 2025
26a9003
Merge branch 'main' into peter/agent-docs
VaguelySerious Dec 1, 2025
5ed31b7
Slight polish
VaguelySerious Dec 1, 2025
ec64765
Small polish
VaguelySerious Dec 1, 2025
8c35723
Fix
VaguelySerious Dec 1, 2025
0b13c8e
Initial plan
Copilot Dec 2, 2025
3fc49a6
Merge remote-tracking branch 'origin/main' into copilot/sub-pr-443
Copilot Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/three-hands-open.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
10 changes: 5 additions & 5 deletions docs/app/(home)/components/frameworks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ export const Vite = (props: ComponentProps<'svg'>) => (
y2="344"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#41D1FF" />
<stop offset="1" stop-color="#BD34FE" />
<stop stopColor="#41D1FF" />
<stop offset="1" stopColor="#BD34FE" />
</linearGradient>
<linearGradient
id="paint1_linear_16_2"
Expand All @@ -190,9 +190,9 @@ export const Vite = (props: ComponentProps<'svg'>) => (
y2="292.989"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#FFEA83" />
<stop offset="0.0833333" stop-color="#FFDD35" />
<stop offset="1" stop-color="#FFA800" />
<stop stopColor="#FFEA83" />
<stop offset="0.0833333" stopColor="#FFDD35" />
<stop offset="1" stopColor="#FFA800" />
</linearGradient>
</defs>
</svg>
Expand Down
2 changes: 2 additions & 0 deletions docs/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { createRelativeLink } from 'fumadocs-ui/mdx';
import { notFound } from 'next/navigation';
import { AgentTraces } from '@/components/custom/agent-traces';
import { AskAI } from '@/components/geistdocs/ask-ai';
import { CopyPage } from '@/components/geistdocs/copy-page';
import {
Expand Down Expand Up @@ -61,6 +62,7 @@ const Page = async (props: PageProps<'/docs/[[...slug]]'>) => {
a: createRelativeLink(source, page),

// Add your custom components here
AgentTraces,
Badge,
TSDoc,
Step,
Expand Down
1 change: 1 addition & 0 deletions docs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const suggestions = [
'How does retrying work?',
'What control flow patterns are there?',
'How do directives work?',
'How do I build an AI agent?',
];

const Layout = ({ children }: LayoutProps<'/'>) => (
Expand Down
139 changes: 139 additions & 0 deletions docs/components/custom/agent-traces.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
'use client';

import { motion } from 'motion/react';
import { cn } from '@/lib/utils';

// Color presets for trace rows
const colors = {
workflow:
'bg-[#E1F0FF] dark:bg-[#00254D] border-[#99CEFF] text-[#0070F3] dark:border-[#0067D6] dark:text-[#52AEFF]',
stream:
'bg-[#DCF6DC] dark:bg-[#1B311E] border-[#99E59F] text-[#46A758] dark:border-[#297C3B] dark:text-[#6CDA76]',
tool: 'bg-[#FFF4E5] dark:bg-[#3D2800] border-[#FFCC80] text-[#F5A623] dark:border-[#9A6700] dark:text-[#FFCA28]',
approval:
'bg-[#FCE7F3] dark:bg-[#4A1D34] border-[#F9A8D4] text-[#EC4899] dark:border-[#BE185D] dark:text-[#F472B6]',
webhook:
'bg-[#EDE9FE] dark:bg-[#2E1065] border-[#C4B5FD] text-[#7C3AED] dark:border-[#6D28D9] dark:text-[#A78BFA]',
};

type TraceRow = {
label: string;
className: string;
start: number;
duration: number;
};

const defaultRows: TraceRow[] = [
{
label: 'chatWorkflow',
className: colors.workflow,
start: 0,
duration: 100,
},
{ label: 'agent.stream', className: colors.stream, start: 2, duration: 16 },
{ label: 'searchWeb', className: colors.tool, start: 20, duration: 13 },
{ label: 'agent.stream', className: colors.stream, start: 37, duration: 16 },
{
label: 'waitForHumanApproval',
className: colors.approval,
start: 57,
duration: 24,
},
{ label: 'agent.stream', className: colors.stream, start: 84, duration: 16 },
];

const messageQueueRows: TraceRow[] = [
{
label: 'chatWorkflow',
className: colors.workflow,
start: 0,
duration: 100,
},
{ label: 'agent.stream', className: colors.stream, start: 2, duration: 16 },
{
label: 'hook.enqueue()',
className: colors.webhook,
start: 12,
duration: 24,
},
{
label: 'tool.checkDB()',
className: colors.tool,
start: 18,
duration: 18,
},
{ label: 'agent.stream', className: colors.stream, start: 36, duration: 16 },
{
label: 'hook.enqueue()',
className: colors.webhook,
start: 46,
duration: 24,
},
{
label: 'tool.search()',
className: colors.tool,
start: 52,
duration: 18,
},
{ label: 'agent.stream', className: colors.stream, start: 70, duration: 16 },
];

const variants = {
default: defaultRows,
'message-queue': messageQueueRows,
} as const;

type Variant = keyof typeof variants;

interface AgentTracesProps {
variant?: Variant;
}

export const AgentTraces = ({ variant = 'default' }: AgentTracesProps) => {
const rows = variants[variant];

return (
<div className="not-prose my-8 rounded-lg border bg-card p-4 sm:p-6">
<div className="space-y-2 w-full">
{rows.map((row, index) => (
<div
key={`${row.label}-${index}`}
className="flex flex-col overflow-hidden"
style={{
marginLeft: `${row.start}%`,
width: `${row.duration}%`,
}}
>
<div className="relative h-6 w-full">
<motion.div
initial={{ width: 0, opacity: 0 }}
whileInView={{ width: 'auto', opacity: 1 }}
viewport={{ once: true, amount: 0.8 }}
transition={{
duration: 0.55,
delay: index * 0.12,
ease: [0.22, 1, 0.36, 1],
}}
className={cn(
'h-full rounded-sm border overflow-hidden',
row.className
)}
>
<div className="flex justify-between items-center h-full px-2">
<span className="text-[10px] sm:text-[11px] font-mono font-medium text-foreground truncate leading-none">
{row.label}
</span>
{index === 0 && (
<span className="text-[10px] sm:text-[11px] hidden sm:inline leading-none">
{row.duration}ms
</span>
)}
</div>
</motion.div>
</div>
</div>
))}
</div>
</div>
);
};
13 changes: 12 additions & 1 deletion docs/components/geistdocs/desktop-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
'use client';

import Link from 'next/link';
import { usePathname } from 'next/navigation';
import {
NavigationMenu,
NavigationMenuItem,
NavigationMenuLink,
NavigationMenuList,
} from '@/components/ui/navigation-menu';
import { useIsMobile } from '@/hooks/use-mobile';
import { cn } from '@/lib/utils';

type DesktopMenuProps = {
items: { label: string; href: string }[];
};

export const DesktopMenu = ({ items }: DesktopMenuProps) => {
const isMobile = useIsMobile();
const pathname = usePathname();

const isActive = (href: string) => {
if (href.startsWith('http')) return false;
return pathname === href || pathname.startsWith(`${href}/`);
};

return (
<NavigationMenu viewport={isMobile}>
Expand All @@ -23,7 +31,10 @@ export const DesktopMenu = ({ items }: DesktopMenuProps) => {
<NavigationMenuItem key={item.href}>
<NavigationMenuLink
asChild
className="rounded-md px-3 font-medium text-sm"
className={cn(
'rounded-md px-3 font-medium text-sm text-gray-400',
isActive(item.href) && 'text-white'
)}
>
<Link href={item.href}>{item.label}</Link>
</NavigationMenuLink>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/geistdocs/docs-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const DocsLayout = ({
}}
sidebar={{
className:
'md:static md:sticky md:top-16 md:h-fit md:w-auto! bg-background! md:bg-transparent! border-none transition-none',
'md:static md:sticky md:top-16 md:max-h-[calc(100vh-4rem)] md:overflow-y-auto md:w-auto! bg-background! md:bg-transparent! border-none transition-none',
collapsible: false,
components: {
Folder,
Expand Down
Loading