import { Card, CardHeader, CardTitle, CardContent, CardDescription } from "@/components/ui/card"; import { cn } from "@/lib/utils"; import { ADKIcon, MastraIcon, LlamaIndexIcon, AG2Icon, AgnoIcon, PydanticAIIcon } from "@/lib/icons/custom-icons"; import { SiCrewai } from "@icons-pack/react-simple-icons"; import { SiLangchain } from "react-icons/si"; import { FaMicrosoft } from "react-icons/fa"; import { Brain } from "lucide-react"; import { RocketIcon } from "lucide-react"; interface Integration { title: string; description?: string; logo: React.ReactNode; bgGradient: string; href: string; } interface IntegrationCardProps { integration: Integration; className?: string; } const integrations: Integration[] = [ { title: "Direct to LLM", description: "Use CopilotKit directly with your LLM of choice. No framework required.", logo: , bgGradient: "bg-gradient-to-b from-green-700 to-green-400 text-green-100", href: "/direct-to-llm", }, { title: "LangGraph", description: "LangGraph is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-gradient-to-b from-purple-700 to-purple-400 text-purple-100", href: "/coagents", }, { title: "Microsoft", description: "Microsoft Agent Framework is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-gradient-to-b from-blue-700 to-blue-400 text-blue-100", href: "/microsoft-agent-framework", }, { title: "Mastra", description: "Mastra is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-gradient-to-b from-black to-zinc-800 text-white", href: "/mastra", }, { title: "Pydantic AI", description: "Pydantic AI is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-[#ED2762] text-white", href: "/pydantic-ai", }, { title: "Google ADK", description: "ADK is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-[#FF3C1A] text-white", href: "/adk", }, { title: "Agno", description: "Agno is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-[#FF3C1A] text-white", href: "/agno", }, { title: "LlamaIndex", description: "LlamaIndex is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-gradient-to-b from-pink-500 via-purple-500 to-blue-400 text-pink-100", href: "/llamaindex", }, { title: "CrewAI - Crews", description: "CrewAI is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-gradient-to-b from-[#FA694C] to-[#FE8A71] text-white", href: "/crewai-crews", }, { title: "CrewAI - Flows", description: "CrewAI is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-gradient-to-b from-[#FA694C] to-[#FE8A71] text-white", href: "/crewai-flows", }, { title: "AutoGen2", description: "AutoGen2 is a framework for building and deploying AI agents.", logo: , bgGradient: "bg-gradient-to-b from-indigo-700 to-indigo-400 text-indigo-100", href: "/ag2", }, // Add more integrations here ]; const IntegrationCard: React.FC = ({ integration, className, }) => { const { title, logo, href } = integration; return ( {title}
{logo}
); }; interface IntegrationsGridProps { targetPage?: string; suppressDirectToLLM?: boolean; } const IntegrationsGrid: React.FC = ({ targetPage, suppressDirectToLLM = false }) => { const hasTargetPage = (integration: Integration, targetPage: string): boolean => { // Direct to LLM special cases if (integration.title === "Direct to LLM") { return targetPage === "generative-ui" || targetPage === "frontend-actions"; } // AutoGen2 missing pages if (integration.title === "AutoGen2") { return targetPage !== "generative-ui" && targetPage !== "shared-state"; } // Frameworks that don't have shared-state pages if (targetPage === "shared-state") { return !["LlamaIndex", "Mastra", "AutoGen2", "Agno"].includes(integration.title); } // All other frameworks have the standard pages return true; }; const getHref = (integration: Integration) => { if (!targetPage) { return integration.href; } // Special cases where certain frameworks have pages in different locations if (integration.title === "Direct to LLM") { if (targetPage === "generative-ui") { return "/direct-to-llm/guides/generative-ui"; } if (targetPage === "frontend-actions") { return "/direct-to-llm/guides/frontend-actions"; } } // For other frameworks, append the target page return `${integration.href}/${targetPage}`; }; let filteredIntegrations = integrations; // Hide Microsoft Agent Framework from the integrations grid // TODO: Remove this once Microsoft Agent Framework support is announced filteredIntegrations = filteredIntegrations.filter((integration) => { return !integration.title.toLowerCase().includes("microsoft"); }); // Filter out Direct to LLM if suppressed if (suppressDirectToLLM) { filteredIntegrations = filteredIntegrations.filter(integration => integration.title !== "Direct to LLM"); } // Filter out integrations that don't have the target page if (targetPage) { filteredIntegrations = filteredIntegrations.filter(integration => hasTargetPage(integration, targetPage)); } return (
{filteredIntegrations.map((integration, index) => (
{integration.logo}
{integration.title}
))}
); }; export { IntegrationCard, IntegrationsGrid, integrations }; export type { IntegrationsGridProps };