---
title: Introduction
icon: "custom/mastra"
description: Bring your Mastra agents to your users with CopilotKit via AG-UI.
hideHeader: true
---
import { customIcons } from "@/lib/icons/custom-icons";
import { FrameworkOverview } from "@/components/content/landing-pages/framework-overview";

<FrameworkOverview
  frameworkName="Mastra"
  frameworkIcon={<customIcons.mastra className="h-12 w-12" />}
  header="Bring your Mastra agents to your users"
  subheader="Give your Mastra agents real user-interactivity using CopilotKit and AG-UI. Build rich, interactive, agent-powered applications."
  bannerVideo="https://cdn.copilotkit.ai/docs/copilotkit/videos/coagents/overview.mp4"
  guideLink="/mastra/quickstart"
  initCommand="npx copilotkit@latest init"
  featuresLink="https://feature-viewer.copilotkit.ai/mastra/feature/agentic_chat"
  supportedFeatures={[
    {
      title: "Generative UI",
      description: "Render your agent's state, progress, outputs, and tool calls with custom UI components in real-time. Bridges the gap between AI agents and user interfaces.",
      documentationLink: "/mastra/generative-ui/backend-tools",
      demoLink: "https://feature-viewer.copilotkit.ai/mastra/feature/tool_based_generative_ui",
      videoUrl: "https://cdn.copilotkit.ai/docs/copilotkit/videos/coagents/haiku.mp4"
    },
    {
      title: "Human in the Loop",
      description: "Empower users to guide agents at key checkpoints. Combine the best of AI and human judgment for more reliable and controllable agent behavior.",
      documentationLink: "/mastra/human-in-the-loop",
      demoLink: "https://examples-coagents-ai-travel-app.vercel.app/",
      videoUrl: "https://cdn.copilotkit.ai/docs/copilotkit/images/coagents/human-in-the-loop-example.mp4"
    },
    {
      title: "Shared State",
      description: "Keep your agent and your app in sync. Your agent can see everything in your app, and your app can react to your agent in real-time.",
      documentationLink: "/mastra/shared-state/in-app-agent-read",
      demoLink: "https://feature-viewer.copilotkit.ai/mastra/feature/shared_state",
      videoUrl: "https://cdn.copilotkit.ai/docs/copilotkit/videos/coagents/shared-state.mp4"
    }
  ]}
  architectureImage="https://cdn.copilotkit.ai/docs/copilotkit/images/mastra/overview.png"
  liveDemos={[
    {
      type: "saas",
      title: "SaaS Copilot",
      description: "A traditional SaaS application enhanced with AI agents. These copilots integrate seamlessly into existing workflows, providing intelligent assistance for specific business processes. Perfect for customer service, sales automation, project management, and domain-specific tasks where users need guided, step-by-step AI assistance.",
      iframeUrl: "https://examples-coagents-ai-travel-app.vercel.app?copilotOpen=true"
    },
    {
      type: "canvas",
      title: "Canvas Copilot",
      description: "An infinite canvas interface where users collaborate with AI agents in a spatial, visual environment. These copilots excel at research, brainstorming, content creation, and complex problem-solving where information needs to be organized, connected, and explored in a non-linear, creative way.",
      iframeUrl: "https://examples-coagents-research-canvas-ui.vercel.app/"
    }
  ]}
/>
