A deep research agent answers a complex question by breaking it into smaller questions, running dozens of searches, and reading pages and documents. As it works, it tracks what it has learned and what still needs an answer. It then brings its findings together in a structured report, with citations linking important claims to their sources. A typical run takes five to thirty minutes.
Popular Examples: OpenAI Deep Research, Gemini Deep Research, Perplexity Deep Research
Suppose you ask a chat assistant, "How have EU battery regulations changed the economics of lithium-ion recycling since 2023?" It might return a few paragraphs in seconds, drawing on its training data and a handful of search results. A thorough answer takes more work. It requires reading the regulation, comparing industry reports, checking recent developments at recycling plants, and examining material prices.
A deep research agent carries out that investigation. Compared with a short chat interaction, a single run may involve hundreds of tool calls and cost several dollars. Much of what it reads comes from untrusted web pages, and its final report is useful only if the evidence supports its conclusions.
In this chapter, we'll design a deep research agent that searches the web and the user's documents to produce a report with citations. We'll start with the requirements and architecture, then explore planning and replanning, parallel sub-agents, citation accuracy, prompt injection, and per-run cost limits.