graph LR
Research_Orchestrator["Research Orchestrator"]
Data_Acquisition_Processing["Data Acquisition & Processing"]
LLM_AI_Core["LLM & AI Core"]
Context_Memory_Management["Context & Memory Management"]
Report_Generation_Output["Report Generation & Output"]
API_Communication_Layer["API & Communication Layer"]
Multi_Agent_Orchestration["Multi-Agent Orchestration"]
Research_Orchestrator -- "Delegates tasks to" --> Data_Acquisition_Processing
Research_Orchestrator -- "Delegates tasks to" --> Context_Memory_Management
Research_Orchestrator -- "Utilizes" --> LLM_AI_Core
Research_Orchestrator -- "Delegates final output generation to" --> Report_Generation_Output
Data_Acquisition_Processing -- "Provides raw data to" --> Context_Memory_Management
Data_Acquisition_Processing -- "Utilizes" --> LLM_AI_Core
LLM_AI_Core -- "Supports" --> Research_Orchestrator
LLM_AI_Core -- "Supports" --> Data_Acquisition_Processing
LLM_AI_Core -- "Supports" --> Context_Memory_Management
LLM_AI_Core -- "Supports" --> Report_Generation_Output
Context_Memory_Management -- "Receives processed data from" --> Data_Acquisition_Processing
Context_Memory_Management -- "Provides contextual information to" --> Research_Orchestrator
Context_Memory_Management -- "Provides contextual information to" --> Report_Generation_Output
Report_Generation_Output -- "Receives context from" --> Context_Memory_Management
Report_Generation_Output -- "Utilizes" --> LLM_AI_Core
Report_Generation_Output -- "Sends generated reports to" --> API_Communication_Layer
API_Communication_Layer -- "Sends research requests to" --> Research_Orchestrator
API_Communication_Layer -- "Receives final reports from" --> Report_Generation_Output
Multi_Agent_Orchestration -- "Delegates complex research tasks to" --> Research_Orchestrator
click Research_Orchestrator href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//gpt-researcher/Research_Orchestrator.md" "Details"
click Data_Acquisition_Processing href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//gpt-researcher/Data_Acquisition_Processing.md" "Details"
click LLM_AI_Core href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//gpt-researcher/LLM_AI_Core.md" "Details"
click Context_Memory_Management href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//gpt-researcher/Context_Memory_Management.md" "Details"
click Report_Generation_Output href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//gpt-researcher/Report_Generation_Output.md" "Details"
click API_Communication_Layer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//gpt-researcher/API_Communication_Layer.md" "Details"
click Multi_Agent_Orchestration href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main//gpt-researcher/Multi_Agent_Orchestration.md" "Details"
The gpt-researcher project is designed around a modular architecture, enabling flexible and extensible research capabilities. The analysis of its Control Flow Graph (CFG) and source code reveals a clear separation of concerns, with distinct components handling orchestration, data acquisition, LLM interactions, context management, report generation, and communication.
This is the central intelligence and control unit of the gpt-researcher system. It orchestrates the entire research process, from defining the research task to delegating sub-tasks to specialized components. It manages the overall workflow, ensuring that information is gathered, processed, and synthesized effectively to achieve the research objective. It also implicitly leverages the system's configuration.
Related Classes/Methods:
This component is responsible for gathering raw information from various external and internal sources. It encompasses web scraping, document loading, and advanced retrieval mechanisms. It processes the retrieved data, making it available for contextualization and further analysis by other components.
Related Classes/Methods:
gpt_researcher.skills.researcher.ResearchConductor(12:964)gpt_researcher.scraper.scraper.Scraper(23:193)gpt_researcher.document.document.DocumentLoader(15:91)gpt_researcher.retrievers.mcp.retriever.MCPRetriever(0:0)
This fundamental component provides a standardized and abstracted interface for interacting with various Large Language Models (LLMs). It handles chat completions, text generation, and supports intelligent decision-making across all stages of the research process. It also manages conversational memory for ongoing interactions.
Related Classes/Methods:
gpt_researcher.utils.llm.create_chat_completion(22:94)gpt_researcher.llm_provider.generic.base.GenericLLMProvider(84:277)backend.chat.chat.ChatAgentWithMemory(14:105)
This component is crucial for maintaining the coherence and relevance of the research. It manages the storage, retrieval, and organization of research context and memory. By leveraging vector databases, it efficiently stores embeddings of gathered information, allowing for quick and accurate retrieval of relevant content as the research progresses.
Related Classes/Methods:
gpt_researcher.vector_store.vector_store.VectorStoreWrapper(0:0)gpt_researcher.skills.context_manager.ContextManager(7:86)
This component is responsible for synthesizing the gathered information and context into a structured and coherent research report. It supports the generation of various report types (basic, detailed, deep research) and handles the conversion of the final report into different file formats for user consumption.
Related Classes/Methods:
gpt_researcher.report_generator.report_generator.ReportGenerator(0:0)backend.report_type.basic_report.basic_report.BasicReport(6:58)backend.report_type.detailed_report.detailed_report.DetailedReport(7:158)backend.report_type.deep_research.example.DeepResearch(26:324)backend.server.server_utils.generate_report_files(196:200)
This component serves as the primary interface for real-time communication between the frontend user interface and the backend research system. It receives research requests from clients, orchestrates the initiation of research tasks via the Research Orchestrator, and streams progress updates and final results back to the client.
Related Classes/Methods:
backend.server.server.websocket_endpoint(199:204)backend.server.websocket_manager.run_agent(100:171)
This specialized framework provides a higher-level orchestration for complex research workflows that necessitate coordination among multiple AI agents. It acts as a meta-orchestrator, delegating specific, often intricate, research tasks to instances of the core Research Orchestrator, enabling more sophisticated and collaborative research endeavors.
Related Classes/Methods: