Malhar Ujawane

Blog

Explainer·(updated October 31, 2026)

What is deep research? How AI research agents actually work

Deep research agents plan a question, search and read in rounds, then write a cited report. How Gemini, OpenAI and Claude build them, with a Python demo.

What is deep research? How AI research agents actually work

Deep research is an AI agent mode that answers a hard question by planning sub-questions, running many web searches over several rounds, reading the pages it finds, and writing a long report with citations, usually over a few minutes instead of a few seconds. Google shipped the first mainstream version in Gemini in December 2024, and OpenAI, Perplexity and Anthropic followed within months. Under the product names, they share one loop: plan, search, read, find the gaps, search again, write.

How did deep research products start?

Google introduced Deep Research in Gemini on December 11, 2024, running on Gemini 1.5 Pro. You asked a question, Gemini drafted “a multi-step research plan for you to either revise or approve,” then searched, read what it found, and ran new searches based on what it learned, several times over a few minutes. The output was a report with links to sources that you could export to Google Docs. Google credited its search infrastructure and Gemini’s 1M-token context window.

OpenAI shipped deep research in ChatGPT in early February 2025; Hugging Face’s reproduction post, dated February 4, opens with “Yesterday, OpenAI released Deep Research.” Its system card (February 25, 2025) says the model is “powered by an early version of OpenAI o3 that is optimized for web browsing,” and that it can read user files and run Python for data analysis. The training detail is the interesting part: it learned browsing (searching, clicking, scrolling, interpreting files), sandboxed Python, and synthesis “through reinforcement learning training on these browsing tasks,” graded against ground-truth answers or rubrics by a chain-of-thought grader model. That’s the same family of idea behind reasoning models: train the model on the whole agent loop rather than on final answers alone.

Perplexity’s Deep Research followed on February 14, 2025, saying it “iteratively searches, reads documents, and reasons about what to do next,” finishing most tasks in 2 to 4 minutes. It reported 21.1% on Humanity’s Last Exam and 93.9% on SimpleQA. Anthropic added Research to Claude on April 15, 2025, describing it as conducting “multiple searches that build on each other while determining exactly what to investigate next.”

How does a deep research agent work?

Strip the branding and every implementation I’ve read follows the same five steps.

  1. Clarify and plan. Turn the question into sub-questions. Gemini shows you the plan for approval; others ask clarifying questions or plan silently.
  2. Search. Run queries for each sub-question, often in parallel.
  3. Read. Fetch pages and PDFs, extract what’s relevant, and keep notes with the source attached.
  4. Reflect. Compare the notes against the question. What’s missing, contradictory or weakly sourced? Generate new queries for the gaps. Anthropic’s Building effective agents uses exactly this as its example of an evaluator-optimizer loop: complex search where “the evaluator decides whether further searches are warranted.”
  5. Write and cite. Synthesize a report, and attach each claim to the source it came from.

Steps 2 to 4 repeat until the gaps are closed or a budget runs out. Architecturally, that loop can live in one agent or be spread across many. Anthropic’s write-up of its Research feature (June 13, 2025) is the most detailed public description of the multi-agent version: a lead agent plans and saves the plan to memory, spawns subagents that search in parallel with their own context windows, decides whether more research is needed, and finally hands everything to a CitationAgent that matches claims to sources. That’s the orchestrator-worker pattern applied to search, and their lead-plus-subagents setup beat a single agent by 90.2% on their internal research eval.

What does the deep research loop look like in code?

Here’s the loop on a six-document local corpus so it runs offline. The search is real keyword scoring; the planner and the gap checker are stubs where an LLM would go. Watch the gap check drive a second round.

# deep_research.py: the deep research loop on a local corpus, stdlib only.
# plan -> search -> read -> note gaps -> search again -> write with citations.
# The planner and gap-checker are stubs for an LLM; search is real keyword scoring.
import re

CORPUS = {
    "s1": "A2A was announced by Google on April 9, 2025 with more than 50 partners.",
    "s2": "The Linux Foundation launched the Agent2Agent project on June 23, 2025.",
    "s3": "MCP connects an agent to tools and data. It was open-sourced in November 2024.",
    "s4": "A2A version 0.3.0 renamed the Agent Card file to agent-card.json.",
    "s5": "A2A 1.0.0 was released on March 12, 2026 with breaking changes.",
    "s6": "Pizza dough needs a long, cold rise for flavour.",
}

def search(q, k=2):
    words = set(re.findall(r"[a-z0-9.]+", q.lower()))
    scored = [(len(words & set(re.findall(r"[a-z0-9.]+", t.lower()))), sid)
              for sid, t in CORPUS.items()]
    return [sid for score, sid in sorted(scored, reverse=True)[:k] if score > 0]

def plan(question):            # stub LLM: break the question into sub-queries
    return ["A2A announced Google partners", "A2A Linux Foundation project"]

def gaps(question, notes):     # stub LLM: what does the question still need?
    text = " ".join(notes.values()).lower()
    need = []
    if "1.0" not in text: need.append("A2A 1.0.0 released")
    if "mcp" not in text: need.append("MCP tools data open-sourced")
    return need

