Phase 10 · Agentic AI/
Lesson 10.12advanced8 h

Project: build a research agent with tools, an MCP server and an eval harness

A capstone that is evaluated, instrumented, budgeted and safe by design

Everything in this phase becomes real when you ship one agent end to end and measure it. A research agent is the ideal capstone: it exercises tools, planning, memory and citations (9.6 Generation side: context assembly, citations, structured outputs and tool calling), it is read-heavy so it can be parallelized safely (10.6 Multi-agent systems), and its outputs can be graded. Building the MCP server, the eval harness and the safety controls yourself — rather than importing a framework — is what turns the vocabulary of this phase into skill you can defend in an interview (11.4 ML and LLM system design and interviews) or a design review.

You'll be able to

  • Design and implement a research agent with web search, fetch, calculator and file tools using a hand-written loop with budgets
  • Expose a custom tool through an MCP server and connect it to your agent
  • Build a 20-task evaluation harness with end-state graders, k trials, pass@k/pass^k and cost tracking, and run it on every change
  • Compare single-agent and orchestrator–workers designs on quality, cost and reliability, and report the trade-offs

Key ideas

  1. Scope: a cited research agent with search/fetch/calculator/notes tools, budgets, planning, compaction and no outward-facing actions.
  2. Build the loop by hand first; frameworks later — the transcript must be fully understood.
  3. Expose one tool and one resource via your own MCP server and connect it with a client; read the JSON-RPC traffic.
Show 4 more key ideas
  1. Evaluate with 20 tasks × 3 trials: code-based end-state graders plus a calibrated LLM judge; report success, pass@3, pass^3, steps, tool errors and cost per success.
  2. Security by design: remove a trifecta leg, allowlist domains, tag provenance, and keep a red-team injection suite at 0%.
  3. Production skeleton: graph with checkpoints, traces, idempotent tools, kill switch, resumable runs.
  4. Compare single agent vs orchestrator–workers on quality, reliability and cost, and write up the conditions under which the recommendation flips.

Suggested path through this lesson