Advanced Multi-Agent Research System - Enhanced implementation of Anthropic's orchestrator-worker pattern with 90.2% performance improvement over single-agent systems
Project description
Advanced Research System (Based on Anthropic's Paper)
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
| Feature | Description |
|---|---|
| Enhanced Orchestrator-Worker Architecture | A LeadResearcherAgent with explicit thinking processes plans and synthesizes, while specialized ResearchSubagent workers execute focused tasks with iterative search capabilities. |
| Advanced Web Search Integration | Utilizes exa_search with quality scoring, source reliability assessment, and multi-loop search strategies for comprehensive research. |
| LLM-as-Judge Evaluation | Sophisticated progress evaluation system that determines research completeness, identifies missing topics, and guides iterative refinement. |
| High-Performance Parallel Execution | Leverages ThreadPoolExecutor to run up to 5 specialized agents concurrently, achieving 90% time reduction for complex queries. |
| Professional Citation System | Enhanced CitationAgent with intelligent source descriptions, quality-based formatting, and academic-style citations. |
| Export Functionality | Built-in report export to Markdown files with customizable paths, automatic timestamping, and comprehensive metadata. |
| Multi-Layer Error Recovery | Advanced error handling with fallback content generation, emergency report creation, and adaptive task refinement. |
| Enhanced State Management | Comprehensive 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
- Strategic Planning: Advanced query analysis with explicit thinking processes and complexity assessment
- Parallel Research: Multiple
ResearchSubagentworkers with 3-loop search strategies execute concurrently - LLM-as-Judge Evaluation: Sophisticated progress assessment identifies gaps and determines iteration needs
- Professional Citation: Enhanced processing with intelligent source descriptions and quality indicators
- 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:
pip3 install -U advanced-research
# OR UV
uv pip install -U advanced-research
Environment Setup
Create a .env file in your project root:
# 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
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!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-research-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-research-feature) - Open a Pull Request
Development Setup with uv
# 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:
@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
- Original Paper - "How we built our multi-agent research system" by Anthropic
- Swarms Framework - The underlying multi-agent AI orchestration framework
- Full Documentation - Comprehensive API reference and advanced usage guide
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Discord: Join our community
Built with Swarms framework for production-grade agentic applications
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file advanced_research-0.1.4.tar.gz.
File metadata
- Download URL: advanced_research-0.1.4.tar.gz
- Upload date:
- Size: 37.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.3 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16de961bbbff3713bdca58429655647a50ab0b7d878bc61d5b9bae3c06a16c26
|
|
| MD5 |
59c1ff08b45825856497110af95fbf42
|
|
| BLAKE2b-256 |
ef5f6a24c978148bb3229421c97ec5188583d03ecab2efa8b64a395a65aef40d
|
File details
Details for the file advanced_research-0.1.4-py3-none-any.whl.
File metadata
- Download URL: advanced_research-0.1.4-py3-none-any.whl
- Upload date:
- Size: 35.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.3 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef92ada26b0e128e33a67275e6da88ed7c61b48afa65cee1c9c8f1bc24004a29
|
|
| MD5 |
8b217aab4ac256982a7b154e6cc3e840
|
|
| BLAKE2b-256 |
cc92ac99dca6d463a53e3ebb4352c1739f1f46c60ef49e4b3d7809c0952bf7bc
|