agents.memory.search.deep_research.agent¶
Deep Research Agent implementation.
Provides comprehensive research with multiple sources and detailed analysis. Similar to Perplexity’s Deep Research feature that performs dozens of searches and reads hundreds of sources.
Classes¶
Agent for comprehensive research with multiple sources and detailed analysis. |
Functions¶
|
Decompose a complex research query into specific sub-queries. |
|
Evaluate the credibility of a source. |
|
Generate an executive summary from research sections. |
Get the response model for deep research. |
|
Get specific search instructions for deep research. |
|
Get the system prompt for deep research operations. |
|
|
Organize research findings into thematic sections. |
Module Contents¶
- class agents.memory.search.deep_research.agent.DeepResearchAgent(name='deep_research_agent', engine=None, search_tools=None, enable_kg=False, kg_transformer=None, **kwargs)¶
Bases:
haive.agents.memory.search.base.BaseSearchAgent
Agent for comprehensive research with multiple sources and detailed analysis.
Mimics Perplexity’s Deep Research feature by performing multiple searches, analyzing hundreds of sources, and generating comprehensive reports.
Features: - Multi-stage research process - Comprehensive source analysis - Structured report generation - Knowledge graph integration - Fact checking and validation - Evidence synthesis
Research Process: 1. Query decomposition and planning 2. Background research queries 3. Specific deep-dive queries 4. Source evaluation and ranking 5. Content synthesis and analysis 6. Report generation and structuring
Examples
Basic usage:
agent = DeepResearchAgent( name="deep_research", engine=AugLLMConfig(temperature=0.2) ) response = await agent.process_deep_research( "What are the environmental impacts of electric vehicles?", research_depth=4 )
With knowledge graph integration:
agent = DeepResearchAgent( name="deep_research", enable_kg=True, kg_transformer=IterativeGraphTransformer() ) response = await agent.process_deep_research( "Impact of AI on healthcare outcomes", focus_areas=["diagnostic accuracy", "treatment efficiency"] )
Initialize the Deep Research Agent.
- Parameters:
name (str) – Agent identifier
engine (haive.core.engine.aug_llm.AugLLMConfig | None) – LLM configuration (defaults to optimized settings)
search_tools (list[langchain_core.tools.Tool] | None) – Optional search tools
enable_kg (bool) – Enable knowledge graph integration
kg_transformer (Any | None) – Knowledge graph transformer instance (optional)
**kwargs – Additional arguments passed to parent
- decompose_research_query(query, focus_areas=None)¶
Decompose a complex research query into specific sub-queries.
- evaluate_source_credibility(source)¶
Evaluate the credibility of a source.
- async execute_research_query(query, query_type='general')¶
Execute a single research query and track results.
- generate_executive_summary(sections)¶
Generate an executive summary from research sections.
- get_response_model()¶
Get the response model for deep research.
- Return type:
type[haive.agents.memory.search.base.SearchResponse]
- organize_findings_by_theme(findings)¶
Organize research findings into thematic sections.
- async process_deep_research(query, research_depth=3, focus_areas=None, max_sources=50, include_fact_checking=True, save_to_memory=True)¶
Process a deep research query with comprehensive analysis.
- Parameters:
- Returns:
Deep research response
- Return type:
haive.agents.memory.search.deep_research.models.DeepResearchResponse
- async process_search(query, context=None, save_to_memory=True)¶
Process a search query with default deep research settings.
- agents.memory.search.deep_research.agent.decompose_research_query(query, focus_areas=None)¶
Decompose a complex research query into specific sub-queries.
- agents.memory.search.deep_research.agent.evaluate_source_credibility(source)¶
Evaluate the credibility of a source.
- agents.memory.search.deep_research.agent.generate_executive_summary(sections)¶
Generate an executive summary from research sections.
- agents.memory.search.deep_research.agent.get_response_model()¶
Get the response model for deep research.
- Return type:
type[haive.agents.memory.search.base.SearchResponse]
- agents.memory.search.deep_research.agent.get_search_instructions()¶
Get specific search instructions for deep research.
- Return type:
- agents.memory.search.deep_research.agent.get_system_prompt()¶
Get the system prompt for deep research operations.
- Return type: