A sophisticated research agent system built with LangGraph and NVIDIA AI, designed to automate complex research tasks through intelligent multi-agent collaboration.
Deep Research Agent is an advanced AI-powered research system that leverages LangGraph to orchestrate multiple specialized agents for conducting comprehensive research. The system can handle complex research queries, perform web searches, analyze information, and generate detailed reports with proper citations.
- Multi-Agent Architecture: Uses specialized agents for different research tasks (clarification, research, summarization)
- Intelligent Task Delegation: Automatically breaks down complex research questions into sub-tasks
- Web Research Integration: Integrates with Tavily API for real-time web searches
- Structured Output: Generates well-formatted research reports with proper citations
- Interactive UI: Built-in Streamlit interface for easy interaction
- Configurable Models: Supports various NVIDIA AI models through configurable settings
- Conversation Management: Maintains research threads and conversation history
- Real-time Logging: Comprehensive debugging and monitoring capabilities
- LangGraph: Stateful multi-agent orchestration
- LangChain: LLM integration and prompting
- NVIDIA AI: Large language models (Llama 3.1 70B/8B Instruct)
- Tavily API: Web search and information retrieval
- Streamlit: Interactive web interface
- Pydantic: Data validation and configuration management
- AsyncIO: Asynchronous processing for efficiency
- Python 3.9+
- NVIDIA API Key
- Tavily API Key
- Clone the repository:
git clone https://github.com/yourusername/deep-research-agent.git
cd deep-research-agent- Install dependencies:
pip install -r requirements.txt
# Or if using uv:
uv pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Then edit .env with your API keysCreate a .env file in the project root with the following variables:
NVIDIA_API_KEY=your_nvidia_api_key_here
TAVILY_API_KEY=your_tavily_api_key_herestreamlit run ui.pyThen navigate to http://localhost:8501 in your browser to interact with the research agent.
python graph.pyThis will run test scenarios to demonstrate the research agent's capabilities.
The system consists of several key components:
- ClarifyAgent: Determines if user queries need clarification
- WriteResearchBrief: Converts user queries into structured research briefs
- Supervisor: Orchestrates research tasks and manages workflow
- ConductResearchNode: Executes research tasks in parallel
- ToolExecutorNode: Manages web searches and other tools
- ResearcherNode: Performs individual research tasks
- CompressionNode: Summarizes and formats research findings
- AgentState: Manages conversation state
- ResearcherState: Tracks individual research progress
- SupervisorState: Coordinates multi-agent workflows
- Market research and competitive analysis
- Academic literature reviews
- Technical trend analysis
- Comparative studies
- Fact-checking and verification
- Content creation and curation
The system is highly configurable through the Configuration class:
# Example configuration
config = {
"configurable": {
"NVIDIA_api_key": "...",
"research_base_url": "https://integrate.api.nvidia.com/v1",
"clarify_model": "meta/llama-3.1-70b-instruct",
"research_model": "meta/llama-3.1-70b-instruct",
"max_concurrent_research_units": 3,
"max_researcher_iterations": 3,
"max_retries": 3,
"max_structured_output_retries": 3
}
}- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues, please open an issue on the GitHub repository with detailed information about the problem.
- NVIDIA for providing the AI infrastructure
- Tavily for the search API
- The LangChain and LangGraph teams for excellent development tools