How pushkrjain/deep_research_agent works
Project type and purpose
• This is a Python-based, AI-powered research tool (a CLI “full-stack” application without a browser GUI) that orchestrates multiple agent components to:
• Crawl and collect web data (Research Agent)
• Generate structured reports in Markdown (Draft Agent)
• Produce reliability charts (Visualization Agent)
• Export the final report to Word with embedded visuals (Export Agent)
File structure
• Top level:
• app.py → entry point / orchestrator
• requirements.txt → lists dependencies (LangChain, LangGraph, Matplotlib, Seaborn, python‐docx, etc.)
• research/ → package containing the four agent modules
• research/:
• research_agent.py → web‐crawling + data structuring
• draft_agent.py → prompt engineering + report generation
• export.py → document export to .docx, writes to disk
• Configuration files: .gitignore, LICENSE
• Output directories/logs implied (research_outputs/, research.log)
Key insights from README
• Multi-agent architecture built on LangChain and LangGraph
• External dependencies:
• Tavily API (web search)
• Google Gemini API (NLP)
• CLI interface: user enters query, app.py invokes the pipeline
• Outputs saved with timestamps in research_outputs/
1. User CLI (app.py)
2. Agent Orchestrator (part of app.py)
3. Research Agent
4. Draft Agent
5. Visualization Agent
6. Export Agent
7. External Services:
– Tavily API
– Google Gemini API
8. Local Storage:
– research_outputs/ (reports, images)
– research.log
• User → CLI/App.py: “Enter research query”
• App.py → Research Agent: passes query
• Research Agent → Tavily API: fetch raw data
• Tavily API → Research Agent: structured data
• App.py → Visualization Agent: passes structured data
• Visualization Agent → Matplotlib/Seaborn → generates chart → local storage
• App.py → Draft Agent: passes structured data + optional chart metadata
• Draft Agent → Google Gemini API: prompt for report → returns Markdown
• App.py → Export Agent: passes Markdown + chart file paths
• Export Agent → python-docx → writes .docx to research_outputs/
• All modules → research.log: log entries/errors
c. Architectural patterns / design principles:
• Separation of Concerns: each agent has a single responsibility
• Pipeline Orchestration: app.py sequences the four agents
• External API Abstraction via LangChain/LangGraph wrappers
• Modular & Extensible: new agents can be added under research/
d. Key technologies / libraries:
• Language orchestration: LangChain, LangGraph
• HTTP clients / API wrappers: Tavily client, Google Gemini SDK
• Visualization: Matplotlib, Seaborn
• Document export: python-docx (or similar)
• Logging: Python’s logging module (research.log)