DecipherIt employs a sophisticated multi-crew architecture powered by CrewAI, where specialized AI agents work together to accomplish complex research tasks.
Each crew is designed for a specific research workflow, with agents collaborating to produce high-quality outputs.
Agents are configured with specific roles, goals, and backstories to optimize their performance:
backend/config/topic_research/agents.py
AGENT_CONFIGS = { "web_scraping_planner": { "role": "{topic} Web Scraping Strategy Expert", "goal": "Design an optimal web scraping plan with targeted search queries to comprehensively gather all relevant information about {topic}", "backstory": """You are a distinguished web scraping strategist with extensive experience in planning large-scale web data collection projects. Your expertise lies in breaking down complex topics into precise, targeted search queries that ensure comprehensive coverage.""" }, "web_scraping_link_collector": { "role": "{topic} Link Discovery Specialist", "goal": "Discover and curate the most comprehensive and relevant collection of web sources about {topic}", "backstory": """You are an elite web research specialist with unparalleled expertise in discovering high-quality information sources. Your background includes years of experience in advanced search techniques and source evaluation.""" }, "web_scraper": { "role": "{topic} Expert Web Scraping Engineer", "goal": "Navigate through complex websites, extract targeted information about {topic}, and compile comprehensive datasets", "backstory": """You are an elite web scraping engineer with unparalleled expertise in automated data extraction and web navigation.""" }, "researcher": { "role": "{topic} Senior Research Analyst & Knowledge Synthesizer", "goal": "Conduct exhaustive analysis of multi-source data about {topic}, uncovering hidden patterns and producing comprehensive research insights", "backstory": """You are an elite research analyst with decades of experience in knowledge synthesis and pattern recognition across complex datasets.""" }, "content_writer": { "role": "{topic} Senior Content Strategist & Research Synthesizer", "goal": "Transform extensive research findings about {topic} into meticulously structured, deeply informative content", "backstory": """You are an elite content strategist with extensive experience in research synthesis and long-form content creation.""" }}
TASK_CONFIGS = { "planner": { "description": """Generate 3 unique search queries for the topic \"{topic}\". Your task: 1. Create 3 different search queries to research this topic 2. Keep the queries simple and clear 3. Format output as a JSON object Output format required: { "search_queries": [ "query1", "query2", "query3" ] }""", "expected_output": "A JSON object containing 3 unique search queries" }, "link_collector": { "description": """Using the search query provided, collect relevant links using the search_engine tool. Follow these steps: 1. Use the search_engine tool with engine: \"google\" and the provided query 2. Select 10 of the most relevant and authoritative links 3. Format as JSON: {\"links\": [{\"url\": ..., \"title\": ...}]}""", "expected_output": "A JSON object with array of relevant, high-quality links" }}
The mindmap agent creates hierarchical visualizations:
backend/agents/mindmap_agent.py
def get_mindmap_crew(): content_analyzer = Agent( role="Research Content Analyst", goal="Analyze research content to identify main themes and hierarchical relationships up to 5 levels deep", backstory="""You are an expert content analyst who excels at breaking down complex research into logical hierarchical structures.""", llm=llm, verbose=True ) mindmap_creator = Agent( role="Mindmap Specialist", goal="Create the final mindmap structure as a nested dictionary", backstory="""You are a mindmap specialist who transforms analyzed content into well-organized nested dictionary formats.""", llm=llm, verbose=True ) analyze_content_task = Task( description="""Analyze research content and identify hierarchical themes: - Level 1: ONE main central topic - Level 2: Primary categories (3-6 major categories) - Level 3: Secondary subtopics (2-5 per category) - Level 4: Detailed aspects (if content warrants it) - Level 5: Specific details (only if highly detailed) Research Content:
""",expected_output="A hierarchical breakdown with appropriate depth (2-5 levels)",agent=content_analyzer)create_mindmap_task = Task(description="""Create mindmap structure with hierarchical nodes.Structure must have:- Root node: id="root", text, display={"block": true}, nodes array- Child nodes: unique id, text, nodes array- Empty nodes arrays [] for leaf nodes""",expected_output="A hierarchical node structure representing the mindmap",output_pydantic=SimpleMindmapStructure,agent=mindmap_creator,context=[analyze_content_task])return Crew(agents=[content_analyzer, mindmap_creator],tasks=[analyze_content_task, create_mindmap_task],process=Process.sequential,verbose=True,)