gpt-researcher README

The project's README from github.com/assafelovic/gpt-researcher. As one markdown file: README.md.

🔎 GPT Researcher

GPT Researcher the first open deep research agent designed for both web and local research on any given task.

The agent produces detailed, factual, and unbiased research reports with citations. GPT Researcher provides a full suite of customization options to create tailor made and domain specific research agents. Inspired by the recent Plan-and-Solve and RAG papers, GPT Researcher addresses misinformation, speed, determinism, and reliability by offering stable performance and increased speed through parallelized agent work.

Our mission is to empower individuals and organizations with accurate, unbiased, and factual information through AI.

Why GPT Researcher?

Demo

Demo video

Install as Claude Skill

Extend Claude's deep research capabilities by installing GPT Researcher as a Claude Skill:

npx skills add assafelovic/gpt-researcher

Once installed, Claude can leverage GPT Researcher's deep research capabilities directly within your conversations.

Architecture

The core idea is to utilize 'planner' and 'execution' agents. The planner generates research questions, while the execution agents gather relevant information. The publisher then aggregates all findings into a comprehensive report.

Steps:

Tutorials

Features

📖 Documentation

See the Documentation for:

⚙️ Getting Started

Installation

  1. Install Python 3.11 or later. Guide.

  2. Clone the project and navigate to the directory:

    git clone https://github.com/assafelovic/gpt-researcher.git
    cd gpt-researcher
    
  3. Set up API keys by exporting them or storing them in a .env file.

    export OPENAI_API_KEY={Your OpenAI API Key here}
    export TAVILY_API_KEY={Your Tavily API Key here}
    

    (Optional) For enhanced tracing and observability, you can also set:

    # export LANGCHAIN_TRACING_V2=true
    # export LANGCHAIN_API_KEY={Your LangChain API Key here}
    

    For custom OpenAI-compatible APIs (e.g., local models, other providers), you can also set:

    export OPENAI_BASE_URL={Your custom API base URL here}
    
  4. Install dependencies and start the server:

    pip install -r requirements.txt
    python -m uvicorn main:app --reload
    

Visit http://localhost:8000 to start.

For other setups (e.g., Poetry or virtual environments), check the Getting Started page.

Run as PIP package

pip install gpt-researcher

Example Usage:

...
from gpt_researcher import GPTResearcher

query = "why is Nvidia stock going up?"
researcher = GPTResearcher(query=query)
# Conduct research on the given query
research_result = await researcher.conduct_research()
# Write the report
report = await researcher.write_report()
...

For more examples and configurations, please refer to the PIP documentation page.

🔧 MCP Client

GPT Researcher supports MCP integration to connect with specialized data sources like GitHub repositories, databases, and custom APIs. This enables research from data sources alongside web search.

export RETRIEVER=tavily,mcp  # Enable hybrid web + MCP research
from gpt_researcher import GPTResearcher
import asyncio
import os

async def mcp_research_example():
    # Enable MCP with web search
    os.environ["RETRIEVER"] = "tavily,mcp"
    
    researcher = GPTResearcher(
        query="What are the top open source web research agents?",
        mcp_configs=[
            {
                "name": "github",
                "command": "npx",
                "args": ["-y", "@modelcontextprotocol/server-github"],
                "env": {"GITHUB_TOKEN": os.getenv("GITHUB_TOKEN")}
            }
        ]
    )
    
    research_result = await researcher.conduct_research()
    report = await researcher.write_report()
    return report

For comprehensive MCP documentation and advanced examples, visit the MCP Integration Guide.

🍌 Inline Image Generation

GPT Researcher can automatically generate and embed AI-created illustrations in your research reports using Google's Gemini models (Nano Banana).

# Enable in your .env file
IMAGE_GENERATION_ENABLED=true
GOOGLE_API_KEY=your_google_api_key
IMAGE_GENERATION_MODEL=models/gemini-2.5-flash-image

When enabled, the system will:

  1. Analyze your research context to identify visualization opportunities
  2. Pre-generate 2-3 relevant images during the research phase
  3. Embed them inline as the report is written

Images are generated with dark-mode styling that matches the GPT Researcher UI, featuring professional infographic aesthetics with teal accents.

Learn more about Image Generation in our documentation.

✨ Deep Research

GPT Researcher now includes Deep Research - an advanced recursive research workflow that explores topics with agentic depth and breadth. This feature employs a tree-like exploration pattern, diving deeper into subtopics while maintaining a comprehensive view of the research subject.

Learn more about Deep Research in our documentation.

Run with Docker

Step 1 - Install Docker

Step 2 - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env'

Step 3 - Within the docker-compose file comment out services that you don't want to run with Docker.

docker-compose up --build

If that doesn't work, try running it without the dash:

docker compose up --build

Step 4 - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes:

Visit localhost:3000 on any browser and enjoy researching!

📄 Research on Local Documents

You can instruct the GPT Researcher to run research tasks based on your local documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents.

Step 1: Add the env variable DOC_PATH pointing to the folder where your documents are located.

export DOC_PATH="./my-docs"

Step 2:

🤖 MCP Server

We've moved our MCP server to a dedicated repository: gptr-mcp.

The GPT Researcher MCP Server enables AI applications like Claude to conduct deep research. While LLM apps can access web search tools with MCP, GPT Researcher MCP delivers deeper, more reliable research results.

Features:

