This is Part 2 of a two-part series. Part 1 covers why every hosted API option I evaluated fell short, and why I ended up here.
Same disclaimer as Part 1 — I did this research several months ago and am only now writing it up properly.
After exhausting the hosted API options, the question shifted from who offers deep research as a service to what does deep research actually look like under the hood, and can I build it myself?
Before jumping into frameworks and tools, it's worth stepping back to answer a more fundamental question that I found surprisingly hard to pin down early in the research.
What Is Deep Research, Actually?
"Deep research" gets used loosely to mean anything from "a chatbot that can search the web" to "a fully autonomous research analyst." The distinction matters a lot when you're deciding what to build.
The core pattern of a real deep research agent:
- Plan — given a research question, decompose it into sub-questions
- Search — for each sub-question, query the web
- Read — retrieve and parse the actual page content (not just snippets)
- Reflect — based on what was found, decide whether more searching is needed, or whether the question has been answered
- Synthesize — integrate findings across all sources into a coherent, cited answer
The key word is iterative. A deep research agent loops. It searches, reads something, realizes it needs to know more, searches again, and so on. It's not a single prompt-response cycle — it's an autonomous loop that runs until the task is complete or a resource limit is hit.
This is why "search with LLM synthesis" isn't deep research. Those products do steps 2 and 5, skipping 1, 3, and 4 entirely. The result is faster and cheaper, but fundamentally shallower — the model synthesizes from snippets, not from actually reading sources.
The Planner-Executor Pattern
The most common architecture you'll see in open-source implementations is a planner-executor split, popularized by GPT-Researcher1:
- A planner agent takes the research question and generates a list of sub-questions forming a comprehensive research framework
- One or more executor agents handle each sub-question: search, retrieve pages, extract key content
- A synthesis step filters and summarizes all collected material into the final report
This maps well to what LangGraph calls a supervisor-subagent pattern — a coordinator spawns parallel workers, collects their findings, and decides whether more research is needed before writing.2

The advantages of this split:
- Parallelization — multiple sub-questions can be researched simultaneously, which matters a lot given how slow web retrieval is
- Context isolation — each executor works in its own context window, avoiding the "context clash" that happens when a single agent tries to hold research on five different sub-topics at once
- Depth control — the supervisor can spawn more sub-agents if findings are insufficient, or stop early if the question is already answered
💡 Note: LangChain's own experiments found that writing report sections in parallel with sub-agents produced disjoint, poorly-coordinated output. Their fix: use multi-agent only for the research phase, then write the final report in a single LLM call with all findings. This is a non-obvious lesson worth knowing before you design your own.2
Why It Matters
OpenAI's Deep Research was the moment this capability broke into mainstream awareness — a product that could take a complex question, spend 10–30 minutes autonomously researching it across dozens of sources, and return a report at the level of a junior analyst. It was immediately recognized as a qualitatively different kind of AI application, not just a better chatbot.3 The reaction from the open-source community was immediate: HuggingFace launched a 24-hour sprint to reproduce it the very next day.4
The numbers back this up. HuggingFace's experiments showed that wrapping the same frontier LLM in an agentic framework boosted benchmark performance by up to 60 points — the model itself didn't change, only the scaffolding around it.4 OpenAI made the same point in their Deep Research release: standalone LLMs scored under 7% on the GAIA benchmark; with Deep Research's agentic framework, that jumped to 67%. The agent framework is doing most of the work.
The core problem it solves is one that normal search and RAG both fail at: tasks that require sustained, multi-hop reasoning across many sources. Standard RAG retrieves a few relevant chunks and synthesizes them in one pass. That works well when the answer exists in a single document or can be found with one search. It breaks down when:
- The question requires comparing information across many sources that don't agree
- The answer depends on chaining together facts from different domains
- You don't know in advance exactly what to search for — you only know what to search for after you've read the first few results
- The task requires validating claims, not just retrieving them
These are exactly the kinds of tasks that take a human researcher hours or days: market analysis, legal research, competitive intelligence, scientific literature review. Deep research agents automate the loop — the back-and-forth of searching, reading, realizing you need more, searching again — that makes this kind of work slow and expensive.1
As one framing puts it, deep research breaks the passive information bubble of traditional search-and-recommend systems. Instead of surfacing content based on what an algorithm thinks you want, it actively pursues what you actually need.3
The practical implication for teams building AI applications: once users experience deep research quality, one-shot RAG answers feel noticeably shallow. The bar has moved.
The Open-Source Landscape
With that definition in hand, I went looking for open-source implementations. What's out there?
Agent Frameworks
LangGraph — Graph-based agent orchestration from LangChain. The most mature option for building stateful, multi-step research workflows. The ReAct pattern (Reason + Act) is built in, and the graph structure maps naturally to the research loop: nodes for planning, searching, reading, and synthesizing, with conditional edges for the "do I need more information?" decision. The downside: verbose to set up, and the LangChain abstraction layer can feel leaky when you hit edge cases.
[Other frameworks TBD] — [Fill in: AutoGen, CrewAI, anything else you looked at]
Reference Implementations
There are two broad categories of open-source deep research implementations, as a Volcengine community article on the topic usefully framed it3: those built on top of existing orchestration frameworks (LangGraph, Dify, smolagents), and those purpose-built specifically for deep research.
Framework-based:
HuggingFace Open Deep Research (smolagents) (huggingface/smolagents) — historically significant: this was built in a 24-hour sprint by the HuggingFace team the day after OpenAI released Deep Research, and was the first serious open-source response to it.4 The key architectural distinction is the use of a CodeAgent — instead of expressing actions as JSON tool calls, the agent writes Python code. This turns out to matter: Wang et al. showed code actions require ~30% fewer steps than JSON equivalents, and HuggingFace's own experiments showed switching from code to JSON actions dropped GAIA benchmark performance from 55% to 33%. Built on the smolagents library, supports open models like DeepSeek R1, and the whole approach is designed to be locally runnable.
LangChain Open Deep Research (langchain-ai/open_deep_research, GitHub) — LangChain's own reference implementation built on LangGraph.2 Three-phase design: Scope (user clarification + brief generation) → Research (supervisor + parallel sub-agents) → Write (single final LLM call). Key insight from their post: they compress the user-agent clarification chat into a focused "research brief" to avoid token bloat in later phases. Configurable with any search tool or MCP server. More architectural flexibility than GPT-Researcher, but more setup required.

Purpose-built:
GPT-Researcher (assafelovic/gpt-researcher, ~19k stars) — the most widely referenced open-source deep research agent, built by the Tavily team.1 Implements the planner-executor pattern directly: a planner agent generates sub-questions, executor agents search and retrieve pages for each, and a publisher synthesizes the final report. Supports PDF/Word export, local document research, JavaScript-rendered page scraping, MCP integration, and even inline AI-generated images. It's the most feature-complete option in the list — but that completeness comes at a cost.
The codebase is substantial. Eight skill manager classes (ResearchConductor, ReportGenerator, ContextManager, BrowserManager, SourceCurator, DeepResearchSkill…), a three-tier LLM strategy (fast/smart/strategic), and LangChain baked in at the context compression layer:
# gpt_researcher/context/retriever.py
from langchain.schema.retriever import BaseRetriever
from langchain.schema import Document
class SearchAPIRetriever(BaseRetriever):
"""Used internally for context compression — not optional."""
pages: List[Dict] = []
...
On top of that, choose_agent() makes an additional LLM call just to decide which type of agent to use before research even starts:
# gpt_researcher/actions/agent_creator.py
response = await create_chat_completion(
model=cfg.smart_llm_model,
messages=[
{"role": "system", "content": f"{prompt_family.auto_agent_instructions()}"},
{"role": "user", "content": f"task: {query}"},
],
...
)
# Returns e.g. "💰 Finance Agent" or "🌍 Travel Agent"
For our use case — web search and synthesis, nothing more — all of this was overhead we'd never use. We didn't need file processing, MCP integration, multi-agent coordination, or LLM-selected agent roles. We needed: take query → search web → return report. GPT-Researcher is genuinely impressive engineering, but it's built for a much broader set of use cases than ours. Main search dependency is also Tavily — not domestic-friendly without forking the retriever layer.5
node-DeepResearch (jina-ai/node-DeepResearch, ~2.6k stars) — Jina AI's open-source implementation. Notable because Jina also exposes it as an API directly, making it one of the few open-source projects with a drop-in hosted option. Node.js based.
Scira (zaidmukaddam/scira, ~6.4k stars) — another community implementation worth knowing about.
open-deep-research by nickscamara (nickscamara/open-deep-research, ~4.3k stars) and OpenDeepResearcher by mshumer (mshumer/OpenDeepResearcher, ~2.2k stars) — lighter implementations, good for reading the code to understand the core loop without framework overhead.
open-deep-research by btahir (btahir/open-deep-research) — simpler three-step implementation: search retrieval → content extraction via JinaAI → report generation. No iterative loop, which limits quality, but the code is clean and easy to follow as a starting point.
Open Deep Wide Research (puppyone-ai/DeepWideResearch) — full disclosure: this one is from my former company. Worth calling out because it takes a different design angle than most. Instead of a fixed research pipeline, it exposes two explicit control dimensions: depth (reasoning depth and response time) and width (breadth of sources queried). You dial these independently, and the system gives you a cost estimate upfront before running. MCP-native, self-hostable, hot-swappable models (OpenAI, Claude, local LLMs), and configurable search engines (Tavily and Exa out of the box). The Deep × Wide framing is genuinely useful for production use cases where you need different quality/cost tradeoffs for different query types — a customer service bot doesn't need the same settings as an enterprise market analysis.
Comparing the Options
With the landscape mapped out, the decision came down to a few concrete criteria for my use case: China accessibility, Chinese language quality, self-hostability, and how much framework complexity I was willing to take on.
| Project | Language | Framework | Search Backend | Self-hostable | China-friendly | License |
|---|---|---|---|---|---|---|
| HuggingFace Open Deep Research | Python | smolagents (CodeAgent) | SerpAPI / Serper | ✅ | ✅ swap model | Apache 2.0 |
| LangChain Open Deep Research | Python | LangGraph | Tavily / Perplexity / MCP | ✅ | ⚠️ depends on search choice | MIT |
| GPT-Researcher | Python | Custom | Tavily | ✅ | ❌ Tavily not domestic | Apache 2.0 |
| Open Deep Wide Research | Python + TS | Custom + MCP | Tavily / Exa / any MCP | ✅ | ⚠️ swap search engine | Apache 2.0 |
| node-DeepResearch (Jina) | TypeScript | Custom | Jina Search API | ✅ / hosted option | ⚠️ | Apache 2.0 |
| Scira | TypeScript | Custom | varies | ✅ | ⚠️ | AGPL v3 |
| btahir/open-deep-research | TypeScript | Minimal | Google/Bing + JinaAI | ✅ | ⚠️ | MIT |
| nickscamara/open-deep-research | TypeScript | Minimal | varies | ✅ | ⚠️ | MIT |
| OpenDeepResearcher (mshumer) | Python | Minimal (Notebook) | varies | ✅ | ⚠️ | MIT |
A few observations from evaluating these:
The search backend is the real constraint. Almost all of these default to Tavily or Perplexity — both are excellent for quality but not accessible from China without a proxy. Swapping in a domestic search API (Bing China endpoint, or one of the domestic providers) is technically possible but requires forking and adapting the retrieval layer.
LangGraph gives the most flexibility. If you're willing to invest in the setup, building on LangGraph lets you wire in any LLM and any search tool. The framework handles the state machine; you own the components. For a production internal service, that matters.
GPT-Researcher is the best reference architecture for understanding the pattern — but it's heavy. It has the highest stars outside of LangChain's version and the most complete feature set. But for an MVP where we needed to move fast and keep the codebase understandable, the weight was a liability: 8+ internal classes, a three-tier LLM strategy, LangChain used internally for context compression, LangGraph for multi-agent mode. That's a lot to reason about when something breaks. According to its DeepWiki architecture analysis, it's architecturally heavier than even the LangChain version.5 Worth studying the code — less suitable as a drop-in base for a lean internal service.
Jina's node-DeepResearch is the sleeper option. It's the only one with a ready hosted API you can call, which closes the loop on the original problem from Vol. 1 — though you're now trading Jina's infrastructure dependency for the domestic providers' access issues.
The LLM API Stack
For the underlying model, I evaluated both domestic and international options:
Domestic (China-hosted, data stays in China):
- Tongyi Qwen via Ali Bailian API — good Chinese, reasonable cost
- [Others TBD]
International:
- OpenAI GPT-4o — strong quality, but data leaves China and cost in USD adds up
Web Search Access
A deep research agent needs to actually search the web and read pages. The main options I looked at:
- Tavily — purpose-built for LLM agents, returns clean extracted content rather than raw HTML. Easiest to integrate. Not domestic.
- Bing Search API — more reliable access from China than Google. Raw search results, you handle the scraping.
- [Others TBD] — SerpAPI, domestic search APIs, etc.
What We Ended Up With
We went with HuggingFace Open Deep Research (smolagents). Here's the reasoning for each factor that mattered.
Python. Our internal service stack is Python. Node.js or TypeScript-based implementations (Jina, Scira, the btahir/nickscamara forks) were out from the start — we didn't want a language boundary in a core service component.
Credibility and community. GPT-Researcher has the highest star count (~19k), but smolagents had the strongest combination of benchmark results, published methodology, and active community activity at the time. The 55% GAIA benchmark score, the published comparison against Magentic-One, and the fact that HuggingFace wrote it as a serious research sprint rather than a weekend project all gave us confidence the architecture was sound. There was also significantly more written about it online — blog posts, reproductions, case studies — compared to the smaller implementations.
LangChain's developer experience reputation. I'll be honest: I hadn't hit the worst of it personally at that point, but the reputation preceded it strongly enough that my team pushed back hard on anything LangChain-based. The complaints are well-documented: abstractions that are helpful until they aren't, at which point you're digging through five layers of internals to change a small detail. Octomind, who used LangChain in production for over a year, wrote a detailed post about why they removed it entirely — the summary was essentially "once we removed it, we could just code."[^5] One engineer reported cutting API latency by over a second just by removing LangChain's memory wrapper. The core issue is that the framework hides so much behavior that debugging becomes opaque — errors surface inside LangChain internals, not in your code. LangChain themselves acknowledged this in their 1.0 release, committing to semantic versioning and a more stable API surface going forward.6 To be fair, LangGraph is a significant improvement over earlier LangChain patterns — but the DX reputation was enough for us to prefer smolagents at that moment.
Smolagents is one-shot, LangChain's version isn't. This was actually a decisive factor for our specific use case. LangChain's Open Deep Research achieves its higher benchmark scores partly through a clarification step — it asks the user follow-up questions before starting research, then rewrites the prompt into a detailed brief. That's genuinely good design for an interactive research assistant. But we were building an internal service: a single API call in, a research report out. No interactive clarification loop, no multi-turn conversation. smolagents' approach — give it a well-formed query, it goes and researches — matched our architecture exactly. The LangChain version's benchmark scores are partly attributable to that clarification step, so stripping it out to fit our use case would likely degrade performance in unknown ways — and we had no time to test that on an MVP timeline. smolagents gave us a known quantity out of the box.
Lightweight by design, with a unique CodeAgent architecture. The entire smolagents agent logic fits in roughly 1,000 lines of code.7 That's not a marketing claim — the core logic is in a single agents.py file you can actually read. Compare that to GPT-Researcher's 8+ skill manager classes and LangChain dependency, or a standard LangChain installation pulling in 80+ packages. For our use case, the entry point was as simple as:
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel
agent = CodeAgent(
tools=[DuckDuckGoSearchTool()],
model=HfApiModel("Qwen/Qwen2.5-72B-Instruct"),
)
agent.run("Research the impact of AI on healthcare in China")
Swap in your own search tool and model — done. No skill managers, no agent-type selection LLM call, no LangChain dependency. When something breaks, you debug Python.
More importantly, smolagents was the only framework at the time that implemented code-act natively — the agent expresses its actions as Python code rather than JSON tool calls. None of the other open-source deep research implementations at the time made this claim or built around it. This matters concretely: code actions require ~30% fewer LLM calls than equivalent JSON tool-call approaches, and HuggingFace's own experiments showed switching from code to JSON actions on the same setup dropped GAIA benchmark performance from 55% to 33%.4 The intuition is straightforward — LLMs are trained on vastly more code than JSON schemas, so expressing intent in code is more natural and more reliable.
License. Apache 2.0. We were building this into a business application, so GPL-family licenses (including AGPL, which Scira uses) were a non-starter. MIT and Apache 2.0 were both acceptable; smolagents being Apache 2.0 was fine.
One thing worth separating out: rejecting GPT-Researcher as an agent framework doesn't mean Tavily isn't a good search engine. It is — arguably the best purpose-built option for LLM agents. The reason we didn't use it had nothing to do with quality and everything to do with geography. Which brings us to the next question: once you've chosen your agent framework, what do you actually plug in as the search backend?
- DeepWiki. (n.d.). GPT Researcher — Core Architecture. Retrieved from https://deepwiki.com/assafelovic/gpt-researcher/3-core-architecture
What's Next: Choosing a Search Provider
With the agent framework decided, the next question was: what does it actually search with?
This turned out to be its own rabbit hole. A deep research agent is only as good as its search layer — the quality, freshness, and coverage of what gets retrieved directly determines what the LLM has to synthesize from. And for a China-based internal service, "just use Tavily" wasn't an option.
The main candidates I evaluated:
- Tavily — purpose-built for LLM agents, returns clean extracted content rather than raw HTML, easiest to integrate. Not accessible from China without a proxy.
- Bing Search API — reliable access from China, better China coverage than Google. Returns raw search results; you handle the scraping and content extraction yourself.
- SerpAPI / Serper — aggregators that wrap multiple search engines. More flexible, still requires content extraction layer.
- Domestic search APIs — Baidu AI Search, z.ai Web Search, Volcengine Web Search (all covered in Vol. 1). Accessible from China, good Chinese-language coverage, but as we established, they're search APIs not research agents — you'd be using them as the retrieval layer underneath smolagents.
- JinaAI Reader — not a search engine but a content extraction service: give it a URL, get back clean markdown. Useful as the scraping layer on top of any search API.
I'll cover the full evaluation — what I tested, what the tradeoffs were, and what we actually plugged in — in the next post.
ReflectionsThe orchestration layer matters more than the model. The quality of a research agent is less about which LLM you use and more about how well the search-read-synthesize loop is structured. A well-designed workflow with a mid-range model outperforms a naive single-prompt call with a frontier model.
Cost math is non-obvious. Deep research is token-heavy by nature. A single research query can easily consume 50k–200k tokens across all the retrieval, reading, and synthesis steps. Budget accordingly before committing to a model.
Chinese language quality is a real differentiator. The domestic models handled Chinese research tasks noticeably better than GPT-4o, particularly for sources natively in Chinese. For our use case this mattered a lot.
Appendix
- 几米哥. (n.d.). 解密GPT Researcher:让AI成为你的专属研究助手. 知乎专栏. Retrieved from https://zhuanlan.zhihu.com/p/16881261111
- LangChain. (2025, July 16). Open Deep Research. LangChain Blog. Retrieved from https://blog.langchain.com/open-deep-research/
- AI工程化. (2025, February 25). Deep Research技术盘点!比RAG更高级的LLM应用范式. Volcengine Developer Community. Retrieved from https://developer.volcengine.com/articles/7475229126337658889
- Roucher, A., Villanova del Moral, A., Merve, Wolf, T., & Fourrier, C. (2025, February 4). Open-source DeepResearch – Freeing our search agents. HuggingFace Blog. Retrieved from https://huggingface.co/blog/open-deep-research
- Octomind. (2024). Why we no longer use LangChain for building our AI agents. Retrieved from https://www.octomind.dev/blog/why-we-no-longer-use-langchain-for-building-our-ai-agents
- LangChain. (2024). LangChain / LangGraph 1.0. LangChain Blog. Retrieved from https://blog.langchain.com/langchain-langgraph-1dot0/
- HuggingFace. (n.d.). smolagents. GitHub. Retrieved from https://github.com/huggingface/smolagents
- DeepWiki. (n.d.). GPT Researcher — Core Architecture. Retrieved from https://deepwiki.com/assafelovic/gpt-researcher/3-core-architecture
- Tavily. (n.d.). GPT Researcher documentation. Retrieved from https://docs.tavily.com/examples/open-sources/gpt-researcher
Footnotes
-
几米哥. (n.d.). 解密GPT Researcher:让AI成为你的专属研究助手. 知乎专栏. Retrieved from https://zhuanlan.zhihu.com/p/16881261111 ↩ ↩2 ↩3
-
LangChain. (2025, July 16). Open Deep Research. LangChain Blog. Retrieved from https://blog.langchain.com/open-deep-research/ ↩ ↩2 ↩3
-
AI工程化. (2025, February 25). Deep Research技术盘点!比RAG更高级的LLM应用范式. Volcengine Developer Community. Retrieved from https://developer.volcengine.com/articles/7475229126337658889 ↩ ↩2 ↩3
-
Roucher, A., Villanova del Moral, A., Merve, Wolf, T., & Fourrier, C. (2025, February 4). Open-source DeepResearch – Freeing our search agents. HuggingFace Blog. Retrieved from https://huggingface.co/blog/open-deep-research ↩ ↩2 ↩3 ↩4
-
DeepWiki. (n.d.). GPT Researcher — Core Architecture. Retrieved from https://deepwiki.com/assafelovic/gpt-researcher/3-core-architecture ↩ ↩2
-
LangChain. (2024). LangChain / LangGraph 1.0. LangChain Blog. Retrieved from https://blog.langchain.com/langchain-langgraph-1dot0/ ↩
-
HuggingFace. (n.d.). smolagents. GitHub. Retrieved from https://github.com/huggingface/smolagents ↩