匠人学院 JR Academy
Skip to article
Engineering handbook
AI Agent Engineering Handbook

Start with tool calls. Understand how an agent acts, reads observations and stops when something fails. Verify each boundary with complete code and offline tests.

5 chapters·16 guides·Open access
Exercise 4: A Multi-agent Research Team
On this page

Lab: A Researcher and Writer Team

Separate evidence collection from writing so the final article retains its sources. The researcher owns factual support; the writer owns structure and clarity. A final reviewer checks both.

#Define roles and permissions

The researcher can read approved public sources. The writer receives a research packet and does not gain publication permission. A role-oriented framework such as CrewAI can implement this sequence, but the same contracts work in a normal workflow.

Run the writer after research is ready. Starting both simultaneously encourages the writer to fill missing facts from memory.

#A concrete handoff

This is a synthetic example packet about retrieval design, not a live research result:

json
{ "topic": "Why a document assistant needs source metadata", "claims": [{ "id": "C1", "text": "Keeping a source identifier lets a reader trace an answer back to its passage.", "evidence_type": "design_argument", "limitations": "A citation alone does not prove the answer is supported." }], "excluded_claims": ["RAG eliminates all hallucinations"], "deliverable": "A short explanation with limitations" }

For factual research, each claim also needs a real source URL, relevant extract and date. Distinguish an author's opinion, a measured result and your own inference.

#Finished illustrative passage

A document assistant should retain the identifier of each passage used in an answer. That lets the reader open the source and check whether the response reflects it. The presence of a citation is only a starting point: the cited passage may be outdated, irrelevant or insufficient for the conclusion.

This passage is prewritten from the packet and contains no invented benchmark or customer result.

#Evaluate the chain

Check source quality before prose quality. Reject unsupported statistics, missing dates and claims added by the writer. Compare the final wording with each source, including exceptions. Require an explicit unresolved section when evidence is incomplete.

A useful team output is the complete article plus its evidence packet and review decisions. More role messages are not a success metric. Bound turns and retries, and keep external publishing as a separately authorized action.

System Design

Core system design concepts and practical case studies

Learn the trade-offs and patterns that matter in technical interviews.

Open System Design →

FAQ

Which language should I use?
Python and TypeScript both work. Start with the language you can debug; the first exercise uses Python 3.10+ and its standard library.
Does MCP require a specific model?
No. MCP connects applications to tools and context services. Compatibility depends on the host client, transport, protocol version and authorisation; model tool-calling support is a separate check.
Does learning agents guarantee employment?
No. Use a small project to demonstrate requirements analysis, permissions, testing and maintenance. Employment outcomes depend on the role market and your actual skills.

Done reading? Next steps