Skip to main content
A specialized research crew built with CrewAI that leverages multiple agents to discover and analyze groundbreaking technologies. Demonstrates CrewAI’s multi-agent orchestration with sequential task processing.

Features

  • Multi-agent system architecture
  • Specialized researcher agents
  • Sequential task processing
  • Structured output generation
  • Powered by Meta-Llama-3.1-70B-Instruct

Prerequisites

Installation

1

Clone the repository

git clone https://github.com/Arindam200/awesome-ai-apps.git
cd starter_ai_agents/crewai_starter
2

Install dependencies

pip install -r requirements.txt
3

Configure environment

Create a .env file and add your Nebius API key:
NEBIUS_API_KEY=your_api_key_here

Implementation

Agent Configuration

Create a specialized researcher agent:
main.py
from crewai import Agent, Task, LLM, Crew, Process
import os
from dotenv import load_dotenv

load_dotenv()

# Create a researcher agent
researcher = Agent(
    role='Senior Researcher',
    goal='Discover groundbreaking technologies',
    verbose=True,
    llm=LLM(
        model="nebius/Qwen/Qwen3-235B-A22B",
        api_key=os.getenv("NEBIUS_API_KEY")
    ),
    backstory='A curious mind fascinated by cutting-edge innovation and the potential to change the world, you know everything about tech.'
)

Task Definition

Define research tasks with clear expectations:
main.py
# Task for the researcher
research_task = Task(
    description='Identify the next big trend in AI',
    expected_output='5 paragraphs on the next big AI trend',
    agent=researcher  # Assigning the task to the researcher
)

Crew Setup

Assemble the crew with sequential processing:
main.py
# Instantiate your crew
tech_crew = Crew(
    agents=[researcher],
    tasks=[research_task],
    process=Process.sequential  # Tasks will be executed one after the other
)

# Begin the task execution
tech_crew.kickoff()

Usage

Run the research crew:
python main.py
The crew will execute the research task and provide detailed insights about emerging AI trends.

Example Research Topics

  • “Identify the next big trend in AI”
  • “Analyze emerging technologies in quantum computing”
  • “Research breakthroughs in sustainable tech”
  • “Investigate future of human-AI collaboration”
  • “Explore cutting-edge developments in robotics”

Technical Details

CrewAI Architecture

Agents

Specialized roles with defined goals and backstories

Tasks

Clear descriptions and expected outputs

Crew

Orchestrates agents and task execution

Process

Sequential or hierarchical execution

Agent Components

Agent(
    role='Senior Researcher',           # Agent's role
    goal='Discover groundbreaking technologies',  # Primary objective
    verbose=True,                       # Enable logging
    llm=LLM(...),                      # Language model
    backstory='...'                     # Context and personality
)

Task Components

Task(
    description='Identify the next big trend in AI',  # What to do
    expected_output='5 paragraphs...',               # Output format
    agent=researcher                                  # Who does it
)

Multi-Agent Patterns

Sequential Processing

Tasks execute one after another:
crew = Crew(
    agents=[researcher, analyst, writer],
    tasks=[research_task, analysis_task, writing_task],
    process=Process.sequential
)

Hierarchical Processing

Manager agent coordinates worker agents:
crew = Crew(
    agents=[manager, researcher, analyst],
    tasks=[task1, task2],
    process=Process.hierarchical,
    manager_llm=LLM(...)
)

Extending the Crew

Add More Agents

analyst = Agent(
    role='Data Analyst',
    goal='Analyze research findings and extract insights',
    verbose=True,
    llm=LLM(
        model="nebius/Qwen/Qwen3-235B-A22B",
        api_key=os.getenv("NEBIUS_API_KEY")
    ),
    backstory='Expert in data analysis with a keen eye for patterns and trends.'
)

writer = Agent(
    role='Technical Writer',
    goal='Create compelling reports from research data',
    verbose=True,
    llm=LLM(
        model="nebius/Qwen/Qwen3-235B-A22B",
        api_key=os.getenv("NEBIUS_API_KEY")
    ),
    backstory='Skilled writer who transforms complex technical information into clear, engaging content.'
)

Create Complex Workflows

research_task = Task(
    description='Research emerging AI trends',
    expected_output='Detailed research report',
    agent=researcher
)

analysis_task = Task(
    description='Analyze the research findings',
    expected_output='Data-driven insights',
    agent=analyst,
    context=[research_task]  # Depends on research_task
)

writing_task = Task(
    description='Write a comprehensive article',
    expected_output='Published article',
    agent=writer,
    context=[research_task, analysis_task]
)

crew = Crew(
    agents=[researcher, analyst, writer],
    tasks=[research_task, analysis_task, writing_task],
    process=Process.sequential
)

Add Custom Tools

from crewai_tools import tool

@tool("Search Tool")
def search_tool(query: str) -> str:
    """Search for information on the web"""
    # Implementation
    return results

researcher = Agent(
    role='Senior Researcher',
    goal='Discover groundbreaking technologies',
    tools=[search_tool],
    llm=LLM(...),
    backstory='...'
)

Best Practices

  • Give agents clear, specific roles
  • Define measurable goals
  • Write detailed backstories for context
  • Use verbose mode during development
  • Write clear task descriptions
  • Specify expected output format
  • Set realistic expectations
  • Use task context for dependencies
  • Choose appropriate process type
  • Consider task dependencies
  • Balance agent specialization
  • Test with different LLM settings

Workflow Visualization

Next Steps

Advanced Multi-Agent

Build complex multi-agent systems

RAG with CrewAI

Add knowledge base to your crew

Build docs developers (and LLMs) love