Advanced15 min
Project: Build a Research Agent
End-to-end walkthrough: build a multi-source research agent with planning, parallel web search, subagent delegation, filesystem persistence, and report synthesis using Deep Agents.
Quick Reference
- →Architecture: orchestrator + 3 research subagents + report writer — Deep Agents with StoreBackend
- →Planning: write_todos decomposes the research question into 3-5 subtopics
- →Retrieval: each subagent uses Tavily for URL discovery + fetch_url for full content
- →Context engineering: offload search results to filesystem, summarize per-topic, synthesize from files
- →Evaluation: trajectory eval for search efficiency + LLM-as-judge for report quality
- →Deployment: Agent Server with thread-bound memory for iterative research sessions
Requirements
We're building a research agent that takes a topic, breaks it into subtopics, researches each in parallel via subagents, saves findings to files, and synthesizes a comprehensive report with citations. The agent should support multi-turn refinement — the user can ask follow-up questions and the agent builds on previous research.
| Requirement | Solution |
|---|---|
| Multi-topic research | write_todos for planning, subagents for parallel execution |
| Web search + deep reading | Tavily for discovery, fetch_url for full page content |
| Context management | StoreBackend filesystem — offload results, read when synthesizing |
| Multi-session memory | Thread-bound persistence — build on previous research |
| Citation tracking | Each subagent records source URLs and titles |
| Report quality | Evaluator-optimizer loop for synthesis quality |