import React, { useState, useMemo, useCallback } from 'react'; import { LineChart, Line, BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend, RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar } from 'recharts'; import { TrendingUp, Shield, Star, Users, CheckCircle, AlertTriangle, Zap, Globe, Code, Database, Layers, ChevronDown, ChevronUp, Download, Share2, Search, Filter } from 'lucide-react'; // Mock data based on research report const PLATFORM_DATA = [ { id: 'dify', name: 'Dify', logo: '🔷', color: '#3b82f6', overall_score: 92, market_share: 28, ease_of_use: 4.5, community_size: 100000, pricing_free: true, pricing_paid: 59, sentiment: { positive: 78, neutral: 18, negative: 4 }, capabilities: { visual_builder: 95, multi_agent: 85, rag: 90, llmops: 95, integrations: 75, enterprise: 88 }, description: 'Open-source LLMOps platform for production-ready agentic workflow development with visual orchestration, observability, and deployment.', strengths: ['Unified LLMOps approach', 'Production-ready monitoring', 'Flexible hybrid deployment', '50+ pre-built tools', 'Clear enterprise upgrade path'], weaknesses: ['Learning curve for LLMOps features', 'Pricing opacity for enterprise', 'Smaller third-party ecosystem vs LangChain'], best_for: ['Teams building multiple AI apps', 'Organizations needing observability', 'Mid-market B2B firms'], features: { 'Visual Workflow Builder': 5, 'Multi-Agent Support': 4, 'RAG Integration': 5, 'LLMOps/Monitoring': 5, 'Plugin System': 4, 'API/MCP Support': 5, 'Human Approval': 4, 'Code Export': 3, 'Cloud Deployment': 5, 'Self-Host Option': 5 } }, { id: 'crewai', name: 'CrewAI', logo: '👥', color: '#10b981', overall_score: 88, market_share: 22, ease_of_use: 4.3, community_size: 45900, pricing_free: true, pricing_paid: 99, sentiment: { positive: 82, neutral: 15, negative: 3 }, capabilities: { visual_builder: 75, multi_agent: 98, rag: 70, llmops: 80, integrations: 80, enterprise: 85 }, description: 'Open-source framework for orchestrating role-playing, autonomous AI agents that work together seamlessly on complex tasks.', strengths: ['Multi-agent specialization', 'Role-based agent design', 'Rapid prototyping', '100k+ certified developers', 'Gradual hardening path'], weaknesses: ['Python-only', 'Common case optimization', 'Hosted features require paid tiers'], best_for: ['Multi-agent systems', 'Complex task decomposition', 'Enterprise compliance workflows'], features: { 'Visual Workflow Builder': 3, 'Multi-Agent Support': 5, 'RAG Integration': 3, 'LLMOps/Monitoring': 4, 'Plugin System': 4, 'API/MCP Support': 5, 'Human Approval': 5, 'Code Export': 5, 'Cloud Deployment': 4, 'Self-Host Option': 5 } }, { id: 'autogen', name: 'AutoGen', logo: '💬', color: '#8b5cf6', overall_score: 85, market_share: 18, ease_of_use: 3.8, community_size: 35000, pricing_free: true, pricing_paid: 0, sentiment: { positive: 72, neutral: 22, negative: 6 }, capabilities: { visual_builder: 70, multi_agent: 95, rag: 80, llmops: 85, integrations: 75, enterprise: 95 }, description: "Microsoft's conversation-driven multi-agent framework, converged into Microsoft Agent Framework for enterprise production.", strengths: ['Microsoft/Azure backing', 'Enterprise-grade architecture', 'Python + .NET support', 'Standards compliance (MCP, A2A)', 'Type safety'], weaknesses: ['Version confusion (v0.2 vs v0.4)', 'Azure ecosystem dependency', 'Learning curve for enterprise features'], best_for: ['Azure enterprise integration', '.NET shops', 'Complex multi-agent conversations'], features: { 'Visual Workflow Builder': 3, 'Multi-Agent Support': 5, 'RAG Integration': 4, 'LLMOps/Monitoring': 4, 'Plugin System': 4, 'API/MCP Support': 5, 'Human Approval': 4, 'Code Export': 5, 'Cloud Deployment': 5, 'Self-Host Option': 5 } }, { id: 'n8n', name: 'n8n', logo: '⚡', color: '#f59e0b', overall_score: 90, market_share: 32, ease_of_use: 4.7, community_size: 150000, pricing_free: true, pricing_paid: 24, sentiment: { positive: 85, neutral: 12, negative: 3 }, capabilities: { visual_builder: 95, multi_agent: 60, rag: 65, llmops: 80, integrations: 98, enterprise: 82 }, description: 'Workflow automation platform with AI agent capabilities, combining 500+ integrations with AI nodes for reliable production automation.', strengths: ['500+ integrations', 'Execution-based pricing transparency', 'Human-in-the-loop approvals', 'DevOps maturity', 'Hybrid deployment'], weaknesses: ['Not true autonomous agents', 'Execution costs at scale', 'Workflow-centric vs agent-centric'], best_for: ['Business process automation', 'Multi-step workflows with approvals', 'Integration-heavy scenarios'], features: { 'Visual Workflow Builder': 5, 'Multi-Agent Support': 3, 'RAG Integration': 3, 'LLMOps/Monitoring': 4, 'Plugin System': 5, 'API/MCP Support': 4, 'Human Approval': 5, 'Code Export': 3, 'Cloud Deployment': 5, 'Self-Host Option': 5 } }, { id: 'langflow', name: 'Langflow', logo: '🔮', color: '#ec4899', overall_score: 84, market_share: 15, ease_of_use: 4.6, community_size: 28000, pricing_free: true, pricing_paid: 0, sentiment: { positive: 80, neutral: 16, negative: 4 }, capabilities: { visual_builder: 98, multi_agent: 80, rag: 95, llmops: 70, integrations: 70, enterprise: 75 }, description: 'Low-code visual AI builder for agentic and RAG applications with Python code export and built-in API/MCP servers.', strengths: ['Developer-friendly visual builder', 'Python code export', 'Rapid prototyping', 'Full LLM/vector DB support', 'DataStax backing'], weaknesses: ['Less enterprise features vs Dify', 'Pricing clarity (DataStax cloud)', 'Newer platform ecosystem'], best_for: ['Rapid LLM prototyping', 'RAG application development', 'Visual development with code export'], features: { 'Visual Workflow Builder': 5, 'Multi-Agent Support': 4, 'RAG Integration': 5, 'LLMOps/Monitoring': 3, 'Plugin System': 4, 'API/MCP Support': 5, 'Human Approval': 3, 'Code Export': 5, 'Cloud Deployment': 4, 'Self-Host Option': 5 } } ]; const FEATURE_CATEGORIES = [ { name: 'Core Capabilities', features: ['Visual Workflow Builder', 'Multi-Agent Support', 'RAG Integration'] }, { name: 'Operations', features: ['LLMOps/Monitoring', 'Plugin System', 'API/MCP Support'] }, { name: 'Enterprise', features: ['Human Approval', 'Code Export', 'Cloud Deployment', 'Self-Host Option'] } ]; const CAPABILITY_DATA = PLATFORM_DATA.map(p => ({ subject: p.name, A: p.capabilities.visual_builder, B: p.capabilities.multi_agent, C: p.capabilities.rag, D: p.capabilities.llmops, E: p.capabilities.integrations, F: p.capabilities.enterprise, fullMark: 100 })); const PRICING_DATA = PLATFORM_DATA.map(p => ({ name: p.name, free: p.pricing_free ? 0 : 1, paid: p.pricing_paid, color: p.color })); export default function App() { const [selectedPlatforms, setSelectedPlatforms] = useState(['dify', 'crewai', 'autogen', 'n8n', 'langflow']); const [expandedCards, setExpandedCards] = useState([]); const [featureFilter, setFeatureFilter] = useState(''); const [activeTab, setActiveTab] = useState<'overview' | 'features' | 'details'>('overview'); const togglePlatform = useCallback((id: string) => { setSelectedPlatforms(prev => prev.includes(id) ? prev.filter(p => p !== id) : [...prev, id] ); }, []); const toggleCard = useCallback((id: string) => { setExpandedCards(prev => prev.includes(id) ? prev.filter(c => c !== id) : [...prev, id] ); }, []); const filteredPlatforms = useMemo(() => PLATFORM_DATA.filter(p => selectedPlatforms.includes(p.id)), [selectedPlatforms] ); const filteredFeatures = useMemo(() => { if (!featureFilter) return FEATURE_CATEGORIES; return FEATURE_CATEGORIES.map(cat => ({ ...cat, features: cat.features.filter(f => f.toLowerCase().includes(featureFilter.toLowerCase())) })).filter(cat => cat.features.length > 0); }, [featureFilter]); const renderStarRating = (rating: number) => { return (
{[1, 2, 3, 4, 5].map(star => ( ★ ))}
); }; const getRatingColor = (score: number) => { if (score >= 4.5) return 'text-emerald-400'; if (score >= 3.5) return 'text-amber-400'; return 'text-red-400'; }; return (
{/* Header */}

Competitive Analysis

AI Agent Platforms Comparison

{/* Tabs */}
{(['overview', 'features', 'details'] as const).map(tab => ( ))}
{/* Platform Selector */}
{PLATFORM_DATA.map(platform => ( ))}
{/* Overview Tab */} {activeTab === 'overview' && ( <> {/* KPI Row */}
Avg Overall Score
{filteredPlatforms.length > 0 ? Math.round(filteredPlatforms.reduce((sum, p) => sum + p.overall_score, 0) / filteredPlatforms.length) : 0}
Top performers
Total Market Share
{filteredPlatforms.reduce((sum, p) => sum + p.market_share, 0)}%
Of AI agent platform market
Total Community
{(filteredPlatforms.reduce((sum, p) => sum + p.community_size, 0) / 1000).toFixed(0)}K
Growing ecosystem
Ease of Use
{filteredPlatforms.length > 0 ? (filteredPlatforms.reduce((sum, p) => sum + p.ease_of_use, 0) / filteredPlatforms.length).toFixed(1) : 0}
Out of 5.0 rating
{/* Charts Grid */}
{/* Radar Chart */}

Capability Comparison

selectedPlatforms.includes(d.subject.toLowerCase().replace(' ', '')))}> {filteredPlatforms.map((platform, idx) => ( { const pData = PLATFORM_DATA.find(p => p.name === d.subject); return pData ? pData.capabilities[['visual_builder', 'multi_agent', 'rag', 'llmops', 'integrations', 'enterprise'][idx % 6]] : 0; }} stroke={platform.color} fill={platform.color} fillOpacity={0.2} /> ))}
{/* Pricing Chart */}

Pricing Comparison (Monthly)

selectedPlatforms.includes(d.name.toLowerCase()))} layout="vertical">
{/* Sentiment Analysis */}

User Sentiment Analysis

{filteredPlatforms.map(platform => (
{platform.name}
{platform.sentiment.positive}%
))}
Positive
Neutral
Negative
)} {/* Features Tab */} {activeTab === 'features' && (

Feature Comparison Matrix

setFeatureFilter(e.target.value)} className="pl-9 pr-4 py-2 rounded-lg bg-slate-800 border border-slate-600 text-sm text-white placeholder-slate-400 focus:outline-none focus:border-blue-500" />
{filteredPlatforms.map(p => ( ))} {filteredFeatures.map((category, catIdx) => ( {category.features.map((feature, featIdx) => ( {filteredPlatforms.map(p => ( ))} ))} ))}
Feature {p.logo} {p.name}
{category.name}
{feature} {renderStarRating(p.features[feature as keyof typeof p.features] || 0)}
Rating:
{renderStarRating(5)}
= Excellent
{renderStarRating(3)}
= Average
)} {/* Details Tab */} {activeTab === 'details' && (
{filteredPlatforms.map(platform => (
toggleCard(platform.id)} >
{platform.logo}

{platform.name}

{renderStarRating(Math.round(platform.overall_score / 20))} • {platform.overall_score}/100
{expandedCards.includes(platform.id) ? ( ) : ( )}
{expandedCards.includes(platform.id) && (

{platform.description}

Strengths

    {platform.strengths.map((s, i) => (
  • {s}
  • ))}

Limitations

    {platform.weaknesses.map((w, i) => (
  • {w}
  • ))}

Best For

{platform.best_for.map((b, i) => ( {b} ))}
Starting Price
{platform.pricing_paid === 0 ? 'Free' : `$${platform.pricing_paid}/mo`}
Community
{(platform.community_size / 1000).toFixed(0)}K
)}
))}
)} {/* Footer */}
); }