|
| 1 | +# lite-deep-researcher |
| 2 | + |
| 3 | +[](https://www.python.org/downloads/) |
| 4 | +[](https://opensource.org/licenses/MIT) |
| 5 | + |
| 6 | +> Come from Open Source, Back to Open Source |
| 7 | +
|
| 8 | +lite-deep-researcher is a community-driven AI automation framework that builds upon the incredible work of the open source community. Our goal is to combine language models with specialized tools for tasks like web search, crawling, and Python code execution, while giving back to the community that made this possible. |
| 9 | + |
| 10 | +## Quick Start |
| 11 | + |
| 12 | +```bash |
| 13 | +# Clone the repository |
| 14 | +git clone https://github.com/hetaoBackend/lite-deep-researcher.git |
| 15 | +cd lite-deep-researcher |
| 16 | + |
| 17 | +# Install dependencies, uv will take care of the python interpreter and venv creation |
| 18 | +uv sync |
| 19 | + |
| 20 | +# Configure .env |
| 21 | +cp .env.example .env |
| 22 | + |
| 23 | +# Configure config.yaml |
| 24 | +cp config.yaml.example config.yaml |
| 25 | + |
| 26 | +# Run the project |
| 27 | +uv run main.py |
| 28 | +``` |
| 29 | + |
| 30 | +## Development |
| 31 | + |
| 32 | +### Testing |
| 33 | + |
| 34 | +Run the test suite: |
| 35 | + |
| 36 | +```bash |
| 37 | +# Run all tests |
| 38 | +make test |
| 39 | + |
| 40 | +# Run specific test file |
| 41 | +pytest tests/integration/test_workflow.py |
| 42 | + |
| 43 | +# Run with coverage |
| 44 | +make coverage |
| 45 | +``` |
| 46 | + |
| 47 | +### Code Quality |
| 48 | + |
| 49 | +```bash |
| 50 | +# Run linting |
| 51 | +make lint |
| 52 | + |
| 53 | +# Format code |
| 54 | +make format |
| 55 | +``` |
| 56 | + |
| 57 | +## Architecture |
| 58 | + |
| 59 | +lite-deep-researcher implements a modular multi-agent system architecture designed for automated research and code analysis. The system is built on LangGraph, enabling a flexible state-based workflow where components communicate through a well-defined message passing system. |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +The system employs a streamlined workflow with the following components: |
| 64 | + |
| 65 | +1. **Coordinator**: The entry point that manages the workflow lifecycle |
| 66 | + - Initiates the research process based on user input |
| 67 | + - Delegates tasks to the planner when appropriate |
| 68 | + - Acts as the primary interface between the user and the system |
| 69 | + |
| 70 | +2. **Planner**: Strategic component for task decomposition and planning |
| 71 | + - Analyzes research objectives and creates structured execution plans |
| 72 | + - Determines if enough context is available or if more research is needed |
| 73 | + - Manages the research flow and decides when to generate the final report |
| 74 | + |
| 75 | +3. **Research Team**: A collection of specialized agents that execute the plan: |
| 76 | + - **Researcher**: Conducts web searches and information gathering using tools like Tavily and web crawling |
| 77 | + - **Coder**: Handles code analysis, execution, and technical tasks using Python REPL and Bash tools |
| 78 | + Each agent has access to specific tools optimized for their role and operates within the LangGraph framework |
| 79 | + |
| 80 | +4. **Reporter**: Final stage processor for research outputs |
| 81 | + - Aggregates findings from the research team |
| 82 | + - Processes and structures the collected information |
| 83 | + - Generates comprehensive research reports |
| 84 | + |
| 85 | +## Examples |
| 86 | + |
| 87 | +The following examples demonstrate the capabilities of lite-deep-researcher: |
| 88 | + |
| 89 | +### Research Reports |
| 90 | + |
| 91 | +1. **What is MCP?** - A comprehensive analysis of the term "MCP" across multiple contexts |
| 92 | + - Explores Model Context Protocol in AI, Monocalcium Phosphate in chemistry, and Micro-channel Plate in electronics |
| 93 | + - [View full report](examples/what_is_mcp.md) |
| 94 | + |
| 95 | +2. **Bitcoin Price Fluctuations** - Analysis of recent Bitcoin price movements |
| 96 | + - Examines market trends, regulatory influences, and technical indicators |
| 97 | + - Provides recommendations based on historical data |
| 98 | + - [View full report](examples/bitcoin_price_fluctuation.md) |
| 99 | + |
| 100 | +3. **What is LLM?** - An in-depth exploration of Large Language Models |
| 101 | + - Discusses architecture, training, applications, and ethical considerations |
| 102 | + - [View full report](examples/what_is_llm.md) |
| 103 | + |
| 104 | +To run these examples or create your own research reports, you can use the following commands: |
| 105 | + |
| 106 | +```bash |
| 107 | +# Run with a specific query |
| 108 | +uv run main.py "What factors are influencing AI adoption in healthcare?" |
| 109 | + |
| 110 | +# Run with custom planning parameters |
| 111 | +uv run main.py --max_plan_iterations 3 "How does quantum computing impact cryptography?" |
| 112 | + |
| 113 | +# Or run interactively |
| 114 | +uv run main.py |
| 115 | + |
| 116 | +# View all available options |
| 117 | +uv run main.py --help |
| 118 | +``` |
| 119 | + |
| 120 | +### Command Line Arguments |
| 121 | + |
| 122 | +The application supports several command-line arguments to customize its behavior: |
| 123 | + |
| 124 | +- **query**: The research query to process (can be multiple words) |
| 125 | +- **--max_plan_iterations**: Maximum number of planning cycles (default: 1) |
| 126 | +- **--max_step_num**: Maximum number of steps in a research plan (default: 3) |
| 127 | +- **--debug**: Enable detailed debug logging |
| 128 | + |
| 129 | +## License |
| 130 | + |
| 131 | +This project is open source and available under the [MIT License](LICENSE). |
| 132 | + |
| 133 | +## Acknowledgments |
| 134 | + |
| 135 | +Special thanks to all the open source projects and contributors that make lite-deep-researcher possible. We stand on the shoulders of giants. |
| 136 | + |
| 137 | +In particular, we want to express our deep appreciation for: |
| 138 | +- [LangChain](https://github.com/langchain-ai/langchain) for their exceptional framework that powers our LLM interactions and chains |
| 139 | +- [LangGraph](https://github.com/langchain-ai/langgraph) for enabling our sophisticated multi-agent orchestration |
| 140 | + |
| 141 | +These amazing projects form the foundation of lite-deep-researcher and demonstrate the power of open source collaboration. |
0 commit comments