The Problem
Research agents that produce genuinely useful reports need to coordinate multiple model calls, search APIs, and iterative refinement loops. Most implementations hard-code one provider or search tool, making them brittle and hard to adapt. This repo solves that by providing a configurable, provider-agnostic deep research agent built on LangGraph.
What This Does
open_deep_research is a fork of langchain-ai/open_deep_research that implements a multi-stage research pipeline: query generation, web search, summarization, and report writing. The current code lives in src/open_deep_research/ with a src/legacy/ directory containing the older single-agent implementation. The newer deep_researcher.py uses a supervisor pattern to coordinate multiple research agents.
The project supports multiple LLM providers via LangChain's init_chat_model() and multiple search backends (Tavily, Exa, and MCP tools). Configuration flows through src/open_deep_research/configuration.py, which handles model selection, search API choice, and agent settings.
How It Is Wired
Execution starts at main in src/legacy/tests/run_test.py:21, which calls run_test and exits the process via subprocess.run. The production entry point is the LangGraph server started from langgraph.json at the repo root.
The internal call graph shows 131 resolved call edges across 22 Python files. from_runnable_config in src/legacy/configuration.py is the most-connected function, called from 22 places—it's the configuration hub everything depends on. get_today_str (16 callers) and get_config_value (9 callers) in src/legacy/utils.py are the next most critical. src/legacy/utils.py is the largest file at 37 functions and makes outbound network calls plus a cryptographic operation. src/open_deep_research/utils.py (28 functions) handles the Tavily search and webpage summarization.
The graph is acyclic—no circular dependencies—but src/legacy/utils.py and src/open_deep_research/utils.py are oversized hubs. Changing anything in them ripples widely: 1228 code lines in the legacy utils file alone.
How To Use It
Setup (from README):
git clone https://github.com/moses-y/open_deep_research.git
cd open_deep_research
uv venv
source .venv/bin/activate
uv sync
cp .env.example .env
Configuration: Set model and search API keys in .env per .env.example. The configuration.py file defines defaults: openai:gpt-4.1-mini for summarization, openai:gpt-4.1 for research and report writing.
Running:
uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev --allow-blocking
This starts the LangGraph Studio UI at http://127.0.0.1:2024.
Real-World Use
A team building an internal research assistant could deploy this as a LangGraph server, configure it with their preferred model provider and search API, and expose it to users who submit research questions. The supervisor pattern in deep_researcher.py allows parallel research agents, making it suitable for multi-topic briefs. The examples/ directory shows real outputs for arXiv, PubMed, and market research queries.
Code Health & Issues
Static analysis found 12 findings (5 high, 7 medium). The high-severity items:
- High - Duplicated code - 22 repeated 6-line blocks across
src/legacy/prompts.py,src/open_deep_research/prompts.py, and bothutils.pyfiles. Shared helpers should be extracted. - High - Deep nesting - Max indentation depth 19 in
src/legacy/graph.py,multi_agent.py, andutils.py. Control flow is hard to follow; early returns would help. - High - Oversized files -
src/legacy/utils.py(1228 lines) andsrc/open_deep_research/utils.pyneed splitting by responsibility.
The code health audit flags one critical issue: .github/workflows/claude.yml contains ANTHROPIC_API_KEY in a workflow a fork can trigger, enabling credential exfiltration via pull request. The workflow also uses anthropics/claude-code-action@beta (unpinned tag) and lacks persist-credentials: false. No dependency vulnerability scan exists in CI, and outbound requests in src/legacy/utils.py lack timeouts.
The Bottom Line
A functional deep research agent with solid architecture—the supervisor pattern is a real improvement over the legacy single-agent flow. The code quality issues are concentrated in src/legacy/ and the CI security problems are fixable in an afternoon. Use it if you need a configurable research agent and can invest in the cleanup; the security findings should be addressed before any public deployment.