Deep Research Swarm¶
Overview
The Deep Research Swarm is a powerful, production-grade research system that conducts comprehensive analysis across multiple domains using parallel processing and advanced AI agents.
Key Features:
-
Parallel search processing
-
Multi-agent research coordination
-
Advanced information synthesis
-
Automated query generation
-
Concurrent task execution
Getting Started¶
Configuration¶
Constructor Arguments
Parameter | Type | Default | Description |
---|---|---|---|
name |
str | "DeepResearchSwarm" | Name identifier for the swarm |
description |
str | "A swarm that conducts..." | Description of the swarm's purpose |
research_agent |
Agent | research_agent | Custom research agent instance |
max_loops |
int | 1 | Maximum number of research iterations |
nice_print |
bool | True | Enable formatted console output |
output_type |
str | "json" | Output format ("json" or "string") |
max_workers |
int | CPU_COUNT * 2 | Maximum concurrent threads |
token_count |
bool | False | Enable token counting |
research_model_name |
str | "gpt-4o-mini" | Model to use for research |
Core Methods¶
Run¶
Batched Run¶
Parallel Task Execution
Step¶
Single Step Execution
Domain-Specific Examples¶
Advanced Features¶
Custom Research Agent
Parallel Processing Control
Best Practices¶
Recommended Practices
- Query Formulation: Be specific and clear in your research queries
- Resource Management: Adjust
max_workers
based on your system's capabilities - Output Handling: Use appropriate
output_type
for your use case - Error Handling: Implement try-catch blocks around swarm operations
- Model Selection: Choose appropriate models based on research complexity
Limitations¶
Known Limitations
-
Requires valid API keys for external services
-
Performance depends on system resources
-
Rate limits may apply to external API calls
-
Token limits apply to model responses