| page_type | sample | ||||
|---|---|---|---|---|---|
| languages |
|
||||
| products |
|
||||
| urlFragment | deepresearch | ||||
| name | Azure Deep Research - Reasoning Research Assistant | ||||
| description | Reasoning research assistant using DeepSeek R1, langchain-azure-ai and LangGraph. |
This sample creates a reasoning, AI-powered reseacrher using DeepSeek R1. Give it a topic and it will generate a web search query, gather web search results, summarise the results of web search, reflect on the summary to examine knowledge gaps, generate a new search query to address the gaps, search, and improve the summary for a user-defined number of cycles. It will provide the user a final markdown summary with all sources used. The sample uses langchain-azure-ai, which allows us to access the Azure AI Inference API to use DeepSeek R1. LangGraph, Langchain's framework for building AI agents, is used to implement the reflection architecture.
- Features
- Azure Account Requirements
- Getting Started
- Deployment
- Testing the sample
- Architecture
- Usage
- Technical Implementation
- Resources
- Contributing
- Code of Conduct
- License
The Azure Deep Research project provides the following features:
- Automated Multi-stage Research Process: Conducts comprehensive research through a structured workflow including query generation, web search, summarization, and analysis
- Real-time Research Progress Tracking: Visual step-by-step tracking of the research process
- AI Thinking Process Transparency: Access to the AI's thought process via a dedicated thinking bubble interface
- Comprehensive Report Generation: Creates well-structured research reports with illustrative images
- Responsive Design: Fully responsive interface that works across devices
IMPORTANT: In order to deploy and run this project, you'll need:
- Azure account. If you're new to Azure, get an Azure account for free and you'll get some free Azure credits to get started.
- Azure subscription with access enabled for AI Foundry. You'll need an Azure subscription with permission to access the DeepSeek-R1 model.
- Tavily API key for web research capabilities. You can get an API Key here, with 1000 free credits
You have a few options for setting up this project. The easiest way to get started is GitHub Codespaces, since it will setup all the tools for you, but you can also set it up locally.
-
You can run this template virtually by using GitHub Codespaces. The button will open a web-based VS Code instance in your browser:
-
Open a terminal window.
-
Sign in to your Azure account:
Login with Azure Developer CLI
azd auth login
-
Provision the resources and deploy the code:
azd up
You will be prompted to select some details about your deployed resources, including location. As a reminder we recommend
Sweden Centralas the region for this project. Once the deployment is complete you should be able to scroll up in your terminal and see the url that the app has been deployed to. It should look similar to thisIngress Updated. Access your app at https://env-name.codespacesname.eastus2.azurecontainerapps.io/. Navigate to the link to try out the app straight away! -
Once the above steps are completed you can test the sample.
A related option is VS Code Dev Containers, which will open the project in your local VS Code using the Dev Containers extension:
-
Start Docker Desktop (install it if not already installed)
-
Open the project:
-
In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
-
Install required packages:
#activate virtual env python -m venv .venv .\.venv\Scripts\activate #(use source ./venv/bin/activate for mac)
cd app pip install -r requirements.txt -
Once you've completed these steps jump to deployment.
Note for Windows users: If you are not using a container to run this sample, our hooks are currently all shell scripts. To provision this sample correctly while we work on updates we recommend using git bash.
-
Create a new folder and switch to it in the terminal, then run this command to download the project code:
azd init -t deepresearch
Note that this command will initialize a git repository, so you do not need to clone this repository.
-
Install required packages:
#activate virtual env python -m venv .venv .\.venv\Scripts\activate #(use source ./venv/bin/activate for mac)
cd app pip install -r requirements.txt
Once you've opened the project in Codespaces, Dev Containers, or locally, you can deploy it to Azure.
-
Sign in to your Azure account. You'll need to login to both the Azure Developer CLI and Azure CLI:
i. First with Azure Developer CLI
azd auth login
This will create a folder under
.azure/in your project to store the configuration for this deployment. You may have multiple azd environments if desired. -
Provision the resources and deploy the code:
azd up
This project uses
DeepSeek R1which may not be available in all Azure regions. Check for up-to-date region availability and select a region during deployment accordingly. We recommend using Sweden Central for this project.
You can also test out the sample locally and customize the application with your own code.
To test the sample:
-
First navigate to the app folder
cd ./app -
Make sure the required Python pacakages are installed:
#activate virtual env python -m venv .venv .\.venv\Scripts\activate #(use source ./venv/bin/activate for mac) pip install -r requirements.txt
-
Run the FastAPI server and navigate to the app:
uvicorn app.main:app --reload
Open your browser and navigate to:
http://localhost:8000
Azure Deep Research uses a modern, cloud-based architecture:
- Backend: FastAPI server with WebSocket support for real-time communication
- Frontend: HTML, CSS, and JavaScript with responsive design
- AI Models: Azure OpenAI DeepSeek-R1 for advanced reasoning
- Research: Tavily API for comprehensive web search
- State Management: LangGraph for structured research workflow
- Enter your research topic in the input field
- Click "Research" to start the automated research process
- Watch as the system progresses through multiple research stages
- Review the detailed research report with embedded images
- Access the AI's thinking process by clicking the thought bubble button
Azure Deep Research uses a multi-step pipeline to deliver comprehensive research:
- Query Generation: The system generates optimal search queries for the topic
- Web Research: Multiple searches are conducted to gather information
- Summarization: The AI analyzes and summarizes findings
- Reflection: The system identifies knowledge gaps for further research
- Iteration: Multiple research cycles are conducted for thoroughness
- Report Generation: A final comprehensive report with images is created
The implementation leverages LangGraph for orchestrating the research workflow and WebSockets for real-time communication between the client and server.
- FastAPI Documentation
- Azure OpenAI Service Documentation
- LangGraph Documentation
- Tavily API Documentation
This project welcomes contributions and suggestions. Please fork the repository and submit a pull request for any improvements.
This project has adopted the Microsoft Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project is licensed under the MIT License - see the LICENSE file for details.


