MU
← All Projects
4.2

AI Essay Writer Agent

AI-Powered
AI-Powered Tools

A multi-agent AI system that writes complete, research-backed essays. Uses AG2 (AutoGen) Swarm pattern with 4 specialized agents: Researcher (web search), Outliner (thesis & structure), Writer (paragraph drafting), and Editor (grammar & flow). Outputs both formatted text and downloadable Word documents.

Technology Stack
FastAPIAG2 (AutoGen) SwarmGroqGroq APIpython-docxDuckDuckGo SearchSSE StreamingGoogle Cloud Run
System Architecture
Loading diagram...
Specifications
  • Multi-Agent Pipeline: Four specialized agents work sequentially: Researcher → Outliner → Writer → Editor
  • Web Research: DuckDuckGo search gathers facts, arguments, and expert opinions automatically
  • Essay Types: Supports argumentative, expository, narrative, and persuasive essays
  • Thesis Generation: Outliner agent creates clear, arguable thesis with logical structure
  • DOCX Export: Generates formatted Word documents with proper sections and styling
  • Real-time Progress: SSE streaming shows current phase and status as agents work
Design Decisions
ChallengeSolution
Agent tool calling unreliable with GroqPre-execute web searches and pass results to Researcher agent
Maintaining essay coherenceSequential pipeline ensures each agent builds on previous output
Extracting agent responses from AG2Robust extraction with fallbacks for name/role matching
Users need downloadable outputpython-docx generates formatted Word documents with metadata
Long-running generationSSE streaming provides real-time progress updates by phase
Process Flow
Loading diagram...
User Interface

Essay Writer Interface

Simple form interface with real-time progress tracking and instant Word document download

Topic input with essay type selection
Configurable word count (100-5000)
Live progress indicators for each agent phase
One-click Word document download
Try Live Demohttps://tewtor.ai