CrewAI의 핵심에는 에이전트가 있습니다. 에이전트는 협업 프레임워크 내에서 특정 역할을 수행하도록 설계된 전문화된 AI 엔터티입니다. 기본적인 에이전트를 만드는 것은 간단하지만, 진정으로 효과적이고 탁월한 결과를 만들어내는 에이전트를 설계하려면 주요 설계 원칙과 모범 사례를 이해해야 합니다.이 가이드는 여러분이 에이전트 설계의 예술을 마스터할 수 있도록 도와줍니다. 이를 통해 효과적으로 협업하고, 비판적으로 사고하며, 특정 요구에 맞춤화된 고품질 결과물을 만들어내는 전문화된 AI 페르소나를 설계할 수 있게 됩니다.
효과적인 AI 시스템을 구축할 때 이 중요한 원칙을 기억하세요: 노력의 80%는 작업 설계에, 20%만 에이전트 정의에 투자해야 합니다.왜일까요? 아무리 완벽하게 정의된 에이전트라도 잘못된 작업 설계에서는 실패하지만, 잘 설계된 작업은 단순한 에이전트까지도 뛰어나게 만들 수 있기 때문입니다. 즉,
대부분의 시간을 명확한 작업 지침 작성에 할애하세요
상세한 입력과 예상 결과를 정의하세요
실행을 안내할 예시와 컨텍스트를 추가하세요
남은 시간에는 에이전트 역할, 목표, 배경에 집중하세요
이는 에이전트 설계가 중요하지 않다는 의미가 아닙니다. 분명히 중요합니다. 하지만 실행 실패의 대부분은 작업 설계에서 발생하므로, 그에 따라 우선순위를 두어야 합니다.
역할은 에이전트가 수행하는 일과 전문 분야를 정의합니다. 역할을 설계할 때는 다음을 준수하세요:
구체적이고 전문적으로 작성하세요: “작가” 대신 “기술 문서 전문가”나 “창의적 스토리텔러”처럼 명확하게 표현하세요.
현실 세계의 직업과 일치시키세요: 역할을 잘 알려진 직업 유형에 기반하세요.
도메인 전문성을 포함하세요: 에이전트의 지식 분야를 명확히 하세요 (예: “시장 동향에 특화된 금융 분석가”).
효과적인 역할 예시:
Copy
Ask AI
role: "Senior UX Researcher specializing in user interview analysis"role: "Full-Stack Software Architect with expertise in distributed systems"role: "Corporate Communications Director specializing in crisis management"
목표는 에이전트의 노력을 이끌고 의사 결정 과정을 형성합니다. 효과적인 목표는 다음과 같아야 합니다:
명확하고 결과 중심적이어야 함: 에이전트가 달성하려는 것이 무엇인지 정의합니다.
품질 기준을 강조해야 함: 작업의 품질에 대한 기대치를 포함합니다.
성공 기준을 통합해야 함: “좋음”이 무엇인지 에이전트가 이해할 수 있도록 도와줍니다.
효과적인 목표의 예시:
Copy
Ask AI
goal: "Uncover actionable user insights by analyzing interview data and identifying recurring patterns, unmet needs, and improvement opportunities"goal: "Design robust, scalable system architectures that balance performance, maintainability, and cost-effectiveness"goal: "Craft clear, empathetic crisis communications that address stakeholder concerns while protecting organizational reputation"
배경 이야기는 에이전트에게 깊이를 부여하며, 문제를 해결하고 타인과 상호작용하는 방식에 영향을 미칩니다. 좋은 배경 이야기는 다음과 같습니다:
전문성과 경험을 확립: 에이전트가 어떻게 자신의 기술을 습득했는지 설명합니다.
업무 스타일 및 가치를 정의: 에이전트가 일에 어떻게 접근하는지 설명합니다.
통합된 페르소나 생성: 배경 이야기의 모든 요소가 역할과 목표에 부합하는지 확인합니다.
효과적인 배경 이야기 예시:
Copy
Ask AI
backstory: "You have spent 15 years conducting and analyzing user research for top tech companies. You have a talent for reading between the lines and identifying patterns that others miss. You believe that good UX is invisible and that the best insights come from listening to what users don't say as much as what they do say."backstory: "With 20+ years of experience building distributed systems at scale, you've developed a pragmatic approach to software architecture. You've seen both successful and failed systems and have learned valuable lessons from each. You balance theoretical best practices with practical constraints and always consider the maintenance and operational aspects of your designs."backstory: "As a seasoned communications professional who has guided multiple organizations through high-profile crises, you understand the importance of transparency, speed, and empathy in crisis response. You have a methodical approach to crafting messages that address concerns while maintaining organizational credibility."
role: "Writer"goal: "Write good content"backstory: "You are a writer who creates content for websites."
이후:
Copy
Ask AI
role: "B2B Technology Content Strategist"goal: "Create compelling, technically accurate content that explains complex topics in accessible language while driving reader engagement and supporting business objectives"backstory: "You have spent a decade creating content for leading technology companies, specializing in translating technical concepts for business audiences. You excel at research, interviewing subject matter experts, and structuring information for maximum clarity and impact. You believe that the best B2B content educates first and sells second, building trust through genuine expertise rather than marketing hype."
role: "Researcher"goal: "Find information"backstory: "You are good at finding information online."
변경 후:
Copy
Ask AI
role: "Academic Research Specialist in Emerging Technologies"goal: "Discover and synthesize cutting-edge research, identifying key trends, methodologies, and findings while evaluating the quality and reliability of sources"backstory: "With a background in both computer science and library science, you've mastered the art of digital research. You've worked with research teams at prestigious universities and know how to navigate academic databases, evaluate research quality, and synthesize findings across disciplines. You're methodical in your approach, always cross-referencing information and tracing claims to primary sources before drawing conclusions."
작업은 하나의 명확한 목표에 집중할 때 가장 좋은 성과를 냅니다:나쁜 예시(너무 광범위함):
Copy
Ask AI
task_description: "Research market trends, analyze the data, and create a visualization."
좋은 예시(집중됨):
Copy
Ask AI
# Task 1research_task: description: "Research the top 5 market trends in the AI industry for 2024." expected_output: "A markdown list of the 5 trends with supporting evidence."# Task 2analysis_task: description: "Analyze the identified trends to determine potential business impacts." expected_output: "A structured analysis with impact ratings (High/Medium/Low)."# Task 3visualization_task: description: "Create a visual representation of the analyzed trends." expected_output: "A description of a chart showing trends and their impact ratings."
analysis_task: description: > Analyze the customer feedback data from the CSV file. Focus on identifying recurring themes related to product usability. Consider sentiment and frequency when determining importance. expected_output: > A markdown report with the following sections: 1. Executive summary (3-5 bullet points) 2. Top 3 usability issues with supporting data 3. Recommendations for improvement
competitor_analysis_task: description: > Analyze our three main competitors' pricing strategies. This analysis will inform our upcoming pricing model revision. Focus on identifying patterns in how they price premium features and how they structure their tiered offerings.
data_extraction_task: description: "Extract key metrics from the quarterly report." expected_output: "JSON object with the following keys: revenue, growth_rate, customer_acquisition_cost, and retention_rate."
문제: 작업에 충분한 세부 정보가 없어 에이전트가 효과적으로 실행하기 어렵습니다.잘못 설계된 예시:
Copy
Ask AI
research_task: description: "Research AI trends." expected_output: "A report on AI trends."
개선된 버전:
Copy
Ask AI
research_task: description: > Research the top emerging AI trends for 2024 with a focus on: 1. Enterprise adoption patterns 2. Technical breakthroughs in the past 6 months 3. Regulatory developments affecting implementation For each trend, identify key companies, technologies, and potential business impacts. expected_output: > A comprehensive markdown report with: - Executive summary (5 bullet points) - 5-7 major trends with supporting evidence - For each trend: definition, examples, and business implications - References to authoritative sources
comprehensive_task: description: "Research market trends, analyze competitor strategies, create a marketing plan, and design a launch timeline."
개선된 버전:
이 작업을 순차적이고 집중된 태스크로 분리하세요:
Copy
Ask AI
# Task 1: Researchmarket_research_task: description: "Research current market trends in the SaaS project management space." expected_output: "A markdown summary of key market trends."# Task 2: Competitive Analysiscompetitor_analysis_task: description: "Analyze strategies of the top 3 competitors based on the market research." expected_output: "A comparison table of competitor strategies." context: [market_research_task]# Continue with additional focused tasks...
analysis_task: description: "Analyze customer feedback to find areas of improvement." expected_output: "A marketing plan for the next quarter."
개선된 버전:
Copy
Ask AI
analysis_task: description: "Analyze customer feedback to identify the top 3 areas for product improvement." expected_output: "A report listing the 3 priority improvement areas with supporting customer quotes and data points."
agent: role: "Business Analyst" goal: "Analyze business data" backstory: "You are good at business analysis."
개선된 버전:
Copy
Ask AI
agent: role: "SaaS Metrics Specialist focusing on growth-stage startups" goal: "Identify actionable insights from business data that can directly impact customer retention and revenue growth" backstory: "With 10+ years analyzing SaaS business models, you've developed a keen eye for the metrics that truly matter for sustainable growth. You've helped numerous companies identify the leverage points that turned around their business trajectory. You believe in connecting data to specific, actionable recommendations rather than general observations."
건설적인 긴장감: 때때로 약간씩 다른 관점을 가진 agent를 만들면 생산적인 대화를 통해 더 나은 결과를 이끌어낼 수 있습니다.
예를 들어, 콘텐츠 제작 crew는 다음과 같이 구성될 수 있습니다:
Copy
Ask AI
# Research Agentrole: "Research Specialist for technical topics"goal: "Gather comprehensive, accurate information from authoritative sources"backstory: "You are a meticulous researcher with a background in library science..."# Writer Agentrole: "Technical Content Writer"goal: "Transform research into engaging, clear content that educates and informs"backstory: "You are an experienced writer who excels at explaining complex concepts..."# Editor Agentrole: "Content Quality Editor"goal: "Ensure content is accurate, well-structured, and polished while maintaining consistency"backstory: "With years of experience in publishing, you have a keen eye for detail..."
role: "Data Analysis Specialist"goal: "Derive meaningful insights from complex datasets through statistical analysis"backstory: "With a background in data science, you excel at working with structured and unstructured data..."tools: [PythonREPLTool, DataVisualizationTool, CSVAnalysisTool]
효과적인 agent를 만드는 것은 예술이자 과학입니다. 여러분의 특정 요구에 맞춘 역할, 목표, 그리고 backstory를 신중하게 정의하고, 잘 설계된 task와 결합함으로써 뛰어난 결과를 만들어내는 전문화된 AI 협업자를 만들 수 있습니다.agent와 task의 설계는 반복적인 과정임을 기억하세요. 이러한 모범 사례로 시작하여 agent가 실제로 동작하는 모습을 관찰하고, 배운 점을 바탕으로 접근 방식을 개선하세요. 그리고 항상 80/20 법칙을 명심하세요. agent로부터 최고의 결과를 얻기 위해서는 명확하고 집중된 task를 만드는 데 대부분의 노력을 집중하는 것이 중요합니다.
축하합니다! 이제 효과적인 agent 설계의 원칙과 실천법을 이해하셨습니다. 이 기술들을 적용하여 강력하고 전문화된 agent들이 복잡한 task를 매끄럽게 협력하여 완수할 수 있도록 만드세요.