/* ┌──────────────────────────────────────────────────────────────────────────────┐ │ @author: Davidson Gomes │ │ @file: /app/documentation/components/QuickStartTemplates.tsx │ │ Developed by: Davidson Gomes │ │ Creation date: May 13, 2025 │ │ Contact: contato@evolution-api.com │ ├──────────────────────────────────────────────────────────────────────────────┤ │ @copyright © Evolution API 2025. All rights reserved. │ │ Licensed under the Apache License, Version 2.0 │ │ │ │ You may not use this file except in compliance with the License. │ │ You may obtain a copy of the License at │ │ │ │ http://www.apache.org/licenses/LICENSE-2.0 │ │ │ │ Unless required by applicable law or agreed to in writing, software │ │ distributed under the License is distributed on an "AS IS" BASIS, │ │ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. │ │ See the License for the specific language governing permissions and │ │ limitations under the License. │ ├──────────────────────────────────────────────────────────────────────────────┤ │ @important │ │ For any future changes to the code in this file, it is recommended to │ │ include, together with the modification, the information of the developer │ │ who changed it and the date of modification. │ └──────────────────────────────────────────────────────────────────────────────┘ */ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { MessageSquare, FileText, Zap, Settings, Users, Play } from "lucide-react"; interface QuickStartTemplate { id: string; name: string; description: string; icon: any; method: string; message: string; useCase: string; } interface QuickStartTemplatesProps { onSelectTemplate: (template: QuickStartTemplate) => void; } export function QuickStartTemplates({ onSelectTemplate }: QuickStartTemplatesProps) { const templates: QuickStartTemplate[] = [ { id: "hello", name: "Hello Agent", description: "Simple greeting to test agent connectivity", icon: MessageSquare, method: "message/send", message: "Hello! Can you introduce yourself and tell me what you can do?", useCase: "Basic connectivity test" }, { id: "analysis", name: "Data Analysis", description: "Request data analysis and insights", icon: FileText, method: "message/send", message: "Please analyze the current market trends in AI technology and provide key insights with recommendations.", useCase: "Complex analytical tasks" }, { id: "streaming", name: "Long Content", description: "Generate lengthy content with streaming", icon: Zap, method: "message/stream", message: "Write a comprehensive guide about implementing the Agent2Agent protocol, including technical details, best practices, and code examples.", useCase: "Streaming responses" }, { id: "task-query", name: "Task Status", description: "Query the status of a running task", icon: Settings, method: "tasks/get", message: "", useCase: "Task management" }, { id: "capabilities", name: "Agent Capabilities", description: "Discover agent capabilities and skills", icon: Users, method: "agent/authenticatedExtendedCard", message: "", useCase: "Agent discovery" } ]; const getMethodColor = (method: string) => { switch (method) { case 'message/send': return 'bg-emerald-500/20 text-emerald-400 border-emerald-500/30'; case 'message/stream': return 'bg-blue-500/20 text-blue-400 border-blue-500/30'; case 'tasks/get': return 'bg-purple-500/20 text-purple-400 border-purple-500/30'; case 'tasks/cancel': return 'bg-red-500/20 text-red-400 border-red-500/30'; case 'agent/authenticatedExtendedCard': return 'bg-orange-500/20 text-orange-400 border-orange-500/30'; default: return 'bg-neutral-500/20 text-neutral-400 border-neutral-500/30'; } }; return ( Quick Start Templates

Choose a template to quickly test different A2A protocol methods

{templates.map((template) => { const IconComponent = template.icon; return (
onSelectTemplate(template)} >

{template.name}

{template.useCase}

{template.description}

{template.method}
); })}

💡 Tip: These templates automatically configure the correct A2A method and provide example messages. Simply select one and customize the agent URL and authentication.

); }