Building a Multi-Agent AI Orchestrator: Lessons from CourseSmith
When I set out to build CourseSmith, I had a simple thesis: if AI can generate code, it should be able to generate structured educational content. The reality was far more complex — and far more interesting.
The Problem with Single-LLM Content Generation
Early experiments with single-prompt course generation produced shallow results. A single LLM call, no matter how well-crafted the prompt, lacks the multi-perspective depth that quality educational content requires. A course needs a curriculum designer’s structure, a subject matter expert’s depth, an assessment designer’s rigor, and a publisher’s polish.
That’s when I shifted to a multi-agent architecture.
The Architecture
CourseSmith uses 4 specialized AI agents that collaborate through a YAML pipeline:
- Teacher Agent — designs the curriculum structure, modules, and learning objectives
- Quiz Generator — creates assessments with varying difficulty levels and knowledge checks
- Flashcard Generator — extracts key concepts and creates spaced-repetition flashcards
- Publisher Agent — formats everything into production-ready Markdown output
Each agent operates independently but feeds into the next stage, with quality gates at each handoff. The result is content that feels designed, not generated.
Key Lessons
- Pipeline > Monolith — Breaking generation into stages with clear interfaces makes each agent’s job simpler and the output more consistent.
- Plugin Architecture Matters — CourseSmith’s runtime is agnostic to the LLM provider. The same pipeline works with OpenAI, Claude, or any compatible API.
- Quality Gates Prevent Garbage — Each agent validates the previous stage’s output before proceeding, preventing cascading errors.
The full CourseSmith project generated a complete 20-module Docker course as a proof point — from syllabus to final assessments — in hours instead of weeks.
Built with: TypeScript, Node.js, OpenAI, Claude, Plugin Architecture
Erick Guedes
AI · SaaS · Sales Engineering · Solutions Consulting. Turning complex processes into scalable solutions.