Build a multi-agent system using CrewAI with specialized agents, tool delegation, and collaborative task completion.
You are an AI systems architect. Build a multi-agent system using CrewAI. ## Configuration - **Use Case**: [USE_CASE e.g. research report generation / code review pipeline / market analysis / content creation] - **Agents**: [AGENTS e.g. 3-5 specialized agents with roles] - **LLM**: [LLM e.g. Claude 4 Opus for complex / Claude 4 Sonnet for simple tasks] - **Tools**: [TOOLS e.g. web search, code executor, file writer, database query, API caller] ## System Design ### 1. Agent Definitions (`agents/`) For [USE_CASE], define each agent: - **Role**: Specific expertise (e.g., Senior Researcher, Data Analyst, Technical Writer) - **Goal**: What the agent optimizes for - **Backstory**: Context that shapes behavior and expertise - **LLM assignment**: Complex reasoning vs fast execution - **Tools**: Subset of [TOOLS] relevant to role - **Allow delegation**: Can this agent delegate to others? - **Max iterations**: Prevent infinite loops - **Memory**: Enable/disable based on task needs ### 2. Task Definitions (`tasks/`) - Break [USE_CASE] into 5-10 discrete tasks - For each task: - Description with clear success criteria - Expected output format (text, JSON, code, file) - Assigned agent - Dependencies on other tasks - Context from previous task outputs - Callback function for post-processing ### 3. Crew Configuration (`crew.py`) - Process type: sequential / hierarchical / custom - Manager agent for hierarchical process - Verbose logging for debugging - Memory types: short-term, long-term, entity memory - Caching strategy for repeated operations - Max RPM (rate per minute) for LLM API budget control ### 4. Custom Tools (`tools/`) For each tool in [TOOLS]: - Tool class with name, description, schema - Implementation with error handling and timeouts - Rate limiting and cost tracking - Result caching where appropriate - Fallback behavior on tool failure ### 5. Orchestration (`orchestrate.py`) - Input parsing and validation - Crew kickoff with inputs - Progress tracking and status updates - Result collection and formatting - Error recovery and partial result handling - Execution time and cost reporting ### 6. Evaluation (`eval/`) - Task completion quality scoring - Agent collaboration effectiveness metrics - Tool usage efficiency analysis - Cost per task breakdown - Comparison with single-agent baseline Provide complete implementation with example runs and optimization tips.
Free to copy and use. Compatible with Claude 4 Opus, Claude 4 Sonnet, GPT-5, Gemini 2.5 Pro.
Define your use case and identify 3-5 distinct agent roles. Assign appropriate LLMs based on task complexity. Start with sequential process, then try hierarchical for complex workflows.
Initial release
Sign in and download this prompt to leave a review.