AdvancedResearch

Agent

AdvancedResearch

Creator:

About this agent

An open-source implementation of Anthropic's multi-agent deep research system as defined in: https://www.anthropic.com/engineering/built-multi-agent-research-system built with the swarms framework

Anthropic Multi-Agent Architecture

Advanced Research System (Based on Anthropic's Paper)

Join our Discord Subscribe on YouTube Connect on LinkedIn Follow on X.com

PyPI version Python 3.10+ License: MIT

An enhanced implementation of the orchestrator-worker pattern from Anthropic's paper, "How we built our multi-agent research system," using the swarms framework. This system achieves 90.2% performance improvement over single-agent systems through advanced parallel execution, LLM-as-judge evaluation, and professional report generation with export capabilities.

✨ Key Features

FeatureDescription
Enhanced Orchestrator-Worker ArchitectureA LeadResearcherAgent with explicit thinking processes plans and synthesizes, while specialized ResearchSubagent workers execute focused tasks with iterative search capabilities.
Advanced Web Search IntegrationUtilizes exa_search with quality scoring, source reliability assessment, and multi-loop search strategies for comprehensive research.
LLM-as-Judge EvaluationSophisticated progress evaluation system that determines research completeness, identifies missing topics, and guides iterative refinement.
High-Performance Parallel ExecutionLeverages ThreadPoolExecutor to run up to 5 specialized agents concurrently, achieving 90% time reduction for complex queries.
Professional Citation SystemEnhanced CitationAgent with intelligent source descriptions, quality-based formatting, and academic-style citations.
Export FunctionalityBuilt-in report export to Markdown files with customizable paths, automatic timestamping, and comprehensive metadata.
Multi-Layer Error RecoveryAdvanced error handling with fallback content generation, emergency report creation, and adaptive task refinement.
Enhanced State ManagementComprehensive orchestration metrics, conversation history tracking, and persistent agent states.

πŸ—οΈ Architecture

The system follows a dynamic, multi-phase workflow with enhanced coordination:

                [User Query + Export Options]
                            β”‚
                            β–Ό
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚    LeadResearcherAgent          β”‚ (Enhanced Orchestrator)
           β”‚  - Query Analysis & Planning    β”‚
           β”‚  - LLM-as-Judge Evaluation      β”‚
           β”‚  - Iterative Strategy Refinementβ”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚ 1. Analyze & Decompose (with thinking process)
                            β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚         Parallel Sub-Tasks              β”‚
       β”‚      (Up to 5 concurrent tasks)         β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚           β”‚           β”‚           β”‚
          β–Ό           β–Ό           β–Ό           β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚SubAgent 1β”‚ β”‚SubAgent 2β”‚ β”‚SubAgent 3β”‚ β”‚SubAgent Nβ”‚ (Specialized Workers)
    β”‚Multi-loopβ”‚ β”‚Multi-loopβ”‚ β”‚Multi-loopβ”‚ β”‚Multi-loopβ”‚
    β”‚ Search   β”‚ β”‚ Search   β”‚ β”‚ Search   β”‚ β”‚ Search   β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚           β”‚           β”‚           β”‚
          β–Ό           β–Ό           β–Ό           β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚     Enhanced Results Aggregation        β”‚
       β”‚  - Quality Assessment & Confidence      β”‚
       β”‚  - Source Deduplication & Scoring       β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚ 2. Synthesis & LLM-as-Judge Evaluation
                            β–Ό
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚    LeadResearcherAgent          β”‚
           β”‚  - Completeness Assessment      β”‚
           β”‚  - Gap Identification           β”‚
           β”‚  - Iterative Refinement         β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚ 3. Generate Final Report
                            β–Ό
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚      Enhanced CitationAgent     β”‚ (Post-Processor)
           β”‚  - Smart Source Descriptions    β”‚
           β”‚  - Professional Citations       β”‚
           β”‚  - Quality Assurance            β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚ 4. Export & Delivery
                            β–Ό
              [Final Cited Report + Optional Export]

πŸ”„ Enhanced Workflow Process

  1. Strategic Planning: Advanced query analysis with explicit thinking processes and complexity assessment
  2. Parallel Research: Multiple ResearchSubagent workers with 3-loop search strategies execute concurrently
  3. LLM-as-Judge Evaluation: Sophisticated progress assessment identifies gaps and determines iteration needs
  4. Professional Citation: Enhanced processing with intelligent source descriptions and quality indicators
  5. Export & Delivery: Optional file export with customizable paths and comprehensive metadata

πŸ“¦ Installation

Prerequisites

  • Python 3.10 or higher
  • API keys for Claude (Anthropic) and Exa search

Install with uv (Recommended)

uv provides the fastest and most reliable package management experience:

BASH
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install the package
uv add advancedresearch

# Or create a new project with advancedresearch
uv init my-research-project
cd my-research-project
uv add advancedresearch

Alternative Installation Methods

BASH
# Using pip
pip install advancedresearch

# Using poetry
poetry add advancedresearch

Development Installation

For development or to access the latest features:

BASH
# Clone the repository
git clone https://github.com/The-Swarm-Corporation/AdvancedResearch.git
cd AdvancedResearch

# Install with uv (recommended)
uv sync

# Or with poetry
poetry install

# Or with pip
pip install -e .

Why uv?

We recommend uv for the best experience with AdvancedResearch:

  • ⚑ 10-100x faster than pip for dependency resolution and installation
  • πŸ”’ Reliable: Deterministic builds with automatic virtual environment management
  • 🎯 Simple: Single tool for project management, dependency resolution, and Python version management
  • πŸ”„ Compatible: Drop-in replacement for pip with better performance

Environment Setup

Create a .env file in your project root:

BASH
# Claude API Key (Primary LLM)
ANTHROPIC_API_KEY="your_anthropic_api_key_here"

# Exa Search API Key
EXA_API_KEY="your_exa_api_key_here"

# Optional: OpenAI API Key (alternative LLM)
OPENAI_API_KEY="your_openai_api_key_here"

πŸš€ Quick Start

Complete uv Workflow

Get started with AdvancedResearch using uv for the optimal experience:

BASH
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create a new project
uv init my-research-project
cd my-research-project

# Add advancedresearch
uv add advancedresearch

# Create your research script
cat > research.py << 'EOF'
from advancedresearch import AdvancedResearch

# Initialize the system
research_system = AdvancedResearch()

# Run research
results = research_system.research(
    "What are the latest developments in quantum computing?",
    export=True,
    export_path="quantum_computing_report.md"
)

print(f"Research completed! Report: {results['research_metadata']['exported_to']}")
EOF

# Run your research
uv run research.py

Example

PYTHON
from advanced_research import AdvancedResearch

# Initialize the system
research_system = AdvancedResearch(max_iterations=1)

# Run research
results = research_system.research(
    "What are the latest developments in quantum computing?",
    export=True,
    export_path="quantum_computing_report.md",
)

print(results)

🀝 Contributing

This implementation is part of the open-source swarms ecosystem. We welcome contributions!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-research-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-research-feature)
  5. Open a Pull Request

