Capstone 1: A Deep Research Assistant
Build a research agent that plans queries, reads sources, tracks citations, and writes a sourced report.
Ask a chat assistant a hard question and you get a fluent answer you can't check. Ask a good human researcher and you get something different: a plan, a pile of sources, notes tied to those sources, and a report where every claim points back to evidence. That second kind of output is what makes research usable for real decisions.
In this capstone you'll build that second kind of researcher. Your agent will plan its queries, search and read pages, record findings with exact quotes, and write a Markdown report where every citation is checked by code before you ever see it. It runs end to end on a mock web so you need no extra accounts, and swapping in a real search API later is a one-file change.
What you'll build
A command-line research assistant you run like this:
npx tsx main.ts "Do heat pumps make sense for a house in a cold climate?"It prints its plan, logs each tool call as it researches, and saves report.md: a short answer up top, sections per sub-topic, an "Open questions" section, and a source list. Every factual sentence carries a citation like [S2], and every citation is guaranteed to point at a page the agent actually fetched and quoted.
This project combines the research workflow from Research Agents, the hand-written loop from A Minimal Agent Loop in 60 Lines, tool design from Designing Tools Agents Love to Use, and defenses from Prompt Injection.