Mastra CopilotKit Server

This Next.js server provides CopilotKit integration.

Available Endpoints:

How to use:

In your frontend, connect to this server:

<CopilotKit
  runtimeUrl="http://localhost:3000/api/copilotkit"
  agent="superAgent"
>
  {/* Your app */}
</CopilotKit>

Two entry points:

  1. Mastra Server: npm run dev (port 4111) - Pure Mastra agents
  2. Next.js Server: npm run dev:copilot (port 3000) - CopilotKit integration