For detailed installation and usage instructions, please visit the official repository.

👪 Multi-Agent Assistant

As AI evolves from prompt engineering and RAG to multi-agent systems, we're excited to introduce multi-agent assistants built with LangGraph and AG2.

By using multi-agent frameworks, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Inspired by the recent STORM paper, this project showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication.

An average run generates a 5-6 page research report in multiple formats such as PDF, Docx and Markdown.

Check it out here or head over to our documentation for LangGraph and AG2 for more information.

🔍 Observability

GPT Researcher supports LangSmith for enhanced tracing and observability, making it easier to debug and optimize complex multi-agent workflows.

To enable tracing:

  1. Set the following environment variables:
    export LANGCHAIN_TRACING_V2=true
    export LANGCHAIN_API_KEY=your_api_key
    export LANGCHAIN_PROJECT="gpt-researcher"
    
  2. Run your research tasks as usual. All LangGraph-based agent interactions will be automatically traced and visualized in your LangSmith dashboard.

Monocle Tracing

GPT Researcher also supports Monocle, an OpenTelemetry-based tracer for agentic applications. It records each run end-to-end: LLM calls, agent steps, and tool invocations, with their inputs, outputs, timings, and token counts.

Monocle is an opt-in extra and is off by default. Install it, then add the following to your .env file:

pip install "gpt-researcher[monocle]"
MONOCLE_TRACING=true
MONOCLE_EXPORTERS=file          # file, console, okahu, s3, blob, gcs (default: file)
OKAHU_API_KEY=okh_xxxxxxxx      # required only for the `okahu` exporter

Each run writes one trace file to .monocle/; open it in the Monocle VS Code extension. Connect to Okahu to analyze traces across runs (via the okahu exporter).

🖥️ Frontend Applications

GPT-Researcher now features an enhanced frontend to improve the user experience and streamline the research process. The frontend offers:

Two deployment options are available:

  1. A lightweight static frontend served by FastAPI
  2. A feature-rich NextJS application for advanced functionality

For detailed setup instructions and more information about the frontend features, please visit our documentation page.

🚀 Contributing

We highly welcome contributions! Please check out contributing if you're interested.

Please check out our roadmap page and reach out to us via our Discord community if you're interested in joining our mission.

✉️ Support / Contact us

🛡 Disclaimer

This project, GPT Researcher, is an experimental application and is provided "as-is" without any warranty, express or implied. We are sharing codes for academic purposes under the Apache 2 license. Nothing herein is academic advice, and NOT a recommendation to use in academic or research papers.

Our view on unbiased research claims:

  1. The main goal of GPT Researcher is to reduce incorrect and biased facts. How? We assume that the more sites we scrape the less chances of incorrect data. By scraping multiple sites per research, and choosing the most frequent information, the chances that they are all wrong is extremely low.
  2. We do not aim to eliminate biases; we aim to reduce it as much as possible. We are here as a community to figure out the most effective human/llm interactions.
  3. In research, people also tend towards biases as most have already opinions on the topics they research about. This tool scrapes many opinions and will evenly explain diverse views that a biased person would never have read.

Star History Chart

⬆️ Back to Top

gpt-researcher (assafelovic/gpt-researcher)

claude-skill
Searching Database…

What is this?An open-source autonomous agent that runs deep research on any task across the web and your local documents, producing detailed, factual research reports with citations.
Is this a Python library, a web app, or something I run myself?All three: a pip package you call in code, a self-hosted web app with either a lightweight FastAPI frontend or a full NextJS UI, and a Docker Compose setup. It also installs as a Claude Skill.
How do I get it running?Install Python 3.11+, clone the repo, put your API keys in a .env file, then install dependencies and start the server — or just launch it with docker-compose and open localhost:3000 in a browser.
Do I need an OpenAI API key, or can I plug in other models?You need Python 3.11 or later and an OpenAI API key by default, but OpenAI-compatible APIs and local models are supported too, set via environment variables.
Anything I should know before relying on its reports?It is explicitly experimental and provided as-is with no warranty. The authors also stress the tool reduces bias rather than eliminating it, so treat its output as a starting point, not a final authority.
Is the license plain Apache 2.0, or is there a catch?Apache 2.0, but with a disclaimer: the code is shared for academic purposes, and the authors say it is not academic advice and not a recommendation to use it in academic or research papers.
Can it research my own documents instead of the web?Yes — set a DOCPATH env variable pointing to a folder with PDF, plain text, CSV, Excel, Markdown, PowerPoint or Word files, then pick 'My Documents' in the UI or pass report_source='local' in code.
What does the Deep Research mode add?An advanced recursive workflow that explores a topic tree-like, diving into subtopics with configurable depth and breadth while running concurrently. A run takes about 5 minutes, costs roughly $0.4 with o3-mini on high reasoning effort, and produces reports exceeding 2,000 words.
How does it avoid one-sided, shallow results?It aggregates over 20 sources per report and trusts the most frequently occurring information, betting that many independent sites are unlikely to all be wrong. The stated goal is reducing bias, not eliminating it.
Can AI assistants like Claude use it directly?Yes — install it as a Claude Skill so Claude can run deep research inside conversations, or connect apps like Claude Desktop to the dedicated MCP server (gptr-mcp) for deeper, more reliable results than plain web search tools.
Size
52.5 MB
Stars
30.1K
Age
3y
Commits · 90 Days