open_deep_research

Application

langchain-ai/open_deep_research

Open-source deep research agent with multi-model and search tool support.

Overview

A configurable deep research agent that works with various LLM providers, search APIs, and MCP servers. Achieves top rankings on the Deep Research Bench leaderboard. Built with LangGraph for flexible orchestration.

README Preview

# 🔬 Open Deep Research\n\n\n\nDeep research has broken out as one of the most popular agent applications. This is a simple, configurable, fully open source deep research agent that works across many model providers, search tools, and MCP servers. It's performance is on par with many popular deep research agents ([see Deep Research Bench leaderboard](https://huggingface.co/spaces/Ayanami0730/DeepResearch-Leaderboard)).\n\n\n\n### 🔥 Recent Updates\n\n**August 14, 2025**: See our free course [here](https://academy.langchain.com/courses/deep-research-with-langgraph) (and course repo [here](https://github.com/langchain-ai/deep_research_from_scratch)) on building open deep research.\n\n**August 7, 2025**: Added GPT-5 and updated the Deep Research Bench evaluation w/ GPT-5 results.\n\n**August 2, 2025**: Achieved #6 ranking on the [Deep Research Bench Leaderboard](https://huggingface.co/spaces/Ayanami0730/DeepResearch-Leaderboard) with an overall score of 0.4344. \n\n**July 30, 2025**: Read about the evolution from our original implementations to the current version in our [blog post](https://rlancemartin.github.io/2025/07/30/bitter_lesson/).\n\n**July 16, 2025**: Read more in our [blog](https://blog.langchain.com/open-deep-research/) and watch our [video](https://www.youtube.com/watch?v=agGiWUpxkhg) for a quick overview.\n\n### 🚀 Quickstart\n\n1. Clone the repository and activate a virtual environment:\n```bash\ngit clone https://github.com/langchain-ai/open_deep_research.git\ncd open_deep_research\nuv venv\nsource .venv/bin/activate  # On Windows: .venv\Scripts\activate\n```\n\n2. Install dependencies:\n```bash\nuv sync\n# or\nuv pip install -r pyproject.toml\n```\n\n3. Set up your `.env` file to customize the environment variables (for model selection, search tools, and other configuration settings):\n```bash\ncp .env.example .env\n```\n\n4. Launch agent with the LangGraph server locally:\n\n```bash\n# Install dependencies and start the LangGraph server\nuvx --refres

FAQ (2)

informational
What does `think_tool` do in Open Deep Research, and does it improve reasoning?

think_tool is intentionally a no-op scratchpad tool. Its Python return value performs no action and changes no graph state. Its purpose is to make the model emit an explicit thought/reasoning string in a tool call before calling search or other tools, encouraging planning and self-correction. Any benefit comes from those extra reasoning tokens; it is not a separate reflection engine and performance is not guaranteed. It can help ordinary tool-calling models, but is usually redundant for models with built-in reasoning. To disable it, remove think_tool from the tools bound to the model and remove the prompt instructions that tell the model to call it; otherwise the model may try to call a missing tool.

GitHub Issue #170
Troubleshooting
How do I configure a LangChain OpenAI-based app to use the OpenRouter API?

Keep the provider set to openai because OpenRouter exposes an OpenAI-compatible API, but point the client's base_url to OpenRouter. LangChain's ChatOpenAI uses OPENAI_BASE_URL, not OPENAI_ENDPOINT.

In your .env file, use:

OPENAI_API_KEY="your-openrouter-key"
OPENAI_BASE_URL="https://openrouter.ai/api/v1"
OPENAI_MODEL="qwen/qwq-32b:free"

Keep the model configuration as:

planner_provider: "openai"
planner_model: "qwen/qwq-32b:free"
writer_provider: "openai"
writer_model: "qwen/qwq-32b:free"

If the application constructs the client directly, make sure it passes base_url:

ChatOpenAI(
    model="qwen/qwq-32b:free",
    api_key=os.environ["OPENAI_API_KEY"],
    base_url="https://openrouter.ai/api/v1",
    timeout=60,
)

Do not include /chat/completions in the base URL.

Verify connectivity and credentials with:

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen/qwq-32b:free","messages":[{"role":"user","content":"hello"}]}'

If requests still time out, increase the client timeout or try a different/paid OpenRouter model; free models can be slow or temporarily unavailable.

GitHub Issue #75