Skip to content

spring-ai-alibaba/deepresearch

Repository files navigation

DeepResearch

δΈ­ζ–‡ | English

License Java Spring Boot Spring AI

πŸ“– Introduction

DeepResearch is an intelligent research Agent built on Spring AI Alibaba Graph, designed to tackle complex research tasks. It adopts a Multi-Agent collaborative pattern, supporting dynamic task planning and execution. The system integrates multi-source online search and Hybrid RAG technology, combined with Secure Sandbox for Python code execution, enabling efficient data analysis. Through Reflection, HITL, and Self-evolution Memory, the Agent can continuously self-optimize, ultimately outputting high-quality research reports with deep insights.

✨ Technical Features

  • πŸ“‹Plan and Execute: Dynamic planning and automatic execution for complex problems
  • πŸ€–Multi Agent: Multi-agent collaboration (e.g., Researcher, Coder)
  • 🌐Online Search: Integrated multi-source search services including Tavily, Jina, Aliyun AI Search
  • πŸ“–Hybrid RAG: Combines vector and keyword retrieval for comprehensive information acquisition
  • πŸ”„Reflection: Agent self-reflection for continuous output quality optimization
  • πŸšΆβ€β™‚οΈHITL: Human-in-the-loop feedback for enhanced controllability
  • 🧬Self-evolution Memory: Self-evolving memory structure and user role memory based on interaction feedback
  • πŸ–‡οΈMCP Allocation: Support for MCP allocation in multi-agent scenarios
  • πŸ”’Secure Sandbox: Secure Python code execution in Docker sandbox environment
  • πŸ“ŠReport Generation: Supports HTML report preview, Markdown, PDF and other report formats

πŸŽ‹ Project Architecture

DeepResearch/
β”œβ”€β”€  β”œβ”€β”€ src/
β”‚    β”œβ”€β”€ agents                          # Multi-Agent initialization, MCP allocation, observability initialization
β”‚    β”œβ”€β”€ config                          # Graph construction, project Config classes
β”‚    β”œβ”€β”€ controller                      # HTTP endpoints
β”‚    β”œβ”€β”€ dispatcher                      # Graph EdgeAction
β”‚    β”œβ”€β”€ model                           # Base project entities
β”‚    β”œβ”€β”€ node                            # Graph key node definitions
β”‚    β”œβ”€β”€ rag                             # RAG core implementation
β”‚    β”œβ”€β”€ repository                      # Model configuration loading
β”‚    β”œβ”€β”€ serializer                      # Message serialization implementation
β”‚    β”œβ”€β”€ service                         # Business logic implementation
β”‚    β”œβ”€β”€ tool                            # Agent Tool definitions
β”‚    β”œβ”€β”€ util                            # Project utilities
β”‚    └── DeepResearchApplication         # Application entry point
β”œβ”€β”€  β”œβ”€β”€ resource/                  
β”‚    β”œβ”€β”€ prompts                         # Core prompts
β”‚	 β”œβ”€β”€ mcp-config.json                 # Agent MCP configuration
β”‚    β”œβ”€β”€ model-config.json               # Multi-Agent model configuration
β”œβ”€β”€  └── website-weight-config.json      # Search engine weight configuration

🧩 System Architecture

More illustrations

πŸ” Running Example

Demo Video

πŸš€ Quick Start

Prerequisites

  • Java 17+
  • Maven 3.6+
  • DashScope API Key

1. Clone and Build

git clone https://github.com/spring-ai-alibaba/deepresearch.git
cd deepresearch
mvn clean install -DskipTests

2. Configure API Key

export AI_DASHSCOPE_API_KEY=your-api-key-here

3. Start Application

Start from Project

Backend:

cd deepresearch
mvn spring-boot:run

Frontend:

cd ui-vue3
pnpm install
npm run dev

Docker Startup

  • Build the Docker image from the project directory. This may take ~5 minutes depending on network speed.
cd deepresearch
docker build -t alibaba-deepresearch:v1.0 .
  • After building, run the container and set environment variables:
docker run -d \
  --name alibaba-deepresearch \
  -e AI_DASHSCOPE_API_KEY="your_key_here" \
  -e TAVILY_API_KEY="your_key_here" \
#  -e JINA_API_KEY="your_key_here" \ optional
  -p 8080:8080 \
  alibaba-deepresearch:v1.0
  • Alternatively, use docker-compose to start Redis, ElasticSearch, and the app:
  docker-compose up

πŸ’‘Note:

  • Set API keys in the .env file
  • Config files are under dockerConfig; you can also set keys and related configs there

4. Configuration

5. Debug and Observability

Supports integration with Langfuse observability system. See documentation for configuration details.

Related API Documentation

Test Cases

See DeepResearch.http for sample requests.

curl --location 'http://localhost:8080/chat/stream' \
--header 'Content-Type: application/json' \
--data '{
    "thread_id": "__default_",
    "enable_deepresearch": false,
    "query": "Please analyze the reasons for the explosive popularity of Pop Mart",
    "max_step_num": 2,
    "auto_accepted_plan": true
}'

πŸ“š Reference Documentation

🀝 Join Community & Contributing

Contributions are welcome! Please refer to CONTRIBUTING for guidelines.

community

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Contributors

Thanks to the following contributors for improving this project (unordered):

yingzi、zhouyou、NOBODY、xiaohai-78、VLSMB、disaster1-tesk、Allen Hu、Makoto、sixiyida、Gfangxin、AliciaHu、swl、huangzhen、Tfh-Yqf、anyin-xyz、zhou youkang、supermonkeyguys、yuluo-yx、Ken Liu、co63ox、benym


Made with ❀️ by Spring AI Alibaba DeepResearch Team

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors