Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(frontend): polish /tour hero and scripted chat demo (#13460)

Ubbe86d9b748965e
diff --git a/autogpt_platform/frontend/src/app/(public)/layout.tsx b/autogpt_platform/frontend/src/app/(public)/layout.tsx
new file mode 100644
index 0000000000..559c2040a2
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/layout.tsx
@@ -0,0 +1,9 @@
+import { ReactNode } from "react";
+
+interface Props {
+ children: ReactNode;
+}
+
+export default function PublicLayout({ children }: Props) {
+ return <main className="flex h-[100dvh] w-full flex-col">{children}</main>;
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/TourChatHost.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/TourChatHost.tsx
new file mode 100644
index 0000000000..f64ee8f87f
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/TourChatHost.tsx
@@ -0,0 +1,20 @@
+"use client";
+
+import { TourChatContainer } from "./components/TourChatContainer/TourChatContainer";
+import type { TourScript } from "./script/types";
+import { useTourCopilot } from "./useTourCopilot";
+
+interface Props {
+ sessionId: string;
+ script: TourScript;
+}
+
+export function TourChatHost({ sessionId, script }: Props) {
+ const chat = useTourCopilot({
+ sessionId,
+ script,
+ onComplete: () => {},
+ });
+
+ return <TourChatContainer chat={chat} />;
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/TourCopilot.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/TourCopilot.tsx
new file mode 100644
index 0000000000..b25eb86e4d
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/TourCopilot.tsx
@@ -0,0 +1,58 @@
+"use client";
+
+import { FileDropZone } from "@/app/(platform)/copilot/components/FileDropZone/FileDropZone";
+import { MobileHeader } from "@/app/(platform)/copilot/components/MobileHeader/MobileHeader";
+import { useIsMobile } from "@/app/(platform)/copilot/useIsMobile";
+import { DotDistortionShader } from "@/components/ui/dot-distortion-shader";
+import { SidebarProvider } from "@/components/ui/sidebar";
+import { TourChatHost } from "./TourChatHost";
+import { TourChatSidebar } from "./components/TourChatSidebar/TourChatSidebar";
+import { getTourChat } from "./script/tourChats";
+import type { TourScript } from "./script/types";
+import { useTourStore } from "./tourStore";
+
+export function TourCopilot() {
+ const isMobile = useIsMobile();
+ const activeSessionId = useTourStore((s) => s.activeSessionId);
+ const chat = getTourChat(activeSessionId);
+
+ return (
+ <SidebarProvider
+ defaultOpen={true}
+ style={{ height: "100dvh" }}
+ className="min-h-0"
+ >
+ {!isMobile && <TourChatSidebar />}
+ <MainArea isMobile={isMobile} sessionId={chat.id} script={chat.script} />
+ </SidebarProvider>
+ );
+}
+
+interface MainAreaProps {
+ isMobile: boolean;
+ sessionId: string;
+ script: TourScript;
+}
+
+function MainArea({ isMobile, sessionId, script }: MainAreaProps) {
+ return (
+ <div className="flex h-full w-full flex-row overflow-hidden">
+ <div className="relative flex min-w-0 flex-1 overflow-hidden bg-[#fafafa]">
+ <DotDistortionShader
+ dotGap={14}
+ dotSize={1}
+ opacity={0.2}
+ isStatic
+ className="pointer-events-none absolute inset-0 !bg-transparent [&_canvas]:opacity-70"
+ />
+ <FileDropZone
+ className="relative flex min-w-0 flex-1 flex-col overflow-hidden px-0"
+ onFilesDropped={() => {}}
+ >
+ {isMobile && <MobileHeader />}
+ <TourChatHost key={sessionId} sessionId={sessionId} script={script} />
+ </FileDropZone>
+ </div>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/__tests__/main.test.tsx
new file mode 100644
index 0000000000..e7b24c756f
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/__tests__/main.test.tsx
@@ -0,0 +1,91 @@
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
+
+import {
+ act,
+ fireEvent,
+ render,
+ screen,
+} from "@/tests/integrations/test-utils";
+
+// DotDistortionShader paints a canvas/WebGL frame that happy-dom cannot run and
+// that is purely decorative — stub it so the real chat tree can render.
+vi.mock("@/components/ui/dot-distortion-shader", () => ({
+ DotDistortionShader: () => null,
+}));
+
+import TourChatPage from "../page";
+
+function getSendBar() {
+ return screen.getByRole("button", { name: /^Send:/i });
+}
+
+// The prompt bar is prefilled and locked — the visitor only presses Enter to send.
+async function pressEnterToSend() {
+ fireEvent.keyDown(getSendBar(), { key: "Enter" });
+ // The scripted reveal streams in over real setTimeout delays; advance fake
+ // timers past the whole turn (longest turn ~2.9s) so every part is committed.
+ await act(async () => {
+ await vi.advanceTimersByTimeAsync(4000);
+ });
+}
+
+describe("Tour chat scripted demo", () => {
+ beforeEach(() => {
+ vi.useFakeTimers();
+ });
+
+ afterEach(() => {
+ vi.runOnlyPendingTimers();
+ vi.useRealTimers();
+ });
+
+ test("prefills the prompt, plays both turns, and opens the upsell", async () => {
+ render(<TourChatPage />);
+
+ // 1. The prompt bar is prefilled with the first scripted prompt.
+ expect(getSendBar()).toBeDefined();
+ expect(
+ screen.getByText(/Watch a competitor's pricing page/i),
+ ).toBeDefined();
+
+ // 2. Pressing Enter streams in the scripted assistant turn.
+ await pressEnterToSend();
+
+ expect(screen.getByText(/break that down/i)).toBeDefined();
+ expect(
+ screen.getByText(/Detect changes vs\. the last snapshot/i),
+ ).toBeDefined();
+
+ // The prompt bar now prefills the second turn's prompt.
+ expect(screen.getByText(/build and run it for me/i)).toBeDefined();
+
+ // 3. Pressing Enter again finishes the script and shows the inline upsell card.
+ await pressEnterToSend();
+
+ expect(
+ screen.getAllByText(/Competitor Pricing Watcher/i).length,
+ ).toBeGreaterThan(0);
+ expect(screen.getByText(/4 blocks/i)).toBeDefined();
+ expect(screen.getByText(/Execution completed/i)).toBeDefined();
+ expect(screen.getByText(/Ready to build your own/i)).toBeDefined();
+ });
+
+ test("sidebar navigation switches to the second chat's prompt", async () => {
+ render(<TourChatPage />);
+
+ expect(
+ screen.getByText(/Watch a competitor's pricing page/i),
+ ).toBeDefined();
+
+ // Click the second chat in the sidebar.
+ fireEvent.click(screen.getByText(/Summarize my weekly emails/i));
+ await act(async () => {
+ await vi.advanceTimersByTimeAsync(0);
+ });
+
+ // The prompt bar now prefills the second chat's opening prompt.
+ expect(
+ screen.getByText(/Summarize my unread emails every morning/i),
+ ).toBeDefined();
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatContainer/TourChatContainer.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatContainer/TourChatContainer.tsx
new file mode 100644
index 0000000000..c9b52b3f4b
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatContainer/TourChatContainer.tsx
@@ -0,0 +1,46 @@
+"use client";
+
+import { ChatMessagesContainer } from "@/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer";
+import { CopilotChatActionsProvider } from "@/app/(platform)/copilot/components/CopilotChatActionsProvider/CopilotChatActionsProvider";
+import type { useTourCopilot } from "../../useTourCopilot";
+import { TourPromptBar } from "../TourPromptBar/TourPromptBar";
+
+interface Props {
+ chat: ReturnType<typeof useTourCopilot>;
+}
+
+export function TourChatContainer({ chat }: Props) {
+ return (
+ <CopilotChatActionsProvider onSend={chat.onSend} chatSurface="builder">
+ <div className="flex h-full min-h-0 w-full flex-col px-2 lg:px-0">
+ {/* Tour-only card styling. These descendant selectors target the shared
+ copilot tool-call markup (.bg-card / .bg-stone-50 / .py-2) by class
+ name — if those classes change in ChatMessagesContainer, update them
+ here too. Scoped this way to avoid modifying the shared component. */}
+ <div className="mx-auto flex h-full min-h-0 w-full max-w-3xl flex-col bg-[#fafafa] pb-12 [&_.bg-card]:mb-6 [&_.bg-stone-50]:rounded-xl [&_.bg-stone-50]:border [&_.bg-stone-50]:border-zinc-200/70 [&_.bg-stone-50]:bg-white [&_.bg-stone-50]:!py-2 [&_.bg-stone-50]:shadow-sm [&_.py-2]:py-0">
+ <ChatMessagesContainer
+ messages={chat.messages}
+ status={chat.status}
+ error={chat.error}
+ isLoading={false}
+ sessionID={chat.sessionId}
+ turnStats={chat.turnStats}
+ queuedMessages={chat.queuedMessages}
+ />
+ <div className="relative px-3 pb-2 pt-2">
+ <TourPromptBar
+ key={chat.turnIndex}
+ prompt={chat.currentUserPrompt}
+ isStreaming={chat.isStreaming}
+ isExhausted={chat.isExhausted}
+ onSend={() =>
+ chat.currentUserPrompt && chat.onSend(chat.currentUserPrompt)
+ }
+ onReplay={chat.reset}
+ />
+ </div>
+ </div>
+ </div>
+ </CopilotChatActionsProvider>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatSidebar/TourChatSidebar.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatSidebar/TourChatSidebar.tsx
new file mode 100644
index 0000000000..ecae15c09f
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatSidebar/TourChatSidebar.tsx
@@ -0,0 +1,107 @@
+"use client";
+
+import { ChatSessionBlock } from "@/app/(platform)/copilot/components/ChatSessionBlock/ChatSessionBlock";
+import { AutoGPTLogo } from "@/components/atoms/AutoGPTLogo/AutoGPTLogo";
+import { Button } from "@/components/atoms/Button/Button";
+import { Text } from "@/components/atoms/Text/Text";
+import { Button as ShadcnButton } from "@/components/ui/button";
+import {
+ Sidebar,
+ SidebarContent,
+ SidebarHeader,
+ SidebarTrigger,
+} from "@/components/ui/sidebar";
+import { cn } from "@/lib/utils";
+import {
+ FilesIcon,
+ MagnifyingGlassIcon,
+ PlusIcon,
+} from "@phosphor-icons/react";
+import { tourChats } from "../../script/tourChats";
+import { useTourStore } from "../../tourStore";
+
+export function TourChatSidebar() {
+ const activeSessionId = useTourStore((s) => s.activeSessionId);
+ const setActiveSession = useTourStore((s) => s.setActiveSession);
+
+ return (
+ <Sidebar
+ variant="inset"
+ collapsible="icon"
+ className="!top-0 !h-[100dvh] px-0 [&_[data-sidebar=sidebar]]:border-r [&_[data-sidebar=sidebar]]:border-r-[#80808017]"
+ >
+ <SidebarHeader className="shrink-0 px-4 pb-3 pt-3">
+ <div className="flex flex-col gap-3 px-3">
+ <AutoGPTLogo className="mx-auto mb-[10px] h-auto w-24" />
+ <div className="flex items-center justify-between">
+ <Text variant="h3" size="body-medium">
+ Your chats
+ </Text>
+ <div className="flex items-center">
+ <ShadcnButton
+ type="button"
+ variant="ghost"
+ size="icon-sm"
+ aria-label="Search chats"
+ disabled
+ aria-disabled="true"
+ className="rounded-full text-zinc-600 hover:bg-zinc-100"
+ >
+ <MagnifyingGlassIcon className="!size-5" />
+ </ShadcnButton>
+ <ShadcnButton
+ type="button"
+ variant="ghost"
+ size="icon-sm"
+ aria-label="Files"
+ disabled
+ aria-disabled="true"
+ className="rounded-full text-zinc-600 hover:bg-zinc-100"
+ >
+ <FilesIcon className="!size-5" />
+ </ShadcnButton>
+ <SidebarTrigger />
+ </div>
+ </div>
+ <Button
+ variant="primary"
+ size="small"
+ className="w-full"
+ disabled
+ aria-disabled="true"
+ leftIcon={<PlusIcon className="h-4 w-4" weight="bold" />}
+ >
+ New Chat
+ </Button>
+ </div>
+ </SidebarHeader>
+
+ <SidebarContent className="gap-4 overflow-y-auto px-4 py-4 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
+ <div className="flex flex-col gap-1">
+ {tourChats.map((chat) => {
+ const isActive = chat.id === activeSessionId;
+ return (
+ <button
+ key={chat.id}
+ type="button"
+ onClick={() => setActiveSession(chat.id)}
+ className={cn(
+ "w-full px-3 py-2.5 text-left transition-colors",
+ isActive
+ ? "rounded-lg bg-zinc-100"
+ : "rounded-lg border-b border-b-[#8080800f] last:border-b-0 hover:bg-zinc-50",
+ )}
+ >
+ <ChatSessionBlock
+ title={chat.title}
+ updatedAt={chat.updatedAt}
+ isActive={isActive}
+ />
+ </button>
+ );
+ })}
+ </div>
+ </SidebarContent>
+ </Sidebar>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourPromptBar/TourPromptBar.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourPromptBar/TourPromptBar.tsx
new file mode 100644
index 0000000000..7b96a95059
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourPromptBar/TourPromptBar.tsx
@@ -0,0 +1,81 @@
+"use client";
+
+import { useMountEffect } from "@/hooks/useMountEffect";
+import { cn } from "@/lib/utils";
+import { ArrowUpIcon } from "@phosphor-icons/react";
+import { useRef } from "react";
+import { TourUpsellCard } from "../TourUpsellCard/TourUpsellCard";
+
+interface Props {
+ prompt: string | null;
+ isStreaming: boolean;
+ isExhausted: boolean;
+ onSend: () => void;
+ onReplay: () => void;
+}
+
+export function TourPromptBar({
+ prompt,
+ isStreaming,
+ isExhausted,
+ onSend,
+ onReplay,
+}: Props) {
+ const ref = useRef<HTMLDivElement>(null);
+
+ // The parent re-keys this component whenever the prefilled prompt changes, so
+ // focusing on mount keeps the box ready for the visitor to just press Enter.
+ useMountEffect(() => {
+ if (!isStreaming && !isExhausted) ref.current?.focus();
+ });
+
+ if (isExhausted) {
+ return <TourUpsellCard onReplay={onReplay} />;
+ }
+
+ function send() {
+ if (!isStreaming) onSend();
+ }
+
+ function handleKeyDown(event: React.KeyboardEvent<HTMLDivElement>) {
+ if (event.key === "Enter" || event.key === " ") {
+ event.preventDefault();
+ send();
+ }
+ }
+
+ // The bar isn't a text field — it shows a fixed prompt and only sends on
+ // click/Enter — so it's exposed as a button with a "Send: …" label.
+ return (
+ <div
+ ref={ref}
+ role="button"
+ tabIndex={0}
+ aria-label={prompt ? `Send: ${prompt}` : "Send message"}
+ aria-disabled={isStreaming}
+ onKeyDown={handleKeyDown}
+ onClick={send}
+ className={cn(
+ "flex cursor-pointer items-center gap-3 rounded-xl border border-zinc-200 bg-white px-5 py-3.5 shadow-[0_2px_8px_rgba(0,0,0,0.04),0_0_32px_-4px_rgba(99,102,241,0.4)] outline-none transition-shadow focus-visible:border-zinc-300 focus-visible:shadow-[0_2px_8px_rgba(0,0,0,0.04),0_0_44px_-2px_rgba(99,102,241,0.55)]",
+ isStreaming && "cursor-default opacity-60",
+ )}
+ >
+ <span className="flex-1 truncate text-base text-zinc-700">{prompt}</span>
+ <span className="hidden shrink-0 items-center gap-1 text-xs text-zinc-400 sm:flex">
+ Press
+ <kbd className="rounded border border-zinc-200 bg-zinc-50 px-1.5 py-0.5 font-sans text-[0.7rem] text-zinc-500">
+ Enter
+ </kbd>
+ </span>
+ <span
+ aria-hidden="true"
+ className={cn(
+ "flex size-10 shrink-0 items-center justify-center rounded-full text-white transition-colors",
+ isStreaming ? "bg-zinc-200" : "bg-zinc-800",
+ )}
+ >
+ <ArrowUpIcon className="size-4" weight="bold" />
+ </span>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourUpsellCard/TourUpsellCard.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourUpsellCard/TourUpsellCard.tsx
new file mode 100644
index 0000000000..b2b958c528
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourUpsellCard/TourUpsellCard.tsx
@@ -0,0 +1,56 @@
+"use client";
+
+import { Button } from "@/components/atoms/Button/Button";
+import { Text } from "@/components/atoms/Text/Text";
+import { ArrowCounterClockwiseIcon, SparkleIcon } from "@phosphor-icons/react";
+
+interface Props {
+ onReplay: () => void;
+}
+
+export function TourUpsellCard({ onReplay }: Props) {
+ return (
+ <div className="flex flex-col gap-4 rounded-xl border border-zinc-200 bg-white p-5 shadow-[0_2px_8px_rgba(0,0,0,0.04),0_0_32px_-4px_rgba(99,102,241,0.4)]">
+ <div className="flex items-start gap-3">
+ <SparkleIcon
+ size={22}
+ weight="fill"
+ className="mt-0.5 shrink-0 text-violet-600"
+ />
+ <div className="flex flex-col gap-1">
+ <Text variant="large-medium" className="text-zinc-900">
+ Ready to build your own?
+ </Text>
+ <Text variant="body" className="text-zinc-600">
+ Spin up your own AI agents in minutes. Sign up free to start
+ building, no credit card required.
+ </Text>
+ </div>
+ </div>
+
+ <div className="flex flex-col gap-2 sm:flex-row sm:justify-end">
+ <Button
+ variant="ghost"
+ size="small"
+ leftIcon={<ArrowCounterClockwiseIcon className="h-4 w-4" />}
+ onClick={onReplay}
+ >
+ Replay demo
+ </Button>
+ <Button
+ as="NextLink"
+ href="https://agpt.co/pricing"
+ target="_blank"
+ rel="noopener noreferrer"
+ variant="secondary"
+ size="small"
+ >
+ See pricing
+ </Button>
+ <Button as="NextLink" href="/signup" variant="primary" size="small">
+ Sign up free
+ </Button>
+ </div>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/helpers.ts b/autogpt_platform/frontend/src/app/(public)/tour/chat/helpers.ts
new file mode 100644
index 0000000000..7de9baf738
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/helpers.ts
@@ -0,0 +1,12 @@
+import type { UIMessage } from "ai";
+import type { ScriptedPart } from "./script/types";
+
+export function appendPartToLastMessage(
+ messages: UIMessage[],
+ part: ScriptedPart["part"],
+): UIMessage[] {
+ const next = messages.slice();
+ const last = next[next.length - 1];
+ next[next.length - 1] = { ...last, parts: [...last.parts, part] };
+ return next;
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/page.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/page.tsx
new file mode 100644
index 0000000000..397e3cb72a
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/page.tsx
@@ -0,0 +1,9 @@
+"use client";
+
+import { TourCopilot } from "./TourCopilot";
+import { useTourBootstrap } from "./useTourBootstrap";
+
+export default function TourChatPage() {
+ useTourBootstrap();
+ return <TourCopilot />;
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/script/emailSummaryScript.ts b/autogpt_platform/frontend/src/app/(public)/tour/chat/script/emailSummaryScript.ts
new file mode 100644
index 0000000000..b0949661df
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/script/emailSummaryScript.ts
@@ -0,0 +1,145 @@
+import type { TourScript } from "./types";
+
+export const emailSummaryScript: TourScript = [
+ {
+ assistantMessageId: "email-asst-1",
+ userPrompt: "Summarize my unread emails every morning and send me a digest",
+ steps: [
+ {
+ delayMs: 400,
+ part: {
+ type: "text",
+ text: "Love it. Here's how I'll set that up.",
+ state: "done",
+ },
+ },
+ {
+ delayMs: 700,
+ part: {
+ type: "tool-decompose_goal",
+ toolCallId: "email-call-decompose",
+ state: "output-available",
+ input: {
+ goal: "Summarize my unread emails every morning and send a digest",
+ },
+ output: {
+ type: "task_decomposition",
+ message: "Here's the plan (3 steps):",
+ goal: "Summarize my unread emails every morning and send a digest",
+ step_count: 3,
+ steps: [
+ {
+ step_id: "step_1",
+ description: "Read unread emails from the last 24 hours",
+ action: "add_block",
+ block_name: "Gmail Read",
+ status: "completed",
+ },
+ {
+ step_id: "step_2",
+ description: "Summarize each thread into a short digest",
+ action: "add_block",
+ block_name: "AI Text Generator",
+ status: "completed",
+ },
+ {
+ step_id: "step_3",
+ description: "Email me the digest every morning at 8am",
+ action: "add_block",
+ block_name: "Send Email",
+ status: "completed",
+ },
+ ],
+ },
+ },
+ },
+ {
+ delayMs: 500,
+ part: {
+ type: "text",
+ text: "Want me to build the agent right now?",
+ state: "done",
+ },
+ },
+ ],
+ },
+ {
+ assistantMessageId: "email-asst-2",
+ userPrompt: "Perfect, set it up",
+ steps: [
+ {
+ delayMs: 500,
+ part: {
+ type: "text",
+ text: "Building your digest agent now.",
+ state: "done",
+ },
+ },
+ {
+ delayMs: 900,
+ part: {
+ type: "tool-create_agent",
+ toolCallId: "email-call-create",
+ state: "output-available",
+ input: { name: "Morning Email Digest" },
+ output: {
+ type: "agent_builder_preview",
+ message: "Here's the agent I built for you:",
+ agent_name: "Morning Email Digest",
+ description:
+ "Reads your unread emails, summarizes them, and emails you a digest every morning.",
+ node_count: 4,
+ link_count: 3,
+ agent_json: { nodes: [], links: [] },
+ },
+ },
+ },
+ {
+ delayMs: 700,
+ part: {
+ type: "tool-run_agent",
+ toolCallId: "email-call-run",
+ state: "output-available",
+ input: { agent_id: "email-agent-1" },
+ output: {
+ type: "agent_output",
+ message: "Your agent ran successfully.",
+ agent_name: "Morning Email Digest",
+ agent_id: "email-agent-1",
+ execution: {
+ execution_id: "email-exec-1",
+ status: "COMPLETED",
+ outputs: {
+ summary:
+ "Digest scheduled. You'll get your first summary tomorrow at 8am.",
+ },
+ },
+ },
+ },
+ },
+ {
+ delayMs: 500,
+ part: {
+ type: "text",
+ text: "All set! Your morning digest is scheduled and ready to go. 🎉",
+ state: "done",
+ },
+ },
+ {
+ delayMs: 500,
+ part: {
+ type: "tool-create_agent",
+ toolCallId: "email-call-saved",
+ state: "output-available",
+ input: { name: "Morning Email Digest" },
+ output: {
+ type: "agent_builder_saved",
+ agent_name: "Morning Email Digest",
+ library_agent_link: "/signup",
+ agent_page_link: "/signup",
+ },
+ },
+ },
+ ],
+ },
+];
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/script/monitorPricingScript.ts b/autogpt_platform/frontend/src/app/(public)/tour/chat/script/monitorPricingScript.ts
new file mode 100644
index 0000000000..479ad76f0d
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/script/monitorPricingScript.ts
@@ -0,0 +1,146 @@
+import type { TourScript } from "./types";
+
+export const monitorPricingScript: TourScript = [
+ {
+ assistantMessageId: "tour-asst-1",
+ userPrompt:
+ "Watch a competitor's pricing page and email me when the price changes",
+ steps: [
+ {
+ delayMs: 400,
+ part: {
+ type: "text",
+ text: "Great goal! Let me break that down into steps.",
+ state: "done",
+ },
+ },
+ {
+ delayMs: 700,
+ part: {
+ type: "tool-decompose_goal",
+ toolCallId: "tour-call-decompose",
+ state: "output-available",
+ input: {
+ goal: "Watch a competitor's pricing page and email me on change",
+ },
+ output: {
+ type: "task_decomposition",
+ message: "Here's the plan (3 steps):",
+ goal: "Watch a competitor's pricing page and email me on change",
+ step_count: 3,
+ steps: [
+ {
+ step_id: "step_1",
+ description: "Fetch the competitor pricing page on a schedule",
+ action: "add_block",
+ block_name: "Send Web Request",
+ status: "completed",
+ },
+ {
+ step_id: "step_2",
+ description: "Detect changes vs. the last snapshot",
+ action: "add_block",
+ block_name: "Text Compare",
+ status: "completed",
+ },
+ {
+ step_id: "step_3",
+ description: "Email me a summary when it changes",
+ action: "add_block",
+ block_name: "Send Email",
+ status: "completed",
+ },
+ ],
+ },
+ },
+ },
+ {
+ delayMs: 500,
+ part: {
+ type: "text",
+ text: "Want me to build the agent right now?",
+ state: "done",
+ },
+ },
+ ],
+ },
+ {
+ assistantMessageId: "tour-asst-2",
+ userPrompt: "Yes, build and run it for me",
+ steps: [
+ {
+ delayMs: 500,
+ part: {
+ type: "text",
+ text: "I'll build that agent for you now.",
+ state: "done",
+ },
+ },
+ {
+ delayMs: 900,
+ part: {
+ type: "tool-create_agent",
+ toolCallId: "tour-call-create",
+ state: "output-available",
+ input: { name: "Competitor Pricing Watcher" },
+ output: {
+ type: "agent_builder_preview",
+ message: "Here's the agent I built for you:",
+ agent_name: "Competitor Pricing Watcher",
+ description:
+ "Checks a competitor's pricing page on a schedule and emails you when it changes.",
+ node_count: 4,
+ link_count: 3,
+ agent_json: { nodes: [], links: [] },
+ },
+ },
+ },
+ {
+ delayMs: 700,
+ part: {
+ type: "tool-run_agent",
+ toolCallId: "tour-call-run",
+ state: "output-available",
+ input: { agent_id: "tour-agent-1" },
+ output: {
+ type: "agent_output",
+ message: "Your agent ran successfully.",
+ agent_name: "Competitor Pricing Watcher",
+ agent_id: "tour-agent-1",
+ execution: {
+ execution_id: "tour-exec-1",
+ status: "COMPLETED",
+ outputs: {
+ summary:
+ "No price change detected yet. You're all set, and I'll email you the moment it changes.",
+ },
+ },
+ },
+ },
+ },
+ {
+ delayMs: 500,
+ part: {
+ type: "text",
+ text: "Done! Your agent is live and will email you on any change. 🎉",
+ state: "done",
+ },
+ },
+ {
+ delayMs: 500,
+ part: {
+ type: "tool-create_agent",
+ toolCallId: "tour-call-saved",
+ state: "output-available",
+ input: { name: "Competitor Pricing Watcher" },
+ output: {
+ type: "agent_builder_saved",
+ agent_name: "Competitor Pricing Watcher",
+ library_agent_link: "/signup",
+ agent_page_link: "/signup",
+ },
+ },
+ },
+ ],
+ },
+];
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/script/tourChats.ts b/autogpt_platform/frontend/src/app/(public)/tour/chat/script/tourChats.ts
new file mode 100644
index 0000000000..339861ed3d
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/script/tourChats.ts
@@ -0,0 +1,27 @@
+import { emailSummaryScript } from "./emailSummaryScript";
+import { monitorPricingScript } from "./monitorPricingScript";
+import type { TourChat } from "./types";
+
+export const TOUR_SESSION_ID = "tour-demo-session";
+export const EMAIL_SESSION_ID = "tour-demo-2";
+
+export const tourChats: TourChat[] = [
+ {
+ id: TOUR_SESSION_ID,
+ title: "Watch competitor pricing",
+ updatedAt: "2026-06-30T10:05:00Z",
+ script: monitorPricingScript,
+ },
+ {
+ id: EMAIL_SESSION_ID,
+ title: "Summarize my weekly emails",
+ updatedAt: "2026-06-29T09:10:00Z",
+ script: emailSummaryScript,
+ },
+];
+
+export function getTourChat(id: string): TourChat {
+ return tourChats.find((chat) => chat.id === id) ?? tourChats[0];
+}
+
+export const tourSessionIds = tourChats.map((chat) => chat.id);
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/script/types.ts b/autogpt_platform/frontend/src/app/(public)/tour/chat/script/types.ts
new file mode 100644
index 0000000000..ea71ec0b2a
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/script/types.ts
@@ -0,0 +1,23 @@
+import type { UIMessage } from "ai";
+
+export interface ScriptedPart {
+ part: NonNullable<UIMessage["parts"]>[number];
+ delayMs: number;
+}
+
+export interface ScriptedTurn {
+ assistantMessageId: string;
+ /** The prefilled user message for this turn — shown locked in the prompt bar
+ * so the visitor only presses Enter to send it. */
+ userPrompt: string;
+ steps: ScriptedPart[];
+}
+
+export type TourScript = ScriptedTurn[];
+
+export interface TourChat {
+ id: string;
+ title: string;
+ updatedAt: string;
+ script: TourScript;
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/tourStore.ts b/autogpt_platform/frontend/src/app/(public)/tour/chat/tourStore.ts
new file mode 100644
index 0000000000..1dddf0833e
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/tourStore.ts
@@ -0,0 +1,12 @@
+import { create } from "zustand";
+import { TOUR_SESSION_ID } from "./script/tourChats";
+
+interface TourState {
+ activeSessionId: string;
+ setActiveSession: (id: string) => void;
+}
+
+export const useTourStore = create<TourState>((set) => ({
+ activeSessionId: TOUR_SESSION_ID,
+ setActiveSession: (id) => set({ activeSessionId: id }),
+}));
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/useTourBootstrap.ts b/autogpt_platform/frontend/src/app/(public)/tour/chat/useTourBootstrap.ts
new file mode 100644
index 0000000000..3d6da63d27
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/useTourBootstrap.ts
@@ -0,0 +1,37 @@
+"use client";
+
+import {
+ getListWorkspaceFilesQueryKey,
+ type listWorkspaceFilesResponse,
+} from "@/app/api/__generated__/endpoints/workspace/workspace";
+import type { ListFilesResponse } from "@/app/api/__generated__/models/listFilesResponse";
+import { useMountEffect } from "@/hooks/useMountEffect";
+import { useQueryClient } from "@tanstack/react-query";
+import { tourSessionIds } from "./script/tourChats";
+
+const emptyFiles: ListFilesResponse = { files: [], offset: 0, has_more: false };
+
+const emptyWorkspaceFilesResponse: listWorkspaceFilesResponse = {
+ status: 200,
+ data: emptyFiles,
+ headers: new Headers(),
+};
+
+export function useTourBootstrap() {
+ const queryClient = useQueryClient();
+
+ useMountEffect(() => {
+ for (const sessionId of tourSessionIds) {
+ const key = getListWorkspaceFilesQueryKey({ session_id: sessionId });
+ queryClient.setQueryData(key, emptyWorkspaceFilesResponse);
+ queryClient.setQueryDefaults(key, {
+ staleTime: Infinity,
+ gcTime: Infinity,
+ retry: false,
+ refetchOnMount: false,
+ refetchOnWindowFocus: false,
+ refetchOnReconnect: false,
+ });
+ }
+ });
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/useTourCopilot.ts b/autogpt_platform/frontend/src/app/(public)/tour/chat/useTourCopilot.ts
new file mode 100644
index 0000000000..73545b7b0a
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/useTourCopilot.ts
@@ -0,0 +1,101 @@
+"use client";
+
+import { useCopilotStreamStore } from "@/app/(platform)/copilot/copilotStreamStore";
+import { useMountEffect } from "@/hooks/useMountEffect";
+import type { UIMessage } from "ai";
+import { useRef, useState } from "react";
+import { appendPartToLastMessage } from "./helpers";
+import type { TourScript } from "./script/types";
+
+type TourStatus = "ready" | "submitted" | "streaming";
+
+interface Args {
+ sessionId: string;
+ script: TourScript;
+ onComplete: () => void;
+}
+
+export function useTourCopilot({ sessionId, script, onComplete }: Args) {
+ const [messages, setMessages] = useState<UIMessage[]>([]);
+ const [status, setStatus] = useState<TourStatus>("ready");
+ const stepIndex = useRef(0);
+ const timers = useRef<ReturnType<typeof setTimeout>[]>([]);
+ const messagesRef = useRef<UIMessage[]>([]);
+
+ function commit(next: UIMessage[]) {
+ messagesRef.current = next;
+ setMessages(next);
+ useCopilotStreamStore.getState().setMessageSnapshot(sessionId, next);
+ }
+
+ function clearTimers() {
+ timers.current.forEach(clearTimeout);
+ timers.current = [];
+ }
+
+ function onSend(text: string) {
+ const turn = script[stepIndex.current];
+ if (status !== "ready" || !turn) return;
+
+ commit([
+ ...messagesRef.current,
+ {
+ id: `${sessionId}-user-${stepIndex.current}`,
+ role: "user",
+ parts: [{ type: "text", text, state: "done" }],
+ },
+ { id: turn.assistantMessageId, role: "assistant", parts: [] },
+ ]);
+ setStatus("streaming");
+
+ let elapsed = 0;
+ turn.steps.forEach((step) => {
+ elapsed += step.delayMs;
+ timers.current.push(
+ setTimeout(() => {
+ commit(appendPartToLastMessage(messagesRef.current, step.part));
+ }, elapsed),
+ );
+ });
+
+ timers.current.push(
+ setTimeout(() => {
+ setStatus("ready");
+ stepIndex.current += 1;
+ if (stepIndex.current >= script.length) onComplete();
+ }, elapsed + 300),
+ );
+ }
+
+ function reset() {
+ clearTimers();
+ stepIndex.current = 0;
+ commit([]);
+ setStatus("ready");
+ }
+
+ // Fresh slate when this chat mounts. TourChatHost is keyed by sessionId, so a
+ // sidebar switch remounts this hook — clear any prior snapshot so the messages
+ // reflect the newly-selected chat.
+ useMountEffect(() => {
+ useCopilotStreamStore.getState().setMessageSnapshot(sessionId, []);
+ return clearTimers;
+ });
+
+ const currentTurn = script[stepIndex.current];
+
+ return {
+ sessionId,
+ messages,
+ status,
+ error: undefined as Error | undefined,
+ turnStats: new Map(),
+ queuedMessages: [] as string[],
+ onSend,
+ reset,
+ turnIndex: stepIndex.current,
+ currentUserPrompt: currentTurn?.userPrompt ?? null,
+ isStreaming: status === "streaming" || status === "submitted",
+ isExhausted: stepIndex.current >= script.length,
+ };
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/components/TourHero/TourBackground.tsx b/autogpt_platform/frontend/src/app/(public)/tour/components/TourHero/TourBackground.tsx
new file mode 100644
index 0000000000..7b48b428f7
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/components/TourHero/TourBackground.tsx
@@ -0,0 +1,47 @@
+import { cn } from "@/lib/utils";
+import type { CSSProperties } from "react";
+
+const rectangleSVG = `<svg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'><rect width='40' height='40' x='0' y='0' stroke='rgba(0,0,0,0.08)' fill='none' /></svg>`;
+const encodedRectangleSVG = encodeURIComponent(rectangleSVG);
+
+interface RectanglesProps {
+ className?: string;
+ style?: CSSProperties;
+}
+
+function Rectangles({ className, style }: RectanglesProps) {
+ return (
+ <div
+ className={cn(
+ "pointer-events-none absolute inset-0 z-0 h-full w-full overflow-hidden",
+ className,
+ )}
+ style={style}
+ >
+ <div
+ className="h-full w-full"
+ style={{
+ backgroundImage: `url("data:image/svg+xml,${encodedRectangleSVG}")`,
+ backgroundSize: "40px 40px",
+ backgroundPosition: "center",
+ backgroundRepeat: "repeat",
+ }}
+ />
+ </div>
+ );
+}
+
+export function TourBackground() {
+ return (
+ <div className="pointer-events-none absolute inset-0 z-0 h-full w-full overflow-hidden opacity-40 [perspective:1000px] [transform-style:preserve-3d]">
+ <Rectangles
+ style={{ transform: "rotateX(45deg)" }}
+ className="[mask-image:linear-gradient(to_top,white,transparent)]"
+ />
+ <Rectangles
+ style={{ transform: "rotateX(-45deg)" }}
+ className="[mask-image:linear-gradient(to_bottom,white,transparent)]"
+ />
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/components/TourHero/TourHero.tsx b/autogpt_platform/frontend/src/app/(public)/tour/components/TourHero/TourHero.tsx
new file mode 100644
index 0000000000..2b348ace19
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/components/TourHero/TourHero.tsx
@@ -0,0 +1,69 @@
+import { AutoGPTLogo } from "@/components/atoms/AutoGPTLogo/AutoGPTLogo";
+import { Button } from "@/components/atoms/Button/Button";
+import { Text } from "@/components/atoms/Text/Text";
+import { ArrowRightIcon, SparkleIcon } from "@phosphor-icons/react/dist/ssr";
+import { TourBackground } from "./TourBackground";
+
+export function TourHero() {
+ return (
+ <section className="relative flex flex-1 flex-col items-center justify-center overflow-hidden border-b border-neutral-100 px-6 py-16">
+ <TourBackground />
+ <div className="relative z-10 flex w-full max-w-2xl flex-col items-center text-center">
+ <AutoGPTLogo hideText viewBox="46 0 43 40" className="mb-6 h-20 w-20" />
+
+ <span className="relative mb-6 inline-flex overflow-hidden rounded-full bg-[linear-gradient(135deg,rgba(99,102,241,0.6),rgba(59,130,246,0.35),rgba(165,180,252,0.6))] p-px shadow-[0_6px_20px_-6px_rgba(59,130,246,0.35)]">
+ <span className="relative inline-flex items-center gap-2 rounded-full bg-white/50 px-4 py-1.5 shadow-[inset_0_1px_0_rgba(255,255,255,0.75)] backdrop-blur-xl">
+ <SparkleIcon className="h-4 w-4 text-violet-600" weight="fill" />
+ <Text variant="small-medium" className="text-sm text-zinc-700">
+ Live demo, no signup required
+ </Text>
+ </span>
+ </span>
+
+ <Text
+ as="h1"
+ variant="h1"
+ className="text-balance text-[4rem] font-[600] leading-[1]"
+ >
+ Build AI agents by just chatting
+ </Text>
+
+ <Text
+ variant="lead"
+ className="mt-5 max-w-xl text-balance text-zinc-600"
+ >
+ Describe a goal in plain English and watch Autopilot build and run a
+ working AutoGPT agent for you, in seconds, right in your browser.
+ </Text>
+
+ <div className="mt-10 flex w-full flex-col items-center justify-center gap-3 sm:w-auto sm:flex-row">
+ <Button
+ as="NextLink"
+ href="/tour/chat"
+ size="large"
+ rightIcon={
+ <ArrowRightIcon
+ className="h-4 w-4 transition-transform duration-200 ease-out group-hover:translate-x-1"
+ weight="bold"
+ />
+ }
+ className="group w-full sm:w-auto sm:px-8"
+ >
+ Try the demo
+ </Button>
+ <Button
+ as="NextLink"
+ href="https://agpt.co/pricing"
+ target="_blank"
+ rel="noopener noreferrer"
+ variant="ghost"
+ size="large"
+ className="w-full sm:w-auto"
+ >
+ See pricing
+ </Button>
+ </div>
+ </div>
+ </section>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(public)/tour/page.tsx b/autogpt_platform/frontend/src/app/(public)/tour/page.tsx
new file mode 100644
index 0000000000..bc055cd46c
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(public)/tour/page.tsx
@@ -0,0 +1,5 @@
+import { TourHero } from "./components/TourHero/TourHero";
+
+export default function Page() {
+ return <TourHero />;
+}
diff --git a/autogpt_platform/frontend/src/providers/onboarding/onboarding-provider.tsx b/autogpt_platform/frontend/src/providers/onboarding/onboarding-provider.tsx
index a1b6aef7f6..f512c12e15 100644
--- a/autogpt_platform/frontend/src/providers/onboarding/onboarding-provider.tsx
+++ b/autogpt_platform/frontend/src/providers/onboarding/onboarding-provider.tsx
@@ -115,6 +115,10 @@ export default function OnboardingProvider({
}, []);
const isOnOnboardingRoute = pathname.startsWith("/onboarding");
+ // The public `/tour` demo is for unauthenticated prospects and must never
+ // trigger onboarding init/redirects (which would bounce a logged-in user with
+ // incomplete onboarding out of the tour).
+ const isOnPublicTour = pathname.startsWith("/tour");
// Logged-in users sitting on the auth pages need to be routed onward by us;
// otherwise the signup/login pages show their `isLoggedIn` loader forever.
// Handling them here (instead of in useSignupPage/useLoginPage) avoids the
@@ -151,7 +155,7 @@ export default function OnboardingProvider({
useEffect(() => {
// Prevent multiple initializations
- if (hasInitialized.current || !isLoggedIn) {
+ if (hasInitialized.current || !isLoggedIn || isOnPublicTour) {
return;
}
@@ -216,6 +220,7 @@ export default function OnboardingProvider({
router,
isLoggedIn,
pathname,
+ isOnPublicTour,
]);
const handleOnboardingNotification = useCallback(