Agent Architecture/End-to-End Projects
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.

RequirementSolution
Multi-topic researchwrite_todos for planning, subagents for parallel execution
Web search + deep readingTavily for discovery, fetch_url for full page content
Context managementStoreBackend filesystem — offload results, read when synthesizing
Multi-session memoryThread-bound persistence — build on previous research
Citation trackingEach subagent records source URLs and titles
Report qualityEvaluator-optimizer loop for synthesis quality