Enterprise DNA
Guided 90 min · intermediate · Under $5

Build a Research and Brief Agent

Build an agent that researches a topic from real sources, cites them, and only reports done when the brief passes a completion check.

Expected output

A cited research brief on a topic you choose, with a verification step that confirms every claim has a source.

What you will build

An agent that takes a topic, gathers information from real sources, writes a short brief, and then checks its own work before it says it is finished. The completion check is the point of the lab. A brief with no sources is not done, no matter how good it reads.

Why this lab matters

This is your first taste of the full formula. The model writes, but the context decides what it sees, a search tool lets it act, a small loop manages the steps, and a verification step decides whether the work is actually complete.

Expected output

  • A brief of roughly 400 to 600 words on a topic you choose.
  • Every claim tied to a source link.
  • A verification pass that fails the run if any claim has no source.

Prerequisites

  • You have read Chapter 3, Give the Agent the Right Context.
  • You can run a small Python script and set an environment variable.

Steps

  1. Define the goal. One topic, one audience, one length.
  2. Give the agent a search tool and nothing it does not need.
  3. Keep the stable instructions separate from the changing task state.
  4. Have the agent gather sources first, then write from them, not the other way round.
  5. Add a verification step. Walk every claim and confirm it maps to a source.
  6. If the check fails, the agent goes back and fixes the gap before reporting done.

Verification checklist

  • The brief exists and is within the length target.
  • Every claim has a source link.
  • The run reports “not done” when a claim is unsupported.

Common failure modes

  • The agent writes first and looks for sources after, which produces confident but unsupported claims.
  • Loading the whole internet into context instead of retrieving what matters.
  • Treating “text produced” as “task complete.”

Extension ideas

  • Add a second grader that checks the sources are recent enough.
  • Swap the model provider and confirm the pattern still holds.

Chapter 3, Give the Agent the Right Context.