Development Setup with uv

BASH
# Clone and setup development environment
git clone https://github.com/The-Swarm-Corporation/AdvancedResearch.git
cd AdvancedResearch

# Install development dependencies with uv (recommended)
uv sync --dev

# Run tests
uv run pytest

# Run linting
uv run ruff check .
uv run black --check .

# Run type checking
uv run mypy advanced_research/

# Format code
uv run black .
uv run ruff check --fix .

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ“š Citation

If you use this work in your research, please cite both the original paper and this implementation:

BIBTEX
@misc{anthropic2024researchsystem,
    title={How we built our multi-agent research system},
    author={Anthropic},
    year={2024},
    month={June},
    url={https://www.anthropic.com/engineering/built-multi-agent-research-system}
}

@software{advancedresearch2024,
    title={AdvancedResearch: Enhanced Multi-Agent Research System},
    author={The Swarm Corporation},
    year={2024},
    url={https://github.com/The-Swarm-Corporation/AdvancedResearch},
    note={Implementation based on Anthropic's multi-agent research system paper}
}

@software{swarms_framework,
    title={Swarms: An Open-Source Multi-Agent Framework},
    author={Kye Gomez},
    year={2023},
    url={https://github.com/kyegomez/swarms}
}

πŸ”— Related Work

πŸ“ž Support

<p align="center"> <strong>Built with <a href="https://github.com/kyegomez/swarms">Swarms</a> framework for production-grade agentic applications </strong> </p>

Source: https://github.com/The-Swarm-Corporation/AdvancedResearch

Requirements

PackageInstallation
requestspip3 install requests

Agent Code

The main implementation code for this agent

Comments & Discussion

Tags

agents
ai
anthropic
claude
claude-sonnet
langchain
llms
multi-agent
swarms-agents
graphworkflow
graphworlflow
swarmsai

Share

Rating

Related Links
Tokenization

This item is not available for tokenization.

Items You'd Like

Check out similar agents that match your interests