Demos
204 resultsMost Popular
CLI Start Command
Copy-paste command to scaffold the canonical Mastra starter
Agentic Chat
Natural conversation with frontend tool execution
In-Chat HITL (useHumanInTheLoop — ergonomic API)
Interactive approval/decision surface rendered inline in the chat via the high-level `useHumanInTheLoop` hook
In-App Human in the Loop (Frontend Tools + async HITL)
Agent requests approval via useFrontendTool with an async handler; the approval UI pops up as an app-level modal OUTSIDE the chat
Tool Rendering
Custom per-tool renderers plus a wildcard catch-all for every other tool
Tool Rendering (Default Catch-all)
Out-of-the-box tool rendering — backend defines tools; frontend adds zero custom renderers
Tool Rendering (Custom Catch-all)
Single branded wildcard renderer via useDefaultRenderTool
Agentic Generative UI
Long-running agent tasks with generated UI
State Streaming
Per-token state delta streaming from agent to UI
Readonly State (Agent Context)
Frontend provides read-only context to the agent via useAgentContext
Pre-Built: Sidebar
Docked sidebar chat via <CopilotSidebar />
Pre-Built: Popup
Floating popup chat via <CopilotPopup />
Chat Customization (Slots)
Customize CopilotChat via its slot system
Chat Customization (CSS)
Default CopilotChat re-themed via CopilotKitCSSProperties
Headless Chat (Simple)
Minimal custom chat surface built on useAgent
Frontend Tools (In-App Actions)
Agent invokes client-side handlers registered with useFrontendTool
Frontend Tools (Async)
useFrontendTool with an async handler — agent awaits a client-side async operation and uses the returned result
Agent Config Object
Forward a typed config object (tone / expertise / response length) from the provider to the agent via useAgentContext
Declarative Generative UI (A2UI — Dynamic Schema)
Dynamic A2UI surfaces generated by the `generate_a2ui` tool; frontend supplies a typed catalog (Card, Metric, PieChart, BarChart, …)
A2UI Error Recovery
Dynamic A2UI where the toolkit's validate→retry recovery loop is made visible — a malformed first render self-heals into a valid surface; an always-invalid render exhausts the attempt cap and shows a tasteful fallback instead of a broken surface. Backend-owned via getA2UITools.
A2UI Fixed Schema
Frontend-owned component tree; agent streams data into the data model (flight card built from Card > Column > Title/Airport/Arrow/AirlineBadge/PriceTag/Button)
Headless Chat (Complete)
Full chat-from-scratch on useAgent — custom bubbles, manual generative-UI composition via useRenderToolCall / useRenderActivityMessage / useRenderCustomMessages
Authentication
Bearer-token gate enforced by the V2 runtime's onRequest hook — unauthenticated requests 401 before reaching the agent
Shared State (Read + Write)
Bidirectional shared state — UI writes preferences via agent.setState; backend reads them every turn and writes notes back via the set_notes tool
Sub-Agents
Supervisor Mastra Agent delegates to research / writing / critique sub-agents; every delegation appended to a live UI log via shared state
Beautiful Chat (Flagship)
Flagship CopilotKit showcase combining A2UI, Open Generative UI, and MCP Apps in one cell
Multimodal Attachments
Image + PDF uploads forwarded to a vision-capable Mastra agent (gpt-4o)
Open Generative UI
Agent-authored HTML + CSS streamed into a sandboxed iframe via the runtime's openGenerativeUI flag
Open Generative UI (Advanced)
Open Generative UI with host-side sandbox functions wired through the iframe bridge
Voice Input
Mic-to-text input via OpenAI Whisper, streamed into the chat composer
Tool-Based Generative UI
Agent uses a frontend tool to trigger rich generative UI inline in the chat
Human in the Loop (Step Selection)
Step-selection HITL surface rendered inline via `useHumanInTheLoop` (the LangGraph-specific `useLangGraphInterrupt` branch is a no-op on Mastra)
In-Chat HITL (Booking)
Time-picker card rendered inline via useHumanInTheLoop for a booking flow (alias of hitl-in-chat)
MCP Apps
MCP server-driven UI rendered inline via the runtime's mcpApps config and the built-in activity renderer
Tool Rendering + Reasoning Chain
Sequential tool calls rendered with per-tool components plus a reasoning chain rendered inline via a custom reasoningMessage slot
Reasoning: Default
Built-in CopilotChatReasoningMessage rendering with no slot override — the v1 bridge emits reasoning start/content/end events straight into the default renderer.
Reasoning: Custom
Visible reasoning/thinking chain alongside the final answer via a custom reasoningMessage slot.
Gen UI Interrupt (Frontend Tool)
In-chat time-picker via useFrontendTool with an async handler that blocks until the user picks a slot — Strategy B adaptation of the LangGraph interrupt primitive
Headless Interrupt (Frontend Tool)
Time-picker popup rendered outside the chat in the app surface — headless variant of the Strategy B interrupt adaptation
Background Agents
A long-running deep-research tool dispatched as a Mastra background task, surfaced inline as a live "working" activity card
Browser Use (Local Browser)
Mastra-only, real-LLM demo — the agent drives a real LOCAL headless browser (Playwright Chromium, no hosted-browser API key) to fetch top Hacker News stories or read a page, and renders the results inline in chat. Non-deterministic, so no aimock replay — requires `npx playwright install chromium` at runtime.
Observational Memory
Mastra Observational Memory compresses and activates conversation context out of band; the background work surfaces inline as activity cards via the runtime's observationalMemory surfacing toggle
CLI Start Command
Copy-paste command to clone the canonical starter
Agentic Chat
Natural conversation with frontend tool execution
Pre-Built: Sidebar
Docked sidebar chat via <CopilotSidebar />
Pre-Built: Popup
Floating popup chat via <CopilotPopup />
Chat Customization (Slots)
Customize CopilotChat via its slot system
Chat Customization (CSS)
Default CopilotChat re-themed via CopilotKitCSSProperties
Headless Chat (Simple)
Minimal custom chat surface built on useAgent
Headless Chat (Complete)
Full chat implementation built from scratch on useAgent
Reasoning: Default
Built-in CopilotChat reasoning rendering backed by native CrewAI Flow reasoning events
Reasoning: Custom
Native CrewAI reasoning tokens rendered through a custom reasoning message slot
In-Chat Human in the Loop
User approves agent actions before execution
In-Chat HITL (Booking)
Time-picker card rendered inline via useHumanInTheLoop for a booking flow
In-App Human in the Loop
Agent requests approval via useFrontendTool; the approval UI pops up as an app-level modal OUTSIDE the chat
In-Chat Human in the Loop (original)
Original CrewAI HITL demo — kept for backwards-compat
Tool Rendering
Custom per-tool renderers plus a wildcard catch-all for every other tool
Tool Rendering (Default Catch-all)
Out-of-the-box tool rendering — backend defines the tools; the frontend adds zero custom renderers and relies on CopilotKit's built-in default UI
Tool Rendering (Custom Catch-all)
Single branded wildcard renderer via useDefaultRenderTool — the same app-designed card paints every tool call
Tool Rendering + Reasoning Chain
Sequential tool calls with reasoning tokens side-by-side
Agentic Generative UI
Long-running agent tasks with generated UI
Tool-Based Generative UI
Agent uses tools to trigger UI generation
Frontend Tools (In-App Actions)
Agent invokes client-side handlers registered with useFrontendTool
Frontend Tools (Async)
useFrontendTool with an async handler
State Streaming
Per-token state delta streaming from agent to UI
Shared State (Read + Write)
Bidirectional shared state - UI writes preferences, agent writes notes
Sub-Agents
Supervisor delegates to research / writing / critique CrewAI sub-crews with a live delegation log
Readonly State (Agent Context)
Frontend provides read-only context to the agent via useAgentContext
Fully Open-Ended Generative UI
Agent generates UI from an arbitrary component library
Open-Ended Gen UI (Advanced)
Agent-authored UI that invokes host sandbox functions from inside the iframe
Agent Config Object
Forward a typed config object (tone / expertise / response length) from the provider to the agent
Authentication
Runtime-level bearer-token auth via the V2 onRequest hook
Voice Input
Speech-to-text transcription via @copilotkit/voice mounted on a per-demo runtime
Multimodal Attachments
Image and PDF uploads routed through the AG-UI attachment pipeline
Declarative Generative UI (A2UI - Dynamic Schema)
Branded A2UI components generated by a secondary LLM against a custom catalog
A2UI Fixed-Schema
Pre-authored component tree; the agent streams only data into the data model
A2UI Error Recovery
CrewAI Flow-owned validate-to-retry recovery that heals a malformed render or shows a graceful exhausted fallback
Beautiful Chat
Flagship showcase - polished brand-styled chat with A2UI, Open Generative UI, and shared-state todos
MCP Apps
MCP server-driven UI via activity renderers
Human in the Loop: Interrupts
Native CrewAI Flow human feedback rendered inline through useInterrupt
Headless Interrupt
Native CrewAI Flow human feedback rendered in the app surface outside chat
Start with CrewAI Flows
Scaffold a CrewAI Flow, then promote it to conversational mode
Agentic Chat
Natural conversation with frontend tool execution
Pre-Built: Sidebar
Docked sidebar chat via <CopilotSidebar />
Pre-Built: Popup
Floating popup chat via <CopilotPopup />
Chat Customization (Slots)
Customize CopilotChat via its slot system
Chat Customization (CSS)
Default CopilotChat re-themed via CopilotKitCSSProperties
Headless Chat (Simple)
Minimal custom chat surface built on useAgent
Headless Chat (Complete)
Full chat implementation built from scratch on useAgent
Reasoning: Default
Built-in CopilotChat reasoning rendering backed by native CrewAI Flow reasoning events
Reasoning: Custom
Native CrewAI reasoning tokens rendered through a custom reasoning message slot
In-Chat Human in the Loop
User approves agent actions before execution
In-Chat HITL (Booking)
Time-picker card rendered inline via useHumanInTheLoop for a booking flow
In-App Human in the Loop
Agent requests approval via useFrontendTool; the approval UI pops up as an app-level modal OUTSIDE the chat
In-Chat Human in the Loop (original)
Original CrewAI HITL demo — kept for backwards-compat
Tool Rendering
Custom per-tool renderers plus a wildcard catch-all for every other tool
Tool Rendering (Default Catch-all)
Out-of-the-box tool rendering — backend defines the tools; the frontend adds zero custom renderers and relies on CopilotKit's built-in default UI
Tool Rendering (Custom Catch-all)
Single branded wildcard renderer via useDefaultRenderTool — the same app-designed card paints every tool call
Tool Rendering + Reasoning Chain
Sequential tool calls with reasoning tokens side-by-side
Agentic Generative UI
Long-running agent tasks with generated UI
Tool-Based Generative UI
Agent uses tools to trigger UI generation
Frontend Tools (In-App Actions)
Agent invokes client-side handlers registered with useFrontendTool
Frontend Tools (Async)
useFrontendTool with an async handler
State Streaming
Per-token state delta streaming from agent to UI
Shared State (Read + Write)
Bidirectional shared state - UI writes preferences, agent writes notes
Sub-Agents
Supervisor delegates to research / writing / critique CrewAI sub-crews with a live delegation log
Readonly State (Agent Context)
Frontend provides read-only context to the agent via useAgentContext
Fully Open-Ended Generative UI
Agent generates UI from an arbitrary component library
Open-Ended Gen UI (Advanced)
Agent-authored UI that invokes host sandbox functions from inside the iframe
Agent Config Object
Forward a typed config object (tone / expertise / response length) from the provider to the agent
Authentication
Runtime-level bearer-token auth via the V2 onRequest hook
Voice Input
Speech-to-text transcription via @copilotkit/voice mounted on a per-demo runtime
Multimodal Attachments
Image and PDF uploads routed through the AG-UI attachment pipeline
Declarative Generative UI (A2UI - Dynamic Schema)
Branded A2UI components generated by a secondary LLM against a custom catalog
A2UI Fixed-Schema
Pre-authored component tree; the agent streams only data into the data model
A2UI Error Recovery
CrewAI Flow-owned validate-to-retry recovery that heals a malformed render or shows a graceful exhausted fallback
Beautiful Chat
Flagship showcase - polished brand-styled chat with A2UI, Open Generative UI, and shared-state todos
MCP Apps
MCP server-driven UI via activity renderers
Human in the Loop: Interrupts
Native CrewAI Flow human feedback rendered inline through useInterrupt
Headless Interrupt
Native CrewAI Flow human feedback rendered in the app surface outside chat
Emerging
CLI Start Command
Copy-paste command to clone the canonical starter
Agentic Chat
Natural conversation with frontend tool execution
Chat Customization (CSS)
Default CopilotChat re-themed via CopilotKitCSSProperties
Pre-Built: Sidebar
Docked sidebar chat via <CopilotSidebar />
Pre-Built: Popup
Floating popup chat via <CopilotPopup />
Chat Customization (Slots)
Customize CopilotChat via its slot system
Headless Chat (Simple)
Minimal custom chat surface built on useAgent
Headless Chat (Complete)
Full chat implementation built from scratch on useAgent
Frontend Tools (In-App Actions)
Agent invokes client-side handlers registered with useFrontendTool
Frontend Tools (Async)
useFrontendTool with an async handler
In-Chat HITL (useHumanInTheLoop)
Inline approval/decision surface via the ergonomic useHumanInTheLoop hook
In-Chat HITL (Booking)
Time-picker card rendered inline via useHumanInTheLoop for a booking flow
In-App Human in the Loop
Agent requests approval via async useFrontendTool; UI pops as an app-level modal
In-Chat HITL (Steps)
Agent pauses for user approval via step-based human-in-the-loop
Tool Rendering
Custom render for tool calls inline in the chat stream
Tool Rendering (Default Catch-all)
Out-of-the-box tool rendering — backend defines the tools; the frontend adds zero custom renderers and relies on CopilotKit's built-in default UI
Tool Rendering (Custom Catch-all)
Single branded wildcard renderer via useDefaultRenderTool — the same app-designed card paints every tool call
Tool Rendering + Reasoning Chain
Sequential tool calls with reasoning tokens rendered side-by-side
Agentic Generative UI
Long-running agent tasks with generated UI
Tool-Based Generative UI
Agent uses tools to trigger UI generation
Declarative Generative UI (A2UI)
Dynamic A2UI BYOC via a custom catalog
Declarative Generative UI (A2UI — Fixed Schema)
A2UI rendering against a known client-side schema
A2UI Error Recovery
Makes the A2UI validate->retry recovery loop visible — an invalid first render heals to a valid one, and an always-invalid render shows a graceful recovery-exhausted fallback. The Strands adapter runs the recovery loop on its auto-inject path; reuses the declarative-gen-ui catalog.
Shared State (Read + Write)
Bidirectional agent state — UI writes preferences, agent writes notes back
Shared State: Read-only
Recipe editor publishes form state via agent.setState; the agent reads the recipe context but does not mutate it (no backend tool — neutral default agent).
Sub-Agents
Multiple agents with visible task delegation
State Streaming
Per-token state delta streaming from agent to UI
Readonly State (Agent Context)
Frontend provides read-only context to the agent via useAgentContext
Multimodal Attachments
Image and PDF uploads via CopilotChat attachments
Voice Input
Speech-to-text via @copilotkit/voice with a bundled sample audio button
Authentication
Bearer-token gate via runtime onRequest hook
Agent Config Object
Forward a typed config object (tone / expertise / response length) from provider to agent
Declarative UI: Hashbrown
Streaming structured output via @hashbrownai/react, rendering a sales dashboard catalog (MetricCard + PieChart + BarChart)
Declarative UI: json-render
Streaming hierarchical JSON UI spec rendered via @json-render/react, with a Zod-validated catalog (MetricCard + PieChart + BarChart)
Open Generative UI (Minimal)
Agent-authored HTML/CSS/SVG in a sandboxed iframe, minimal variant
Open Generative UI (Advanced)
Sandboxed iframe that invokes host-registered sandbox functions via Websandbox.connection.remote
MCP Apps
MCP server-driven UI via activity renderers
Beautiful Chat
Polished landing-style chat surface with brand theming and suggestion pills
Reasoning: Default
Built-in CopilotChatReasoningMessage rendering with no slot override, so the bridge's reasoning start/content/end events land in the default renderer.
Reasoning: Custom
Visible reasoning/thinking chain alongside the final answer via a custom reasoningMessage slot.
In-Chat HITL (useInterrupt — low-level primitive)
Interactive component rendered inline in the chat via the lower-level `useInterrupt` primitive, driven by Strands' native `tool_context.interrupt()` on the backend
Headless Interrupt (testing)
Resolve interrupts from a plain button grid — no chat, no useInterrupt render prop
CLI Start Command
Copy-paste command to clone the canonical starter
Agentic Chat
Natural conversation with frontend tool execution
Chat Customization (CSS)
Default CopilotChat re-themed via CopilotKitCSSProperties
Pre-Built: Sidebar
Docked sidebar chat via <CopilotSidebar />
Pre-Built: Popup
Floating popup chat via <CopilotPopup />
Chat Customization (Slots)
Customize CopilotChat via its slot system
Headless Chat (Simple)
Minimal custom chat surface built on useAgent
Headless Chat (Complete)
Full chat implementation built from scratch on useAgent
Frontend Tools (In-App Actions)
Agent invokes client-side handlers registered with useFrontendTool
Frontend Tools (Async)
useFrontendTool with an async handler
In-Chat HITL (useHumanInTheLoop)
Inline approval/decision surface via the ergonomic useHumanInTheLoop hook
In-Chat HITL (Booking)
Time-picker card rendered inline via useHumanInTheLoop for a booking flow
In-App Human in the Loop
Agent requests approval via async useFrontendTool; UI pops as an app-level modal
In-Chat HITL (Steps)
Agent pauses for user approval via step-based human-in-the-loop
Tool Rendering
Custom render for tool calls inline in the chat stream
Tool Rendering (Default Catch-all)
Out-of-the-box tool rendering — backend defines the tools; the frontend adds zero custom renderers and relies on CopilotKit's built-in default UI
Tool Rendering (Custom Catch-all)
Single branded wildcard renderer via useDefaultRenderTool — the same app-designed card paints every tool call
Tool Rendering + Reasoning Chain
Sequential tool calls with reasoning tokens rendered side-by-side
Agentic Generative UI
Long-running agent tasks with generated UI
Tool-Based Generative UI
Agent uses tools to trigger UI generation
Declarative Generative UI (A2UI)
Dynamic A2UI BYOC via a custom catalog
Declarative Generative UI (A2UI — Fixed Schema)
A2UI rendering against a known client-side schema
A2UI Error Recovery
Makes the A2UI validate->retry recovery loop visible — an invalid first render heals to a valid one, and an always-invalid render shows a graceful recovery-exhausted fallback. The Strands adapter runs the recovery loop on its auto-inject path; reuses the declarative-gen-ui catalog.
Shared State (Read + Write)
Bidirectional agent state — UI writes preferences, agent writes notes back
Shared State: Read-only
Recipe editor publishes form state via agent.setState; the agent reads the recipe context but does not mutate it (no backend tool — neutral default agent).
Sub-Agents
Multiple agents with visible task delegation
State Streaming
Per-token state delta streaming from agent to UI
Readonly State (Agent Context)
Frontend provides read-only context to the agent via useAgentContext
Multimodal Attachments
Image and PDF uploads via CopilotChat attachments
Voice Input
Speech-to-text via @copilotkit/voice with a bundled sample audio button
Authentication
Bearer-token gate via runtime onRequest hook
Agent Config Object
Forward a typed config object (tone / expertise / response length) from provider to agent
Declarative UI: Hashbrown
Streaming structured output via @hashbrownai/react, rendering a sales dashboard catalog (MetricCard + PieChart + BarChart)
Declarative UI: json-render
Streaming hierarchical JSON UI spec rendered via @json-render/react, with a Zod-validated catalog (MetricCard + PieChart + BarChart)
Open Generative UI (Minimal)
Agent-authored HTML/CSS/SVG in a sandboxed iframe, minimal variant
Open Generative UI (Advanced)
Sandboxed iframe that invokes host-registered sandbox functions via Websandbox.connection.remote
MCP Apps
MCP server-driven UI via activity renderers
Beautiful Chat
Polished landing-style chat surface with brand theming and suggestion pills
Reasoning: Default
Built-in CopilotChatReasoningMessage rendering with no slot override, so the bridge's reasoning start/content/end events land in the default renderer.
Reasoning: Custom
Visible reasoning/thinking chain alongside the final answer via a custom reasoningMessage slot.
In-Chat HITL (useInterrupt — low-level primitive)
Interactive component rendered inline in the chat via the lower-level `useInterrupt` primitive, driven by Strands' native `tool_context.interrupt()` on the backend
Headless Interrupt (testing)
Resolve interrupts from a plain button grid — no chat, no useInterrupt render prop