Tryb
Agents
APIPlayground
  1. Home
  2. Blog
  3. Tutorials
  4. CrewAI Web Research: Multi-Agent Tutorial
Tutorials
Nov 12, 202410 min read

CrewAI Web Research: Multi-Agent Tutorial

Create a team of AI agents that research and write content collaboratively using CrewAI and Tryb.

Alex Rivera

Alex Rivera

ML Engineer

CrewAI Web Research: Multi-Agent Tutorial

CrewAI lets you orchestrate multiple AI agents working together. This tutorial shows you how to build a research crew with web access.

The Research Crew

  • Researcher Agent: Searches and reads web sources
  • Analyst Agent: Synthesizes and extracts insights
  • Writer Agent: Produces final report

Setup

pip install crewai crewai-tools

Create Tryb Tools

from crewai_tools import BaseTool
import requests

class TrybSearchTool(BaseTool):
    name: str = "Web Search"
    description: str = "Search the web for information"
    
    def _run(self, query: str) -> str:
        response = requests.post(
            "https://api.tryb.dev/v1/search",
            headers={"Authorization": f"Bearer {os.getenv('TRYB_API_KEY')}"},
            json={"query": query, "num_results": 5}
        )
        return str(response.json()["results"])

class TrybReadTool(BaseTool):
    name: str = "Read Webpage"
    description: str = "Read content from a URL"
    
    def _run(self, url: str) -> str:
        response = requests.post(
            "https://api.tryb.dev/v1/read",
            headers={"Authorization": f"Bearer {os.getenv('TRYB_API_KEY')}"},
            json={"url": url}
        )
        return response.json()["data"]["markdown"]

Define Agents

from crewai import Agent, Task, Crew

researcher = Agent(
    role="Research Specialist",
    goal="Find comprehensive information on the given topic",
    backstory="Expert at finding and extracting valuable information from the web",
    tools=[TrybSearchTool(), TrybReadTool()],
    verbose=True
)

analyst = Agent(
    role="Data Analyst",
    goal="Analyze research findings and extract key insights",
    backstory="Skilled at identifying patterns and synthesizing information"
)

writer = Agent(
    role="Content Writer",
    goal="Create clear, engaging content from research",
    backstory="Expert at transforming complex information into readable content"
)

Define Tasks

research_task = Task(
    description="Research {topic} using web search and page reading",
    expected_output="Comprehensive research notes with sources",
    agent=researcher
)

analysis_task = Task(
    description="Analyze research and extract 5 key insights",
    expected_output="Bullet-point list of insights with evidence",
    agent=analyst
)

writing_task = Task(
    description="Write a 500-word article based on the analysis",
    expected_output="Polished article ready for publication",
    agent=writer
)

Run the Crew

crew = Crew(
    agents=[researcher, analyst, writer],
    tasks=[research_task, analysis_task, writing_task],
    verbose=True
)

result = crew.kickoff(inputs={"topic": "Latest AI chip developments"})

Related Tutorials

  • LangChain Web Research Agent
  • Building Web-Aware AI Agents
CrewAIMulti-AgentTutorialPython
Alex Rivera

Alex Rivera

ML Engineer at Tryb

Alex builds multi-agent AI systems.

Related Articles

LangChain Web Research Agent: Complete Tutorial
Tutorials

LangChain Web Research Agent: Complete Tutorial

11 min read

Building Web-Aware AI Agents: A Complete Guide
Tutorials

Building Web-Aware AI Agents: A Complete Guide

10 min read

AutoGPT Web Browsing: Setup Guide 2024
Tutorials

AutoGPT Web Browsing: Setup Guide 2024

7 min read

Ready to Give Your AI Eyes?

Start scraping any website in seconds. Get 100 free credits when you sign up.

Tryb

The Universal Reader for AI Agents.

Product

  • Agents
  • Industry
  • API Reference
  • Dashboard

Company

  • About
  • Blog
  • Careers
  • Contact
  • Private Sector

Legal

  • Privacy
  • Terms
  • Security

© 2025 Tryb. All rights reserved.

TwitterGitHubDiscord