Part 1
One tool set, three loops
The tools and the prompt are defined once, as plain functions; each framework wraps them.
Study first
- What a framework adds to the loop you wrote on Day 12: a shape for state, control flow you can draw, handoffs between agents, tracing and checkpoints you do not write. What it costs: its state shape in your code, upgrade churn, debugging through its abstractions.
- The 4 tools:
web_search,read_url,save_finding,write_report. Search is the web whenBRAVE_SEARCH_KEYis set and WorkBot's knowledge base (Day 9, undercontent/knowledge/) otherwise, andread_urlreads either kind of address. Findings and the report go to a notebook, a small object the run owns, which each framework's own state reads from, so the two stay in step. - When to skip the framework: a single-agent tool loop the size of Day 12's, 90 lines. Day 15's analyst runs on it and stays as it is.
Build
src/lib/frameworks/tools.ts: the 4 tools from Day 12'stool()helper, with aNotebookof findings and the report;knowledge://section/slugas the address of a document.src/lib/frameworks/researcher.ts: the instructions, the step limit, the result shape every framework returns: report, findings, tool calls, usage, dollars, milliseconds.content/eval/topics.json: the 5 questions, all answerable from the knowledge base.
Done when
- The tools' tests pass: a search with no key finds a document and gives an address
read_urlreads; a finding and a report land in the notebook.
Technical notes
read_urlreturns a document with its title as the heading, which is what the model then cites as the source.- One
costOf, with the prices per model fromsrc/lib/providers.ts(Day 19), prices every framework's usage, so the dollars column compares like with like; the Claude Agent SDK also reports its own total, a check on the arithmetic.

