cd /news/large-language-models/the-multi-agent-architecture-for-edu… · home topics large-language-models article
[ARTICLE · art-46742] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

The Multi-Agent Architecture for Education

A developer built a multi-agent architecture for automated curriculum production using LangGraph, splitting the pipeline into four specialized agents: Planner, Writer, QA, and Formatter. This approach improved quality and consistency compared to using a single large language model prompt, as specialization allows each agent to focus on a narrow task.

read2 min views1 publishedJul 1, 2026

When we first started automating curriculum production , the obvious move was to throw a big prompt at Gemini and ask it to produce a full lesson.

It worked - sometimes. The quality was inconsistent. A great lesson on Monday, a mediocre one on Tuesday, and nobody could explain why.

The root issue: one LLM doing everything is like one developer handling design, backend, QA, and deployment simultaneously. You get output, but it's noisy.

We split the pipeline into four specialized agents, each with a narrow job:

1. Planner Agent

Takes the learning objective and breaks it into a structured outline - topics, subtopics, learning outcomes, estimated time per section. No content yet, just architecture.

2. Writer Agent

Receives the outline section by section and writes the actual content. Has no visibility into other sections - this forces consistency through structure, not context.

3. QA Agent

Reviews the full draft against the original learning objective. Flags gaps, redundancies, and places where the content drifted from the outcome. Returns a structured diff.

4. Formatter Agent

Takes the approved content and outputs it in the exact format our LMS expects - SCORM metadata, section markers, media placeholders.

LangGraph lets us define the flow as a state machine - each agent is a node, and we can branch conditionally. If QA flags major issues, the loop goes back to Writer. If it passes, it moves to Formatter.

This is something you can't do cleanly with a linear LangChain pipeline.

`python

from langgraph.graph import StateGraph

workflow = StateGraph(CurriculumState)

workflow.add_node("planner", planner_agent)

workflow.add_node("writer", writer_agent)

workflow.add_node("qa", qa_agent) workflow.add_node("formatter", formatter_agent)

workflow.add_conditional_edges("qa", should_revise, {

"revise": "writer",

"approve": "formatter"

})

`

After switching to this architecture:

The key insight: specialization improves quality even for AI agents. A model doing one focused task outperforms the same model doing five tasks in a single prompt.

Originally published at mostafafathy.com

── more in #large-language-models 4 stories · sorted by recency
── more on @gemini 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-multi-agent-arch…] indexed:0 read:2min 2026-07-01 ·