Skip to main content
This example demonstrates how to build a complete research assistant application that can browse the web, analyze information, and generate comprehensive reports.

What You’ll Learn

  • Building multi-agent research workflows
  • Integrating web browsing capabilities
  • Information synthesis and reporting
  • Managing complex agent interactions

Prerequisites

1

Install AutoGen with all extensions

2

Install Playwright MCP Server

3

Set your OpenAI API key

Architecture

The research assistant uses multiple specialized agents:
  • Planner: Breaks down research questions into subtasks
  • Researcher: Gathers information from the web
  • Analyzer: Analyzes and validates information
  • Writer: Synthesizes findings into a report

Code Example

Run the Example

Expected Output

Advanced Features

Save Research to File

Multi-Topic Research

Integration with GraphRAG

For document-based research, integrate with GraphRAG:
See the GraphRAG integration guide for setup details.

Key Concepts

Multi-Agent Workflow

Specialized agents collaborate on complex research tasks.

Web Browsing

MCP servers provide real-time web access for current information.

Information Synthesis

Multiple perspectives combined into comprehensive reports.

Source Citation

Track and cite sources for credibility and verification.

Best Practices

  1. Clear Instructions: Give each agent specific role and responsibilities
  2. Source Verification: Require multiple sources for important claims
  3. Error Handling: Handle web browsing failures gracefully
  4. Rate Limiting: Respect website rate limits and robots.txt
  5. Caching: Cache results to avoid redundant web requests
  6. Structured Output: Use consistent report formats

Production Considerations

Add Logging

Add Error Recovery

Add Progress Tracking

Troubleshooting

Slow Performance

  • Enable parallel research for independent subtopics
  • Cache frequently accessed information
  • Use faster models for planning/analysis phases

Inaccurate Information

  • Require multiple source verification
  • Add fact-checking agent
  • Prefer authoritative domains

Too Many Web Requests

  • Add request caching
  • Batch similar queries
  • Implement rate limiting

Next Steps

Customer Support

Build a customer support bot

Data Analysis

Create automated data analysis workflows