# GPT Researcher — Autonomous Research Report Agent > AI agent that generates detailed research reports from a single query. Searches multiple sources, synthesizes findings, and cites references. ## Install Save as a script file and run: ## Quick Use ```bash pip install gpt-researcher ``` ```python from gpt_researcher import GPTResearcher import asyncio async def research(): researcher = GPTResearcher(query="your research topic here") await researcher.conduct_research() report = await researcher.write_report() print(report) asyncio.run(research()) ``` **Required API keys** (set as environment variables): ```bash export OPENAI_API_KEY=your_key export TAVILY_API_KEY=your_key # for web search ``` --- ## Intro GPT Researcher is an autonomous research agent that generates detailed, citation-backed research reports from a single query. It crawls 20+ web sources in parallel, cross-references information to reduce bias, and produces reports exceeding 2,000 words — complete with source citations. Think of it as a research assistant that does hours of googling and reading in minutes. **Works with**: GitHub Copilot, Gemini CLI, OpenAI Codex, Ollama --- ## Architecture The system uses a **planner + execution** agent pattern: 1. **Task agent** created based on your research query 2. **Planner** generates focused sub-questions for objectivity 3. **Crawler agents** gather information per question (parallelized) 4. **Summarizer** tracks sources and extracts key findings 5. **Publisher** aggregates everything into a structured report ## Key Features - 📝 Detailed research reports from web and local documents - 🖼️ Smart image scraping and AI-generated inline images (via Gemini) - 📜 Reports exceeding 2,000 words with citations - 🌐 Aggregates 20+ sources for balanced conclusions - 🔍 JavaScript-enabled web scraping - 📂 Persistent memory and context throughout research - 📄 Export to PDF, Word, Markdown - 🌳 Deep Research mode with tree-like recursive exploration - 🤖 MCP Client integration for specialized data sources ## Installation Options ### Via pip ```bash pip install gpt-researcher ``` ### From source ```bash git clone https://github.com/assafelovic/gpt-researcher.git cd gpt-researcher pip install -r requirements.txt python -m uvicorn main:app --reload # Visit http://localhost:8000 ``` ### Docker ```bash docker-compose up --build # React app at localhost:3000, API at localhost:8000 ``` ## Usage Examples ### Basic research ```python researcher = GPTResearcher(query="why is Nvidia stock going up?") await researcher.conduct_research() report = await researcher.write_report() ``` ### Research local documents ```bash export DOC_PATH="./my-docs" ``` ```python researcher = GPTResearcher(query="analyze these docs", report_source="local") ``` Supports: PDF, plain text, CSV, Excel, Markdown, PowerPoint, Word. ### MCP integration ```python researcher = GPTResearcher( query="top open source research agents", mcp_configs=[{ "name": "github", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": {"GITHUB_TOKEN": os.getenv("GITHUB_TOKEN")} }] ) ``` ### Deep Research Tree-like recursive exploration with configurable depth/breadth. Takes ~5 minutes, costs ~$0.40 with o3-mini. --- ### FAQ **Q: What is GPT Researcher?** A: AI agent that generates detailed research reports from a single query. Searches multiple sources, synthesizes findings, and cites references. **Q: How do I install GPT Researcher?** A: Check the Quick Use section above for step-by-step installation instructions. Most assets can be set up in under 2 minutes. ## Source & Thanks > Created by [Assaf Elovic](https://github.com/assafelovic). Licensed under Apache 2.0. > [gpt-researcher](https://github.com/assafelovic/gpt-researcher) — ⭐ 26,000+ > Docs: [docs.gptr.dev](https://docs.gptr.dev) Thanks to Assaf Elovic for building an open alternative to deep research tools. Active development with regular updates. --- Source: https://tokrepo.com/en/workflows/23330210-b26a-4d97-ad97-1735c203eaa6 Author: TokRepo Curated