Build a Multi-Agent Research Team · 45 min · Python · Anthropic Python SDK · Serper API
Specialist Agents — Web & Technical
A specialist that can't cite where a claim came from isn't a research agent -- it's a confident guess with good formatting.
Hiring signal: Building tool-using agents that produce structured, citable output -- and degrade gracefully when a source is unreachable -- is the actual skill behind any research or analysis agent that people would trust with a real question.
What you will learn
- Build the Web Researcher: search, fetch, extract, structured output with citations
- Build the Technical Analyst: focused on code examples and implementation depth
- Implement a fallback strategy when full article extraction fails (search snippet only)
Introduction
The Planner assigns sub-tasks. Today you build the first two agents that actually execute them: the Web Researcher and the Technical Analyst — each searching, reading, and producing findings with real citations, not confident-sounding prose with no receipts.
The pattern: search, fetch, extract, cite
def web_researcher_node(sub_task: str, client) -> dict:
search_results = web_search(sub_task) # reuse Course 03's Serper wrapper pattern
articles = []
for result in search_results[:3]:
text = extract_article(result["link"]) # reuse Course 03's extractor
if not text.startswith("Error"):
articles.append({"url": result["link"], "text": text[:3000]})
else:
articles.append({"url": result["link"], "text": result["snippet"]}) # fallback
prompt = f"""Research sub-task: {sub_task}
Sources:
{format_sources(articles)}
Write findings with inline citations like [1], [2] referencing the sources above."""
response = client.messages.create(model="claude-haiku-4-5-20251001", max_tokens=1500,
messages=[{"role": "user", "content": prompt}])
return {"web_findings": response.content[0].text, "citations": [a["url"] for a in articles]}
Notice the fallback on line 7: when extract_article fails (Course 03 already taught you why this happens constantly -- paywalls, JS-rendering, blocking), this specialist doesn't skip the source or crash, it falls back to the search snippet, which is worse than full text but far better than losing the citation entirely. This is the exact "handle the realistic failure case" instinct from Course 03's preprocessors, reused here because the same real-world messiness applies to any web-facing tool.
Citations aren't optional polish -- they're what makes a claim checkable
"[1], [2]" inline markers referencing a real sources list is what turns "the model said X" into "source Y said X, verify it yourself if you want." This distinction is the entire reason a multi-agent research system with citations is more trustworthy than asking Claude the same question directly with no tools -- and it's also why the Synthesizer (Lesson 6) has real work to do deduplicating citations across 3 specialists who might cite the same source independently.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The Technical Analyst: same pattern, different focus, What You're Building — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy