repowiseassafelovic/gpt-researcher

Architecture of assafelovic/gpt-researcher

assafelovic/gpt-researcher is 614 source files holding 1,606 symbols across 10 modules, written mainly in Python, TypeScript, JavaScript. The largest module is gpt_researcher, with 125 files, and 23 files are entry points into the dependency graph.

How gpt-researcher fits together

Research requests enter through the server in backend/server/app.py, which hosts the entry points for serving reports. backend/report_type/deep_research/main.py is the entry point for the deep research workflow, which explores a topic as a tree of subtopics with configurable depth and breadth. The gpt_researcher directory is the core engine and wires agents, prompts, configuration, scraping, retrieval and utility services into one research runtime. deep_agents/main.py starts the Deep Agents Runner, which handles corpus building, agent behavior and benchmark execution. The frontend/nextjs directory holds the Next.js client integration points, configuration and helpers for the user interface. The aggregated findings are written into a report that can be exported to PDF, Word and other formats.

Largest modules

  • gpt_researcher: 125 files and 11,638 lines of code
  • docs: 93 files and 9,594 lines of code
  • frontend: 92 files and 11,516 lines of code
  • tests: 73 files and 3,594 lines of code
  • deep_agents: 62 files and 10,810 lines of code
  • .triage: 40 files and 7,210 lines of code
  • multi_agents: 37 files and 1,644 lines of code
  • backend: 27 files and 1,960 lines of code

Languages

By file count: Python 274 files, TypeScript 72 files, JavaScript 21 files, Terraform 12 files, Dockerfile 4 files.

Documentation

Repowise documents gpt-researcher in 404 pages generated from the source, 33 of them written explanations of the repository and its modules. Module guides include:

  • multi_agents/agents/utils: Agent Utilities and Views
  • backend: Backend Overview
  • frontend/nextjs/hooks: Client Hooks and Analytics

More on gpt-researcher: summary and FAQ, codebase overview, code health.

Related guide: Best dependency graph tools for monorepos