question = "How did A2A evolve, and how does it relate to MCP?"
notes, queue, rounds = {}, plan(question), 0
while queue and rounds < 4:                     # budget: max search rounds
    rounds += 1
    for q in queue:
        hits = search(q)
        for sid in hits:
            notes.setdefault(sid, CORPUS[sid])
        print(f"round {rounds} search {q!r:<34} -> {hits}")
    queue = gaps(question, notes)
    print(f"round {rounds} gaps: {queue or 'none'}")

print("\nreport:")
for sid in sorted(notes):
    print(f"  {notes[sid]} [{sid}]")
print(f"sources read: {len(notes)} of {len(CORPUS)}, rounds: {rounds}")

Output (Python 3.13.11):

round 1 search 'A2A announced Google partners'    -> ['s1', 's5']
round 1 search 'A2A Linux Foundation project'     -> ['s2', 's5']
round 1 gaps: ['MCP tools data open-sourced']
round 2 search 'MCP tools data open-sourced'      -> ['s3']
round 2 gaps: none

report:
  A2A was announced by Google on April 9, 2025 with more than 50 partners. [s1]
  The Linux Foundation launched the Agent2Agent project on June 23, 2025. [s2]
  MCP connects an agent to tools and data. It was open-sourced in November 2024. [s3]
  A2A 1.0.0 was released on March 12, 2026 with breaking changes. [s5]
sources read: 4 of 6, rounds: 2

Three things in that output are true of production systems too. The reflect step is what makes it “deep”: round 1 never mentioned MCP, and only the gap check sent it back. The 1.0 release came in by luck, as a weak keyword match on “A2A”, which is why real agents read and judge pages instead of trusting rank. And the agent stopped without ever reading s4, the Agent Card rename, because nothing in its gap check asked about it. A deep research report is as complete as its gap checker is curious, and the report gives you no way to see what it didn’t look for.

Two reasons, and both are about spending more. First, more retrieval: dozens of searches and pages instead of one results page. Anthropic found that token usage alone explained 80% of the performance variance on the BrowseComp browsing benchmark. Second, models trained on the loop. OpenAI’s system card describes reinforcement learning on browsing tasks, so the model learns when to search again and when to stop, rather than following a prompt that tells it to.

The framework around the model matters too. When Hugging Face built an open Deep Research clone in 24 hours (February 4, 2025), they noted OpenAI’s reported 67.36% on the GAIA validation set and reached 55.15% with their own agent. Switching the same setup from writing actions as code to writing them as JSON dropped it to 33%. Same model, different harness, a 22-point swing.

Where do deep research agents fail?

Confident synthesis over weak sources. A fluent 5,000-word report reads as authoritative whether its sources are primary papers or content farms. Anthropic’s rubric for its own research evals included source quality, “primary sources over lower-quality secondary sources,” because agents don’t do this by default.

Citation drift. A citation shows a page was retrieved, not that it supports the sentence it’s attached to. Anthropic built a separate CitationAgent for this, which tells you how often a single writer gets it wrong.

Prompt injection at scale. A deep research agent reads dozens of pages chosen by search ranking, any of which can carry instructions. OpenAI’s system card says it trained the model “to resist malicious instructions that it may come across while searching the Internet.” The underlying exposure is the one I described in AI browsers and prompt injection, multiplied by the number of pages read.

Cost and time. Minutes per question, and Anthropic puts multi-agent research at about 15 times the tokens of a chat. That’s a fine trade for a market analysis and a poor one for a factual lookup.

What I would do

I built rSearch, a search product that runs DeepSeek R1 over results retrieved through Serper, so this is the part I think about most. My view of how to build one:

  1. Separate retrieval from reasoning. A search API returns candidates; a reasoning model decides what they mean. Swapping either should not require touching the other.
  2. Make the plan and the gap check explicit structured outputs, and log them. When a report is wrong, the cause is usually a sub-question nobody asked.
  3. Budget by rounds and by tokens, and scale the budget to the question. A one-fact question should never fan out to ten searches.
  4. Keep source text alongside every note, and verify citations against it after writing, not during.
  5. Show the user the plan and the source list, as Gemini does. A reader who can see what was searched can judge what was missed.

For retrieval inside your own documents rather than the web, the same loop is called agentic RAG, and the coordination questions are the same ones in multi-agent systems.

FAQ

Normal AI search runs one retrieval and answers in seconds. Deep research plans sub-questions, searches and reads over several rounds, checks for gaps, and writes a long cited report, usually over minutes.

Which AI has deep research?

Gemini (December 2024), ChatGPT (February 2025), Perplexity (February 2025) and Claude (April 2025) all launched deep research or research modes, and open-source versions such as Hugging Face’s open Deep Research exist.

How long does deep research take?

Gemini’s launch post said a few minutes, and Perplexity said most of its tasks finish in 2 to 4 minutes. Longer questions and more sources take longer.

Can I trust deep research reports?

Treat them as a well-sourced first draft. Check that key citations support the claims they’re attached to, and look at which sources were used, since the agent can miss whatever its plan didn’t ask about.

Sources

Get new posts in your inbox

© 2026 Malhar Ujawane. Built with Astro.