A multi-agent AI research system that transforms user queries into structured research reports.
Deep Research is a FastAPI-based application that uses a multi-agent approach to perform comprehensive research on user queries. The system consists of three specialized agents:
- Planner Agent: Transforms user queries into structured research plans
- Researcher Agent: Executes research tasks using web search tools
- Synthesizer Agent: Compiles findings into a cohesive final report
- REST API for submitting research queries
- Multi-agent architecture for specialized task handling
- Integration with OpenAI's GPT models
- Web search capabilities via Tavily API
- Docker support for easy deployment
- Python 3.9+
- FastAPI
- LangChain & LangGraph
- OpenAI API
- Tavily Search API
- Poetry for dependency management
- Docker & Docker Compose
- Python 3.9 or higher
- Poetry
- Docker & Docker Compose (optional)
-
Clone the repository:
git clone <repository-url> cd deep-research
-
Install dependencies:
poetry install
-
Create a
.envfile with your API keys:openai_api_key=your_openai_api_key tavily_api_key=your_tavily_api_key
-
Run the application:
poetry run uvicorn src.main:app --host 0.0.0.0
-
Build and run with Docker Compose:
docker-compose up --build
GET /health
Response:
{
"message": "running..."
}POST /research
Request Body:
{
"query": "What are the latest advancements in quantum computing?"
}Response:
{
"plan": "...",
"research": "...",
"final_report": "...",
"messages": [...]
}deep-research/
├── src/
│ ├── agents/ # Multi-agent system components
│ ├── api/ # FastAPI routes and schemas
│ ├── core/ # Core configuration and logic
│ ├── prompts/ # Agent prompt templates
│ ├── tools/ # Research tools
│ ├── utils/ # Utility functions
│ └── main.py # Application entry point
├── tests/ # Test suite
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
├── pyproject.toml # Poetry dependencies
└── README.md # This file
[License information]
- Alexander Zwerner